You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Supports both symmetric and asymmetric quantization (1–4 bits)
23
+
- Group-wise quantization with configurable group size
24
+
- Tikhonov regularization for over-fitting (X^T X + nλI)
25
+
- Three initialization strategies: Clip-Optimize, Clip-Optimize with Error Propagation, and GPTQ
26
+
18
27
### API changes
19
28
20
29
- Made `Runner.create_quantized_model()` a public method (renamed from `_create_quantized_model`)
@@ -27,11 +36,25 @@
27
36
- Counterpart to `save_quantized_model_pt`; uses `torch.load` to restore models with custom modules
28
37
- Also available as `onecomp.load_quantized_model_pt()` convenience alias
29
38
39
+
### Bug Fix: Onebit Quantizer
40
+
41
+
- Fixed `Onebit` to declare `flag_calibration=True` and `flag_hessian=True` (`onecomp/quantizer/onebit/_onebit.py`)
42
+
- Previously, Onebit computed the Hessian internally from `input` despite declaring all flags as `False`, causing a crash when used through `quantize_without_calibration` or chunked quantization paths
43
+
- Now uses the Hessian provided by the Runner, consistent with other calibration-based quantizers (GPTQ, DBF, QUIP)
44
+
45
+
### Quantizer Signature Consistency
46
+
47
+
- Added `input=None` default to `quantize_layer` in `RTN`, `CQ`, `QBB` (`onecomp/quantizer/{rtn,cq,qbb}/`)
48
+
- Aligns with the base `Quantizer.quantize_layer(self, module, input=None, hessian=None)` signature
49
+
- Enables these quantizers to be used in `Runner(quantizers=[...])` via the chunked quantization path
50
+
- Added `input=None, hessian=None` defaults to `Onebit.quantize_layer` for the same reason
- Added `example/post_process/example_lora_sft_knowledge.py`: Knowledge injection demo — teaches the quantized model about "OneCompression" via LoRA SFT and compares generation before/after
34
56
- Added `example/post_process/onecomp_knowledge.jsonl`: Training data describing OneCompression for the knowledge injection example
57
+
- Added `example/example_jointq.py`: JointQ 4-bit (groupsize=128) quantization example with dequantized model PPL evaluation
35
58
36
59
### Documentation
37
60
@@ -53,6 +76,14 @@
53
76
- Expanded and updated unit tests for GPTQ quantizer (`tests/onecomp/quantizer/gptq/test_gptq.py`)
54
77
- Extended boundary and abnormal parameter cases; aligned with `BaseQuantizeSpec` and current GPTQ API
55
78
- Adjusted DBF and GPTQ quantizer implementations for test compatibility and consistency (`onecomp/quantizer/dbf/_dbf.py`, `onecomp/quantizer/gptq/_gptq.py`)
79
+
- Fixed and improved JointQ unit tests (`tests/onecomp/quantizer/jointq/test_jointq.py`)
80
+
- Use `compute_dequantized_weight()` instead of direct `dequantized_weight` access
81
+
- Override boundary test to use CUDA with 128×128 layers for group_size compatibility
- Improved JointQ regression test (`tests/onecomp/quantizer/jointq/test_quantize_regression.py`)
85
+
- Replaced exact tensor match with MSE-based quality check for environment portability
86
+
- Hardcoded expected MSE in helper; removed `.pth` baseline file
56
87
57
88
## [v0.4.3] 2026-03-26
58
89
@@ -224,19 +255,6 @@
224
255
- PyTorch does not yet provide wheels for Python 3.14, causing `uv sync` to fail when uv auto-selects CPython 3.14
225
256
- Updated `uv.lock` to reflect the new Python version constraint
226
257
227
-
### Bug Fix: Onebit Quantizer
228
-
229
-
- Fixed `Onebit` to declare `flag_calibration=True` and `flag_hessian=True` (`onecomp/quantizer/onebit/_onebit.py`)
230
-
- Previously, Onebit computed the Hessian internally from `input` despite declaring all flags as `False`, causing a crash when used through `quantize_without_calibration` or chunked quantization paths
231
-
- Now uses the Hessian provided by the Runner, consistent with other calibration-based quantizers (GPTQ, DBF, QUIP)
232
-
233
-
### Quantizer Signature Consistency
234
-
235
-
- Added `input=None` default to `quantize_layer` in `RTN`, `CQ`, `QBB` (`onecomp/quantizer/{rtn,cq,qbb}/`)
236
-
- Aligns with the base `Quantizer.quantize_layer(self, module, input=None, hessian=None)` signature
237
-
- Enables these quantizers to be used in `Runner(quantizers=[...])` via the chunked quantization path
238
-
- Added `input=None, hessian=None` defaults to `Onebit.quantize_layer` for the same reason
239
-
240
258
## [v0.3.7] 2026-03-16
241
259
242
260
### GPU Memory Optimization for Architecture-aware QEP
Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,7 @@ This package is currently under development (version 0) and may behave unstably.
9
9
-**Quantization Error Propagation (QEP)**: A post-training quantization method that corrects quantization errors by propagating them to subsequent layers, improving the accuracy of quantized LLMs. See [Arai & Ichikawa, NeurIPS 2025](https://openreview.net/forum?id=a3l3K9khbL) for details.
10
10
-**vLLM Plugin Integration**: Serve OneComp-quantized models with [vLLM](https://docs.vllm.ai/) via built-in plugins for DBF and Mixed-GPTQ quantization methods.
11
11
-**AutoBit**: Mixed-precision quantization with ILP-based bitwidth assignment. Automatically estimates the target bitwidth from available VRAM and assigns per-layer bitwidths to minimize quantization error under the memory budget.
12
+
-**JointQ**: Joint quantization method that optimizes weight assignments and scale parameters simultaneously for improved quantization accuracy. Supports group-wise quantization (e.g., 4-bit, groupsize=128).
12
13
-**LoRA SFT Post-Process**: Fine-tune quantized models with LoRA adapters for accuracy recovery or domain-specific knowledge injection. Supports SFT loss, teacher distillation, and intermediate block alignment.
|[llama3-8b-various/](llama3-8b-various/)| Various quantizers with default parameters (no QEP) |
27
-
28
-
## Llama-3-8B: GPTQ vs QEP+GPTQ
29
-
30
-
Comparison of GPTQ with and without QEP (Quantization Error Propagation) on [Meta-Llama-3-8B](https://huggingface.co/meta-llama/Meta-Llama-3-8B) (OneComp v0.3.7).
31
-
32
-
### Perplexity (WikiText-2, ↓ lower is better)
33
-
34
-
| bits | group_size | GPTQ | QEP+GPTQ |
35
-
|---|---|---|---|
36
-
| — | — | 6.14 (original) | 6.14 (original) |
37
-
| 4 | 128 | 12.66 |**6.66**|
38
-
| 4 | per-channel | 665.94 |**7.67**|
39
-
| 3 | 128 | 45.22 |**8.95**|
40
-
| 3 | per-channel | 1721.06 |**17.93**|
41
-
42
-
### Accuracy (0-shot, ↑ higher is better)
43
-
44
-
Values are `acc_norm` where available, `acc` otherwise (winogrande).
0 commit comments