Repository navigation
fix(server): the loop guard looks up </think> only for a guarded reply (17 server tests pass again) - #15
Merged
bertholomus merged 1 commit intoOct 17, 2026
Conversation
_think_loop asked the tokenizer for </think> before checking whether the guard is on. With the guard off (the default) every request still made that call, and a tokenizer without token_to_id (the server tests' TextTokenizer) failed every request before it reached the engine: 17 tests in tests/test_cuda_server_disconnect.py. The lookup now follows the on / thinking / grammar / budget checks; a guarded reply builds the same close sequence as before.
Owner
|
Thank you @willjriley, merged. With it the server tests pass again on a CPU-only host (232 passed, none failed, where the branch had 141 failing), and a guarded reply still gets the same loop guard. |
bertholomus
added a commit
that referenced
this pull request
Oct 24, 2026
….7.1) The README's fork note: v0.7.0's nine changes on the four-node branch's v0.3.1, then v0.7.1's seven (the shared DSML reader and the streamed-prose fix with #25's tests, TF_DS_PROMPT_ALIAS, the stopped-rank watch, the GPU-context stop, #14 and the test addresses), the merge of the four-node branch's v0.3.2 and the fix that keeps cache_salt on compaction notes; the two-node recipe's pool of 2,097,152 positions and its v0.7.1. NOTICE names v0.3.2's cache_salt and the DSML reader with their tests among the new files and compact_test.zig among the changed ones, and ATTRIBUTION.md's #25 row names the two commits that carry #25's tests. ATTRIBUTION.md adds two reports, @den13501's (two-node recipe issue #15: the kit rebuild's mapping error, which #14 fixes) and @plyldavid-maker's (issue #25: the ranks that waited on each other), and says what the export changed in v0.7.1's messages. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
_think_loopcallsself.tok.token_to_id("</think>")before it checks whether the guard is on, so every request makesthat call, even with the guard off (the default). The server tests'
TextTokenizerhas notoken_to_id, so everyrequest in
tests/test_cuda_server_disconnect.pynow fails before it reaches the engine, and 17 tests time out waitingfor it (
PacedEngine.held).Fix: look
</think>up only after the on / thinking / grammar / budget checks pass. A guarded reply builds thesame close sequence as before; a reply without the guard no longer touches the tokenizer.
8b1fe21tests/test_cuda_server_disconnect.pytests/test_cuda_server*.pysrc/tensorfold/cuda/server.py+4/-2.Prepared with Claude Code.