Repository navigation
add ScriptedLogitsModel - #719
Merged
Merged
Conversation
- this model has a ScriptedScenario (containing a Transcript) - the Transcript gives the turns to be taken - this wraps an inner model that provides realistic (real actually) KVCache behavior
nwh
approved these changes
Oct 23, 2026
wballard
added a commit
to swissarmyhammer/mlx-swift-lm-old
that referenced
this pull request
Oct 24, 2026
Apply the upstream commits d02948b..991266a as a 3-way patch. CLAUDE.md is excluded. - 649f431 update for new TF32 comparison issues (ml-explore#721) - 5ae2635 switch to MLXLogger (ml-explore#702) - 260ada0 add ScriptedLogitsModel (ml-explore#719) - 0ea4465 MLXVLM: Fix Qwen3VL attention masks after cache rotation (ml-explore#706) - db2e7bf Expose request-scoped generation observations in ChatSession (ml-explore#714) - 991266a Clear the MLX buffer cache after each prefill chunk (ml-explore#710) Conflicts: - Package.swift: both sides add the same README exclude; kept ours. - ChatSession.swift: took upstream's transformer-based startGeneration and dropped the GenerationRun struct. Kept the fork's ReasoningHistory and thinkingEnabled capture. startGeneration takes an optional promptTokenCount, so the default path still counts the leading and checkpoint prefill tokens. No new hybrid or recurrent models, so the post-merge ArraysCache.advance checks do not apply. Tests: MLXLMTests 894 XCTest and 1753 Swift Testing tests pass. MLXGuidedGenerationTests 70, MLXFoundationModelsTests 374, CXGrammarTests 7, MLXHuggingFaceMacrosTests 5 pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Proposed changes
This allows developers to write tests like this:
This wraps a real gemma3 model that does real KVCache work, but doesn't require any weight downloads.
Checklist
Put an
xin the boxes that apply.pre-commit run --all-filesto format my code / installed pre-commit prior to committing changesAI usage
accurately describes the code changes.