GLM 5.3 Flash: long agentic thinking turn degenerates into one repeated token at temperature 1.0; no server-side repetition control
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- c
- Ambito
- backend, machine-learning
Direzione di ricerca
Start by reading the request parsing and sampler paths described in the issue, then trace the decode loop to see how generated tokens and thinking blocks are handled. Reproduce the repeated-token output with the supplied GLM-5.3-Flash settings if the model is available. Done means the server can prevent or recover from this loop, with behavior covered by a focused test; the issue offers two possible approaches but leaves the choice open.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
A long agentic thinking turn degenerated into one repeated token, even with the model card's sampling.
Setup:
- GLM-5.3-Flash Q2, resident:
--ctx 393216 --warm-weights, disk KV. - M5 Max 128 GB, ds4 at 5379c1c.
- Client: Hermes Agent through
/v1/chat/completions, withtemperature 1.0,top_p 0.95,top_k 0,min_p 0andreasoning_effort: high.
After 29 consecutive tool calls in one user turn, the 30th reasoning block degenerated:
| generated tokens | context position | content |
|---|---|---|
| 0 – 5,779 | 128,794 – 134,573 | ordinary (increasingly terse) reasoning |
| 5,780 – 7,559 | 134,574 – 136,353 | hmm — repeated 890 times |
| 7,561 – ~20,600 | 136,355 – ~149,400 | token 68926 aaaaaaaa, repeated ~13,000 times |
Decode held ~21.9 tok/s throughout, and the client cut the stream after about 16 minutes. The token ids come from the continued checkpoint the server wrote at 143,360 tokens.
This is not greedy decoding, so it is a different case from #1196 and #1045 (DeepSeek at temperature 0 / 0.2).
What led into it
This model keeps all previous reasoning by default (clear_thinking is false). So the turn's earlier reasoning blocks made up 51% of the 128,794-token prompt. Their style drifted, measured per 1K characters of reasoning:
| reasoning blocks | hmm |
= |
|---|---|---|
| first 30 turns of the session | 0.8 | 0.2 |
| this turn, 1–10 | 2.0 | 8.7 |
| this turn, 11–20 | 3.4 | 12.4 |
| this turn, 21–29 | 10.4 | 18.2 |
| this turn, 30 | the loop above |
Engine side, as far as I can tell
- Not the checkpoints. Two
continuedcheckpoints were written during this decode, at 133,120 and 143,360 tokens. The first came 1,454 tokens before the stutter began, and the GLM payload save only reads state. - No repetition control. The request parsers silently skip
presence_penalty,frequency_penaltyandrepetition_penalty(json_skip_value); the sampler reads onlytemperature,top_p,top_k,min_pandseed. An OpenAI-compatible client has no way to push back on a loop, and nothing on the server stops a run of one repeated token beforemax_tokens.
Possible fixes
- Honour
presence_penalty/frequency_penaltyover the generated tokens, skipping speculative decoding while they are set. - Add a cheap guard in the decode loop: inside thinking, when the last few hundred generated tokens are an exact cycle with a short period, emit the think-close sequence so the model moves on to its answer. This is the trailing-block detection #1196 suggests, and it would also end the greedy loops there.
I can send a PR for either if you have a preference.
- Lingua principale
- C
- Stelle
- 24.4k
- Fork
- 2.4k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di antirez/ds4
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
antirez/ds4#1189 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
antirez/ds4#1173 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 92/100
antirez/ds4#1032 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Issue simili
-
bug needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
awslabs/aws-c-common#1319 ·
-
editor/integration
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
DeusData/codebase-memory-mcp#3130 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 13 giorni
-
DBMS_UTILITY.FORMAT_ERROR_STACK exceeds the 2000-byte limitForse già presa @coder999o l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
zephyrproject-rtos/zephyr#127560 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni