feat: add support for multimodal projector in GGUF model building#826
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces support for multimodal projectors in GGUF models by updating the build pipeline to handle optional mmproj files and include them as specific layers in the model artifact. Comprehensive tests have been added to verify the manifest generation with and without these projectors. I have no feedback to provide.
Contributor
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- In
buildGGUFModelV01, failing hard whenmmprojFileis non-nil but missing fromlocalPathsmay be brittle for partially downloaded repos; consider either validating earlier (wheremmprojFileis discovered) or gracefully skipping the projector with a logged warning instead of returning an error. - The tests for
buildGGUFModelV01only assert that aMediaTypeMultimodalProjectorlayer exists or not; consider also asserting that the projector layer corresponds to the expected file (e.g., by checking annotations or layer count/ordering) to catch wiring mistakes betweenmmprojFileand the builder.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In `buildGGUFModelV01`, failing hard when `mmprojFile` is non-nil but missing from `localPaths` may be brittle for partially downloaded repos; consider either validating earlier (where `mmprojFile` is discovered) or gracefully skipping the projector with a logged warning instead of returning an error.
- The tests for `buildGGUFModelV01` only assert that a `MediaTypeMultimodalProjector` layer exists or not; consider also asserting that the projector layer corresponds to the expected file (e.g., by checking annotations or layer count/ordering) to catch wiring mistakes between `mmprojFile` and the builder.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
ericcurtin
approved these changes
Apr 3, 2026
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.
Include mmproj file when building a model from Hugging Face.
fixes #822