Add reference low-bit quantizers and physical-cost model (CAP3-01, SLM-90)#338
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
Next review available in: 37 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (14)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
9197057 to
fef03b1
Compare
…M-90)
An architecture-agnostic reference quantization package (operates on generic
nn.Linear via named_modules) plus a physical-cost ledger, registered into
TwoTower behind a disabled-by-default quant_format config.
- models/quantization/{formats,fake_quant,observers,convert,diagnostics,
cost,__init__}.py: low-bit formats, fake-quant + observers, converter,
diagnostics, and a physical-cost model.
- twotower.py / model_build/{config,factory}.py: additive default-off
quant_format field + apply_quant_format (lazy-imports the package); old
configs/checkpoints load unchanged.
- scripts/inspect_quantization.py + torch-gated tests (importorskip) + design
doc + results.
No-new-breakage verified against a clean-main baseline (identical failure
sets). Mechanism increment — no model trained, no ship/speedup/quality claim.
Torch tests run in CI.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017NWyjZwGMUPHXZhtqQVzUJ
6623512 to
82b0ecd
Compare
CAP3-01 (SLM-90): reference low-bit quantizers and physical-cost model
An architecture-agnostic reference quantization package + physical-cost ledger, registered into TwoTower behind a disabled-by-default
quant_formatconfig.What's here (14 files, additive, on current
main)models/quantization/—formats.py(low-bit formats, torch-free),fake_quant.py,observers.py,convert.py(walksnamed_modules()fornn.Linear— no TwoTower coupling),diagnostics.py,cost.py(physical-cost model),__init__.py.twotower.py/model_build/{config,factory}.py— additive default-offquant_formatfield +apply_quant_format(lazy-imports the package, matching main's lazy-torch pattern); old configs/checkpoints load unchanged.scripts/inspect_quantization.py+tests/test_models/test_quantization.py(torch-gated,importorskip) + design doc + results JSON.Dropped the branch's arity re-implementation and misc clobbers; the retired arity stub is not reintroduced.
Verification
mainbaseline:tests/test_harnesses/model_buildfailing/error IDs byte-identical (the 14 are pre-existing torch-env collection issues); +1 correct skip (test_quantizationgating on torch).ruff/repo_policy/compileall/git diff --checkclean. The quantization modules +test_quantizationrun in CI (torch installed).Honesty
Additive/default-off registration; no ship gate or test weakened. Mechanism increment (reference quantizers + physical-cost ledger) — no model trained, no ship/speedup/quality claim.
🤖 Generated with Claude Code