Repository navigation
Read the dtype from text_config in convert_ggml_to_int8.py - #2946
Conversation
Multimodal configs such as GLM-5.3-Flash's keep dtype only in text_config, so the converter failed with KeyError: 'torch_dtype'. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Keval Morabia <28916987+kevalmorabia97@users.noreply.github.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
meenchen
left a comment
There was a problem hiding this comment.
Bot review (gpt-6.1-sol) — DM the bot to share feedback.
Approve: the fallback preserves top-level dtype precedence and fixes text-only dtype lookup, with a regression test checking the converted scale precision.
No action needed.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2946 +/- ##
=======================================
Coverage 79.67% 79.67%
=======================================
Files 659 659
Lines 74466 74466
=======================================
Hits 59331 59331
Misses 15135 15135
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
What does this PR do?
Type of change: Bug fix
convert_ggml_to_int8.py(#2903) read the scale dtype from the top-leveldtype/torch_dtypeofconfig.json. Multimodal configs such as GLM-5.3-Flash's keep it only intext_config, so converting a GGML export of GLM-5.3-Flash failed withKeyError: 'torch_dtype'. The converter now falls back totext_config.Usage
Unchanged:
Testing
test_dtype_is_read_from_text_configintests/examples/hf_ptq/test_convert_ggml_to_int8.pymoves the tiny export's dtype intotext_configand converts it. It fails on main withKeyError: 'torch_dtype'and passes with the fix. All 4 tests in the file pass locally (the new one runs in 0.2 s).Before your PR is "Ready for review"
CONTRIBUTING.md: N/AAdditional Information
Follow-up to #2903.
🤖 Generated with Claude Code
Summary by CodeRabbit