[PR #167] [CLOSED] generate: zero session state for native packs before the prompt path #2484

Closed
opened 2026-11-04 02:00:37 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/167
Author: @samuelishida
Created: 9/29/2026
Status: ❌ Closed

Base: main ← Head: pr-session-zero


📝 Commits (1)

  • 9d332c0 generate: zero session state for a native pack before the prompt path

📊 Changes

2 files changed (+18 additions, -0 deletions)

View changed files

📝 .gitignore (+3 -0)
📝 src/program/generate.cpp (+15 -0)

📄 Description

A native (IQ) pack breaks out of the canonical put_input loop before position 0 and runs verify windows instead, so generate mode never reached the session_zero call that the canonical path uses. On a reused cudaMalloc allocation that left GDN, QSA KV/indexer, PLE history, and R uninitialized, producing NaN/overflow and degenerate identical-token output.

Zero the session state explicitly when native_pack is set.

Also removes an unused argmax() helper that emitted a compiler warning, and ignores the local .pi/ harness directory.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/167 **Author:** [@samuelishida](https://github.com/samuelishida) **Created:** 9/29/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `pr-session-zero` --- ### 📝 Commits (1) - [`9d332c0`](https://github.com/Niko1221/Strata/commit/9d332c0ea99c7463f35932d70ad920ccf7970d7d) generate: zero session state for a native pack before the prompt path ### 📊 Changes **2 files changed** (+18 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+3 -0) 📝 `src/program/generate.cpp` (+15 -0) </details> ### 📄 Description A native (IQ) pack breaks out of the canonical `put_input` loop before position 0 and runs verify windows instead, so `generate` mode never reached the `session_zero` call that the canonical path uses. On a reused `cudaMalloc` allocation that left GDN, QSA KV/indexer, PLE history, and `R` uninitialized, producing NaN/overflow and degenerate identical-token output. Zero the session state explicitly when `native_pack` is set. Also removes an unused `argmax()` helper that emitted a compiler warning, and ignores the local `.pi/` harness directory. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-04 02:00:37 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#2484
No description provided.