Repository navigation
Conversation
…k their language model, Step-5 reads its tower only with --vision - Gemma 4: each shard's language_model. tensors pack into their own buffer, not the file span that holds the 31B's vision tower (0.88 GiB); the tower still loads apart with --vision. - LFM3-VL: the language model packs alone; the tower and projector no Metal kernel runs stay on disk (0.35 GiB). - Step-5: without --vision the tower and projector stay in their files and no tower is built; with it, as before.
…t loads again, still without its tower addShard selected language_model. only, so a VL checkpoint in the bare model.* namespace, which metal_weights.load accepts, lost model.embed_tokens.weight and stopped at MissingTensor. It now reads both prefixes; vision_tower. and multi_modal_projector. stay on disk as before. The device test runs a wrapped and a bare shard.
The Step-5 loader change (model.load's tower flag, addShard and its device test) returns to main's code and moves to its own branch, as asked in review. Gemma 4 and LFM3-VL are unchanged.
Since #3350, gemma4/model.zig reads each shard with addFileSplit(.., "language_model.", weights.later), so the tower is not held on main; this PR's addShard was only called by its own test. The PR now covers LFM3-VL only.
This branch has not been deployed
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.
CI for a landing train: #3420 stacked on main in that order. Nothing merges from this PR: each PR above lands on its own once this tip is green, and this PR is then closed.