[GH-ISSUE #133] A conversation taken back from a slot file often answers in a loop (1.0.29 to 1.0.34, Windows, 7900 XTX) #43

Closed
opened 2026-10-29 21:19:40 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @jerem91150 on GitHub (Oct 12, 2026).
Original GitHub issue: https://github.com/mw00/project-maya/issues/133

When the engine takes a conversation back from its slot file and only has the last token to read, the answer often loops. Same thing on 1.0.29, 1.0.33 and 1.0.34.

Setup: RX 7900 XTX (gfx1100), Windows 11, GLM-5.3-Flash UD-IQ2_XXS, 32K context, thinking off (enable_thinking: false), temperature 0.3 or 0.

How I hit it, all in one running engine: a 27K prompt (a code file + a question), a 9K prompt (the first 30K characters of the same file + another question), a short scene prompt, then the same 27K and the same 9K again. The log shows

glm slots: took back a 8628-token conversation from disk (0.2 s); 1 new tokens to read

and the answer comes out like this:

Ce code Python orchestre la production de contenu de contenu de contenu de contenu de contenu ...

or the first sentence over and over with a </think> between each copy:

Ce code est un pipeline Python autonome qui orchestre un assistant virtuel.</think>Ce code est un pipeline Python autonome qui orchestre un assistant virtuel.</think>...

The first answers to the same prompts are fine every time.

What I tried:

  • 1.0.29, 1.0.33, 1.0.34: loops on all three.
  • Slot files on another drive (STRATA_GLM_SLOT_DIR on C:, the model is on G:): still loops, so not the drive.
  • With and without my disk env (DISK_QD=16, READ_CHUNKS=1, hipBLASLt table): loops in both cases.
  • STRATA_GLM_SLOTS=0: never looped (the prompts are read again in full).
  • It's not every time: 8 of the 10 sessions that went through a slot file looped at least once, 0 of 2 with SLOTS=0. One run with STRATA_GLM_SLOT_ROUNDTRIP=1 came out fine.

The </think> in the output makes me wonder whether the restored state is off by a little at the end of the prompt, where the template puts the empty think block, but that's only a guess.

Maybe related to what #126 describes (the kept state holding the reply's opening token)? For now I run with STRATA_GLM_SLOTS=0. Happy to test #126 or a debug build if that helps.

Originally created by @jerem91150 on GitHub (Oct 12, 2026). Original GitHub issue: https://github.com/mw00/project-maya/issues/133 When the engine takes a conversation back from its slot file and only has the last token to read, the answer often loops. Same thing on 1.0.29, 1.0.33 and 1.0.34. Setup: RX 7900 XTX (gfx1100), Windows 11, GLM-5.3-Flash UD-IQ2_XXS, 32K context, thinking off (`enable_thinking: false`), temperature 0.3 or 0. How I hit it, all in one running engine: a 27K prompt (a code file + a question), a 9K prompt (the first 30K characters of the same file + another question), a short scene prompt, then the same 27K and the same 9K again. The log shows ``` glm slots: took back a 8628-token conversation from disk (0.2 s); 1 new tokens to read ``` and the answer comes out like this: ``` Ce code Python orchestre la production de contenu de contenu de contenu de contenu de contenu ... ``` or the first sentence over and over with a `</think>` between each copy: ``` Ce code est un pipeline Python autonome qui orchestre un assistant virtuel.</think>Ce code est un pipeline Python autonome qui orchestre un assistant virtuel.</think>... ``` The first answers to the same prompts are fine every time. What I tried: - 1.0.29, 1.0.33, 1.0.34: loops on all three. - Slot files on another drive (`STRATA_GLM_SLOT_DIR` on C:, the model is on G:): still loops, so not the drive. - With and without my disk env (`DISK_QD=16`, `READ_CHUNKS=1`, hipBLASLt table): loops in both cases. - `STRATA_GLM_SLOTS=0`: never looped (the prompts are read again in full). - It's not every time: 8 of the 10 sessions that went through a slot file looped at least once, 0 of 2 with `SLOTS=0`. One run with `STRATA_GLM_SLOT_ROUNDTRIP=1` came out fine. The `</think>` in the output makes me wonder whether the restored state is off by a little at the end of the prompt, where the template puts the empty think block, but that's only a guess. Maybe related to what #126 describes (the kept state holding the reply's opening token)? For now I run with `STRATA_GLM_SLOTS=0`. Happy to test #126 or a debug build if that helps.
Author
Owner

@mw00 commented on GitHub (Oct 12, 2026):

Fixed in v1.1.4. The cause: at the start of every new conversation the engine zeroed its state on the GPU's default queue, which its own queues don't wait for, and Windows' HIP runtime holds such work until the program next waits on the GPU - so the next conversation started from the previous one's state, which is why a conversation taken back from a slot answered the other one's question. We reproduced it on a Radeon 8060S under Windows with your A, B, C, A, B sequence, and it comes back right there now. Could you confirm on your 7900 XTX? Thanks for the report and the details.

<!-- gh-comment-id:6131934707 --> @mw00 commented on GitHub (Oct 12, 2026): Fixed in [v1.1.4](https://github.com/mw00/project-maya/releases/tag/v1.1.4). The cause: at the start of every new conversation the engine zeroed its state on the GPU's default queue, which its own queues don't wait for, and Windows' HIP runtime holds such work until the program next waits on the GPU - so the next conversation started from the previous one's state, which is why a conversation taken back from a slot answered the other one's question. We reproduced it on a Radeon 8060S under Windows with your A, B, C, A, B sequence, and it comes back right there now. Could you confirm on your 7900 XTX? Thanks for the report and the details.
Author
Owner

@jerem91150 commented on GitHub (Oct 13, 2026):

Confirmed on the 7900 XTX (gfx1100, Windows 11), thanks for the quick fix.

1.1.4 built with build_maya_windows.bat, parity tests all pass. Then the same sequences as before, slot files on, our usual env:

  • temperature 0: 9K, 27K, 9K again, 27K again, then the 9K conversation continued with a real follow-up question, then one more turn in memory. The log shows three take-backs from disk (took back a 8531-token conversation from disk (1.8 s); 1 new tokens to read, the 26078-token one, and the 8531 one with 112 new tokens). Every answer is about its own prompt, no loop.
  • temperature 0.3: the 27K/9K/scene/27K/9K sequence that looped on 1.0.29-1.0.34. Both take-backs answer correctly.

On 1.0.x, 8 of my 10 sessions with slots looped at least once. On 1.1.4 that's 0 for now.

One thing I can't explain yet: on the very first start of 1.1.4 the engine exited (code 1, nothing in its log) about 18 s into reading the 26K prompt. It came right after I had killed a ComfyUI process that was using the GPU, so it may be unrelated. The four starts after it (two more slot sessions and two decode runs) went fine. Decode is the same as 1.0.34 here (12.3 / 12.7 against 12.7 / 12.4 tok/s, sampled, alternated). If it shows up again I'll open a separate issue with whatever I can capture.

<!-- gh-comment-id:6139791612 --> @jerem91150 commented on GitHub (Oct 13, 2026): Confirmed on the 7900 XTX (gfx1100, Windows 11), thanks for the quick fix. 1.1.4 built with `build_maya_windows.bat`, parity tests all pass. Then the same sequences as before, slot files on, our usual env: - temperature 0: 9K, 27K, 9K again, 27K again, then the 9K conversation continued with a real follow-up question, then one more turn in memory. The log shows three take-backs from disk (`took back a 8531-token conversation from disk (1.8 s); 1 new tokens to read`, the 26078-token one, and the 8531 one with 112 new tokens). Every answer is about its own prompt, no loop. - temperature 0.3: the 27K/9K/scene/27K/9K sequence that looped on 1.0.29-1.0.34. Both take-backs answer correctly. On 1.0.x, 8 of my 10 sessions with slots looped at least once. On 1.1.4 that's 0 for now. One thing I can't explain yet: on the very first start of 1.1.4 the engine exited (code 1, nothing in its log) about 18 s into reading the 26K prompt. It came right after I had killed a ComfyUI process that was using the GPU, so it may be unrelated. The four starts after it (two more slot sessions and two decode runs) went fine. Decode is the same as 1.0.34 here (12.3 / 12.7 against 12.7 / 12.4 tok/s, sampled, alternated). If it shows up again I'll open a separate issue with whatever I can capture.
Author
Owner

@mw00 commented on GitHub (Oct 13, 2026):

Thanks for confirming on the 7900 XTX, and for the long sessions behind it - 0 loops in your slot sessions is the result we hoped for.

On the one exit right after you killed ComfyUI: agreed, it may well be unrelated. If it shows up again, a separate issue with the engine log and the console's last lines would be perfect.

<!-- gh-comment-id:6147947290 --> @mw00 commented on GitHub (Oct 13, 2026): Thanks for confirming on the 7900 XTX, and for the long sessions behind it - 0 loops in your slot sessions is the result we hoped for. On the one exit right after you killed ComfyUI: agreed, it may well be unrelated. If it shows up again, a separate issue with the engine log and the console's last lines would be perfect.
Sign in to join this conversation.
No labels
pull-request
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
mw00/project-maya#43
No description provided.