Repository navigation
Promote generic GGUF projector cohort - #678
Merged
Merged
Conversation
Performance Comparison
|
Contributor
There was a problem hiding this comment.
Pull request overview
Promotes the “generic” llama.cpp GGUF projector cohort (adapter/mlp/resampler/ldp/ldpv2) from route stubs to exact graph import, including a new reusable three-model (decoder/vision_encoder/embedding) packaging flow with a float32 processor boundary and stricter evidence/pinning/registry enforcement.
Changes:
- Added model-agnostic projector components plus a
GenericGGUFProjectorModelthat is built as separate decoder/vision/embedding graphs. - Implemented generic mmproj parsing/mapping/shape validation and a new VLM builder route wired through the GGUF builder/arch registry.
- Exposed
image_token_idthrough the public API + CLI (including negative processor sentinels) and updated docs/census/tests accordingly.
Reviewed changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/cli_test.py | Adds CLI parsing test for negative --image-token-id sentinel. |
| src/mobius/tasks/_vision_language_3model.py | Introduces GGUFProjectorVisionLanguageTask with single-image FLOAT boundary + rank-2 features output. |
| src/mobius/tasks/init.py | Exports the new GGUF projector VLM task. |
| src/mobius/models/minicpm.py | Extends MiniCPM text model to accept inputs_embeds for decoder-from-embeds packaging. |
| src/mobius/models/gguf_projector.py | Adds generic 3-graph wrapper (decoder/vision/projector/embedding) for GGUF sidecars. |
| src/mobius/models/gguf_projector_test.py | Adds graph-build and embedding correctness tests for the new generic projector package. |
| src/mobius/models/clip.py | Tightens SigLIPVisionModel constructor typing for the config view used by sidecars. |
| src/mobius/integrations/gguf/_route_census_test.py | Updates census counts for reclassified projector routes. |
| src/mobius/integrations/gguf/_mmproj.py | Adds generic vision config extraction + tensor mapping + generic-projector VLM builder + image_token_id plumbing. |
| src/mobius/integrations/gguf/_mmproj_test.py | Adds fail-closed tests for unknown/MLP_NORM variants; updates dispatch tests for image_token_id. |
| src/mobius/integrations/gguf/_mmproj_registry.py | Promotes generic projector specs to graph-supported; adds paired-text pin metadata validation. |
| src/mobius/integrations/gguf/_mmproj_registry_test.py | Extends registry tests to assert generic projector support + evidence pin invariants. |
| src/mobius/integrations/gguf/_mmproj_mapping.py | Adds generic vision/projector-to-ONNX name mapping helpers. |
| src/mobius/integrations/gguf/_mmproj_mapping_test.py | Adds unit tests for the new generic mapping functions. |
| src/mobius/integrations/gguf/_docs.py | Expands projector evidence table (paired text + processor source) and documents image_token_id forwarding. |
| src/mobius/integrations/gguf/_docs_test.py | Adjusts doc size ceiling for updated generated docs. |
| src/mobius/integrations/gguf/_builder.py | Adds image_token_id arg, forwards it to mmproj builds, and fails if used without mmproj. |
| src/mobius/integrations/gguf/_builder_test.py | Validates image_token_id forwarding and that it requires mmproj. |
| src/mobius/integrations/gguf/_arch_registry.py | Declares vlm_builder="generic_projector" for supported text architectures. |
| src/mobius/integrations/gguf/_arch_registry_test.py | Updates expected set of exact paired builders to include the new generic projector pairings. |
| src/mobius/components/_multimodal.py | Adds reusable GGUF projector components (MLP/LDP/LDPv2/adapter/resampler). |
| src/mobius/components/_multimodal_test.py | Adds graph-shape/attribute tests for the new projector components. |
| src/mobius/components/init.py | Exposes new projector components in the public components API. |
| src/mobius/main.py | Adds --image-token-id CLI flag and forwards it to build_from_gguf. |
| docs/api/build_from_gguf.md | Regenerates docs to reflect promoted projector support and new image_token_id parameter. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
🏗️ Architecture Diff
No architecture changes detected. ✅ Legend: ⚪ No change · 🔵 Minor (attrs/inits) · 🟡 Moderate (nodes added/removed) · 🔴 Major (interface changed) |
justinchuby
force-pushed
the
justinchuby-promote-generic-gguf-projectors
branch
from
August 27, 2026 18:23
685a7e9 to
6c17770
Compare
Implement exact graph import for the adapter, MLP, resampler, LDP, and LDPv2 projector schemas pinned to llama.cpp. Add reusable projector components, three-model package routing, exact tensor closure and mapping validation, processor-owned media sentinel handling, and immutable sidecar/text/processor evidence while keeping runtime support deferred. Expose image-token overrides through the public API and CLI without changing Hugging Face revision routing. Update the generated support census and add graph, ABI, mapping, fail-closed, activation, layer-selection, and embedding runtime regressions. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 7f08e9a7-ccb3-4864-ae69-c3ef8adc53a1 Signed-off-by: Justin Chu <[email protected]>
Apply the repository Ruff formatter to the long initializer assignments reported by the pull request lint check. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 7f08e9a7-ccb3-4864-ae69-c3ef8adc53a1 Signed-off-by: Justin Chu <[email protected]>
Replace publisher-label pairing with exact structural and media-token contracts, restore MiniCPM learned query positions, and defer its fixed-size graph until the variable-image processor ABI is supported. Add independent nonzero-weight projector parity and correct immutable artifact and processor evidence. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 7f08e9a7-ccb3-4864-ae69-c3ef8adc53a1 Signed-off-by: Justin Chu <[email protected]>
Honor explicit single CLIP feature-layer metadata for legacy generic projector routes, including the final serialized block. Enforce exact media-placeholder/image-feature cardinality while retaining a safe padding row only for eager non-media gathers. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 7f08e9a7-ccb3-4864-ae69-c3ef8adc53a1 Signed-off-by: Justin Chu <[email protected]>
Update the generated route census expectations after the merged MoE cohort and retain the resolved companion-path type introduced on main. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 7f08e9a7-ccb3-4864-ae69-c3ef8adc53a1 Signed-off-by: Justin Chu <[email protected]>
justinchuby
force-pushed
the
justinchuby-promote-generic-gguf-projectors
branch
from
August 27, 2026 19:30
6c17770 to
99ff6a2
Compare
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
adapter,mlp,resampler,ldp, andldpv2GGUF projector routes to exact graph import<unk>replacement between<image>boundariesimage_token_idthrough the public API and CLI without changing Hugging Face revision routingSchema authority
Pinned llama.cpp commit:
8d9af256337d1a501250f9bbf4c0859a654bddd6.The implementation matches its legacy CLIP penultimate-layer selection, tanh-approximate GELU, LDP HardSigmoid coefficients, GLM-Edge gated SwiGLU/BOI/EOI topology, and MiniCPM learned-query resampler with generated 2D sinusoidal positions.
Validation
Runtime status
All five routes are graph-supported and runtime-deferred. No paired runtime or generation parity is claimed until the processor/runtime ABI is independently proven.