Skip to content

[MODEL] add HunyuanOCR quantization support - #3030

Open
ZX-ModelCloud wants to merge 1 commit into
mainfrom
feat/hunyuan-ocr
Open

[MODEL] add HunyuanOCR quantization support#3030
ZX-ModelCloud wants to merge 1 commit into
mainfrom
feat/hunyuan-ocr

Conversation

@ZX-ModelCloud

@ZX-ModelCloud ZX-ModelCloud commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • register native hunyuan_vl checkpoints with a dedicated HunyuanOCR quantization definition
  • quantize the language backbone while keeping the vision tower, embeddings, norms, and rotary module in their source dtype
  • build multimodal calibration inputs through the processor's official chat template and OCR prompt
  • canonicalize lazy checkpoint materialization devices and pass explicit module paths
  • preserve nested multimodal RoPE parameters across config normalization and save/reload
  • add focused adapter, calibration, config-regression, and ModelTest coverage, and document HunyuanOCR support

Validation

  • pytest -q tests/test_hf_config_compat.py tests/test_hunyuan_ocr_support.py tests/models/test_hunyuan_ocr.py::test_prepare_hunyuan_ocr_dataset_reuses_shared_dataset
  • focused Ruff, format, compile, and git diff --check validation
  • fast and full HunyuanOCR ModelTest quantize/save/reload/evaluation paths
  • real-image OCR generation after loading the saved quantized checkpoint with BACKEND.AUTO

@ZX-ModelCloud ZX-ModelCloud changed the title feat: add HunyuanOCR quantization support [MODEL] add HunyuanOCR quantization support Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant