Fix Gemma 4 session cache across rewritten conversation turns - #283
Open
TipKnuckle wants to merge 1 commit into
Open
Fix Gemma 4 session cache across rewritten conversation turns#283TipKnuckle wants to merge 1 commit into
TipKnuckle wants to merge 1 commit into
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
reasoning_contentusing its native channel markers, so echoed assistant history retokenizes to the committed streamVerification
python -m pytest tests/test_no_mlx_imports.py tests/test_public_cli.py tests/test_runtime_kpis.py— 268 passedpython -m build— sdist and wheel built successfullyscripts/fresh_venv_smoke.sh— passedgit diff --check— passedpython -m pytest -q— only five pre-existing exact-float failures intests/test_graphbank_compiled_verify.py; the same five failures reproduce from clean upstream commitf52f9beBenchmark Evidence
Measured 2026-08-17 on commit
a233e9a:sustainedprofile, MTP generation, reasoning on, SSD session cache off, default Apple fan control<memory_context>, echoes assistantreasoning_contentpluscontent, and injects a new memory block on the current user turnThe rewritten warm turn was 4.9x faster end-to-end than cold; the exact repeat was 6.44x faster. The complete returned message, including both
reasoning_contentand visiblecontent, matched the cold control exactly in both warm cases.