Skip to content

GLM-5.2 int4 think mode: stochastic reasoning loops / EOS starvation on stock v1.0.0; #307's TEMP=0.9 NUCLEUS=0.95 stopgap makes it severe #455

Description

@lukascechovic

Environment

Repro

rm -f "$MODEL/.coli_kv"
printf '2+2 = ?\n' | env DIRECT=1 PIPE_WORKERS=2 PILOT_REAL=1 THINK=1 KVSAVE=0 \
  TEMP=0.9 NUCLEUS=0.95 \
  coli chat --no-attach --model "$MODEL" --ram 80 --topp 0.7

Observed

With #307's suggested TEMP=0.9 NUCLEUS=0.95 (severe, reproduced 1/1): the model hallucinated a different problem and never terminated — killed after 30 min / ~1050 tokens. Excerpt:

2 × 1 = 2
Simplify 4(???). What is the value of ?+?+?* ?
...
Okay, I think we're going to to the theater. (Ha ha!) But I'm going to the movie. (Ha, ha!)
...
So, what is the denominator? Is there a second "denominator"? ...

Stray </think> tokens appear mid-text; no EOS ever sampled.

With defaults (0.7/0.90) (stochastic): one coli serve sample was clean; the identical repeat produced a 10× "Wait, …" self-correction spiral before finally answering. A stock coli chat sample never closed its <think> block (answered inside reasoning, then EOS).

KV resume amplifies it: with KV saving enabled, two fresh-server requests were clean, but after a server restart resumed the saved .coli_kv (29 MB), the same request ran into a "Wait" loop to the max_tokens cap with no post-think answer — and the cap-hit was reported as finish_reason:"stop" instead of "length".

Notes / suspected causes

  1. Our checkpoint is the pre-fix per-row-scale int4 (Root cause of incoherent output: per-row int4 scales — fix with group-scaled quantization (fmt=4) #225). The failure worsening as nucleus opens (0.90 → 0.95) fits quantization-tail noise being sampled back in — i.e., [Bug]: python coli chat doesn't end #307's stopgap points the wrong way for pre-fix checkpoints; the tightened 0.90 default is what keeps it mostly coherent.
  2. No loop/repetition protection exists in generation ([Bug]: python coli chat doesn't end #307), so once the reasoning channel starts self-correcting ("Wait, …") nothing bounds it.
  3. Two side-bugs observable on stock coli serve:
    • finish_reason:"stop" reported on max_tokens cap-hit (should be "length").
    • <think> stripping is string-based; when the model never emits </think>, the whole reasoning block lands in content (and when it does, the literal </think> can leak).

Full SSE captures, chat transcripts, and the metrics script available on request.

References

Ask

  1. Could a gs=64 / fmt=4 group-scaled int4 container be published (e.g. the test container built for cuda+engine: full fmt=4 (grouped int4 gs=64) support + diagnostic harness #298)? Both circulating HF checkpoints (jlnsrk/GLM-5.2-colibri-int4, mateogrgic/GLM-5.2-colibri-int4-with-int8-mtp) are still the pre-fix per-row-scale format with no warning on their cards — downstream users who skip the 756 GB FP8 conversion currently can't get the Root cause of incoherent output: per-row int4 scales — fix with group-scaled quantization (fmt=4) #225 fix. We'd gladly rerun our full capture matrix on it and report back.
  2. Consider some form of loop/repetition protection in generation ([Bug]: python coli chat doesn't end #307) — with pre-fix checkpoints the reasoning channel can self-correct unboundedly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugDifetto verificato nel codicequalityQualità del modello / quantizzazione

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions