Skip to content

fix: harden quantized vision parameter loading - #2682

Merged
inureyes merged 3 commits into
mainfrom
fix/issue-2676-quantized-vision-weights
Oct 27, 2026
Merged

inureyes merged 3 commits into
mainfrom
fix/issue-2676-quantized-vision-weights

Conversation

@inureyes

@inureyes inureyes commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Summary

Vision/VLM loaders now recognize quantization sidecars for every Group A/B/C parameter in #2676. Row lookups use UnifiedEmbedding; whole-array consumers dequantize once at load. Shape, dtype, sidecar, packing, mode, and backend checks reject malformed inputs before MLX FFI calls while preserving dense values.

The change includes sidecar-preserving remaps, metadata propagation, both valid Moondream position-table ranks, regression tests, and model-porting guidance. Implementation, security, performance, and finalization reviews found no remaining introduced blockers.

Validation

  • Thirteen real checkpoints load and generate, including Moondream2 and Gemma4 assistant through text MTP.
  • Greedy outputs match exactly: HunyuanOCR 64 tokens, Gemma4 9 tokens (64-token limit).
  • Both 64-position image traces are identical: top-1 disagreement 0/64; decided disagreement 0/16 and 0/28 at gap >= 2; recorded logit delta 0.
  • Restoring the old packed-as-dense behavior caused ten safe regression-test failures; the implementation was then restored.
  • Workspace/all-target clippy and formatting pass. The serialized workspace gate reports 14,193 passes, 455 ignored, and two unrelated failures: unchanged server read-only-field fixture coverage and Step3p7 text batching. The Step3p7 failure also reproduces on isolated baseline ffea9111; no numerical tolerance was changed.

Final code was validated after integrating main b4cdf023. Corpus, traces, and results are in benchmarks/issue-2676/; English/Korean reports are in TECHNICAL_REPORTS/2682-*.

Closes #2676

@inureyes inureyes added status:in-progress Currently being worked on type:bug Bug fixes, error corrections, or issue resolutions priority:low Low priority area:models Model architectures, weights, loading, metadata status:review Under review and removed status:in-progress Currently being worked on labels Oct 27, 2026
Bring in the merged runtime-settings schema fix and concurrent runtime changes before validating the quantized vision loaders against the current base. Preserve the issue-specific loader changes and user-owned files.

Refs #2676, #2681.
Preserve the fixed image continuation corpus, before/after logit traces, and final checkpoint results for the quantization-aware vision loaders. Record review decisions and the two unrelated baseline test failures without changing their numerical criteria.

The integrated release passes all 13 checkpoint smokes, with identical HunyuanOCR and Gemma4 greedy outputs and logit traces. Workspace clippy and formatting pass; the serial workspace gate reports 14,193 passes and two baseline failures.

Refs #2676, #2682.
@inureyes inureyes added status:done Completed and removed status:review Under review labels Oct 27, 2026
@inureyes
inureyes merged commit cfa14e7 into main Oct 27, 2026
31 checks passed
@inureyes
inureyes deleted the fix/issue-2676-quantized-vision-weights branch October 27, 2026 09:56
@inureyes inureyes added this to the 0.8 milestone Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:models Model architectures, weights, loading, metadata priority:low Low priority status:done Completed type:bug Bug fixes, error corrections, or issue resolutions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(vision): load embedding tables and learned parameters through a quantization-aware path

1 participant