Repository navigation
SL-47: SharpAI model overlays for 127 missing or partial model_types - #102
Merged
Merged
Conversation
Adds 127 fork-only model implementations under Libraries/MLXLLM/SharpAI (LLM) and Libraries/MLXVLM/SharpAI (VLM) with per-model configuration, sanitize and registration code, plus 453 test files under Tests/MLXLMTests/SharpAI. Each model carries its own Configuration, a SharpAI-prefixed type set and a <Name>Overlay.creators dictionary. Nothing is registered with LLMModelFactory or VLMModelFactory in this change: the overlays are inert until SL-50 (LLM) wires them with upstream-wins semantics, and SL-51 (VLM, which also needs processors). Validation so far: a full-tree debug build with all SharpAI tests green (430 classes, 2350 cases) before rebasing, and a release build plus --no-parallel run of this tree together with the SL-50 wiring on main 5cbd33a, whose only failure is the pre-existing GatedDeltaTests.testGatedDeltaFastPathKeepsDecayNearOneInFloat32. This tree on its own has not been built in release; the CI on the pull request is the first run of it. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…'s mlx-swift The SwiftLM umbrella build (Test with SwiftLM) pins an older mlx-swift where 'MLXArray * Float' and a mixed Float expression feeding an MLXArray product do not type-check: SharpAIDoryModel.swift:158-159 and SharpAIHyV4Attention.swift:95. Use explicit MLXArray scalars; the arithmetic is unchanged (all float32). Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Fixes the findings from the static review of the 127 overlay models that can be shown from this repository alone. 34 findings are fixed, each with a test that fails before the change. Blockers: - BailingHybrid: LightningAttention slope is no longer a required parameter (`_slope`). - BailingHybrid: sanitize now stacks expert weights into switch_mlp and splits kv_b_proj into embed_q / unembed_out. The target key names are not checked against a real checkpoint. - Openvla: DINOv2 pos_embed has no class slot and is added to the patch tokens only. Majors include duplicate @ModuleInfo keys (Glm5Next), sliding-window caches (CohereCompass, Kolibri1), rotary pairing (HunyuanVl, LlavaOnevision2), quantized-cache traps (Flint, GraniteSwa, GranitemoeSwa), batched deepstack (Colqwen3), router weights (DeepseekV3Bidirec), and several sanitizers. Not changed (8): findings that depend on the original Python/HF model or need a large port. They are listed in docs, not in this commit. Tests: all XCTest classes in the touched model directories pass (109 classes, 597 cases). Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
solderzzc
added a commit
that referenced
this pull request
Nov 1, 2026
SL-55/56: fix deferred major and minor review findings from #102 (43 of 47)
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.
What
Adds 127 fork-only model implementations (LLM under
Libraries/MLXLLM/SharpAI, VLM underLibraries/MLXVLM/SharpAI), each with its own Configuration, sanitize and<Name>Overlay.creators, plus 453 test files underTests/MLXLMTests/SharpAI. 1050 files, +120,811 lines, additions only: no existing file is modified.Inert on purpose
Nothing is registered with
LLMModelFactoryorVLMModelFactoryhere, so runtime behaviour does not change. Wiring is split out:LLMModelFactory, upstream-wins, plus an air-gapped synthetic-weights load test for all 37 wired keys. Opened as a follow-up PR on top of this one.Scope guarantees
.github/workflowsorPackage.swift.SharpAIprefix so an upstream model of the same name cannot collide (seescripts/conformance/upstream/UPSTREAM_WATCH.md).Validation so far
5cbd33a, this tree together with the SL-50 wiring: release build OK;swift test -c release --no-parallelhas one failure, the pre-existingGatedDeltaTests.testGatedDeltaFastPathKeepsDecayNearOneInFloat32(0.0014360338 not less than 0.001). SpeculativeDecodingTests, Gemma4Tests and PerformanceRegressionTests pass.Review
Independent adversarial review covered the SL-50 wiring commit (5 dimensions, findings verified by a second agent). The 127 model implementations themselves have had no independent line-by-line review; their gate is the per-model tests plus this CI.
🤖 Generated with Claude Code