Preserve model EOS and chat-template defaults - #128
Merged
Conversation
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.
Summary
generation_config.eos_token_idvalue instead of replacing it with the tokenizer's single primary EOS iddefault_chat_template_kwargsinto chat rendering</assistant>and cover the assistant-boundary contract with regressions0.0.9and document the release in the READMERoot cause
Laguna S 2.1 declares EOS ids
[2, 24]; token 24 is</assistant>, while the tokenizer's primaryeos_token_idis only 2. Evalution replaced the model value with the tokenizer value and rebuilt continuous-generation configuration frommodel.config, discarding both the assistant-boundary EOS anddefault_chat_template_kwargs={"enable_thinking": true}. GSM8K also lacked the textual assistant boundary in its stop list.Tokenicer already loads the checkpoint correctly:
</assistant>encodes to[24], and its clean main suite passes. The reusable fix therefore belongs in Evalution's transformer generation contract rather than Tokenicer.Validation
CUDA_VISIBLE_DEVICES=2,3 PYTHON_GIL=0 pytest -q -m 'not integration'— 741 passed, 274 deselectedPYTHON_GIL=0 pytest -q tests/test_transformer.py tests/test_gsm8k.py tests/test_gsm8k_platinum.py— 86 passedruff checkon all changed files — passedgit diff --check— passedpytest -q tests/test_package.py tests/test_startup_banner.py— 10 passedpython -m build --wheel— builtevalution-0.0.9-py3-none-any.whlwith packaged version0.0.9v0.0.14) full suite — 468 passed, 4 skipped[2, 24], assistant token[24], GSM8K stop contains</assistant>, prompt ends in<assistant><think>Companion GPTQModel loader/evaluation fix: ModelCloud/GPTQModel#2961