Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 7 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,7 @@ and [fbaldassarri](https://huggingface.co/fbaldassarri). For usage instructions,
all bits other than 3 bits. Example
models: [Intel/Qwen3-235B-A22B-q2ks-mixed-AutoRound](https://huggingface.co/Intel/Qwen3-235B-A22B-q2ks-mixed-AutoRound)
and [Intel/DeepSeek-R1-0528-q2ks-mixed-AutoRound](https://huggingface.co/Intel/DeepSeek-R1-0528-q2ks-mixed-AutoRound). **A more advanced algorithm** tailored for specific configurations may be available in
v0.6.2.

[2025/05] AutoRound provides some recipes for **DeepSeek-R1-0528**, please refer
to [OPEA/DeepSeek-R1-0528-int2-mixed-AutoRound](https://huggingface.co/OPEA/DeepSeek-R1-0528-int2-mixed-AutoRound) and [OPEA/DeepSeek-R1-0528-int4-AutoRound](https://huggingface.co/OPEA/DeepSeek-R1-0528-int4-AutoRound) for
more details.
v0.7.1.

[2025/05] AutoRound has been integrated into **vLLM**. You can now run models in the AutoRound format directly with
vLLM versions later than v0.85.post1.
Expand Down Expand Up @@ -121,24 +117,24 @@ Please change to `auto-round-mllm` for visual-language models (VLMs) quantizatio
auto-round \
--model Qwen/Qwen3-0.6B \
--scheme "W4A16" \
--format "auto_gptq,auto_awq,auto_round" \
--format "auto_round" \
--output_dir ./tmp_autoround
```

We offer another two configurations, `auto-round-best` and `auto-round-light`, designed for optimal accuracy and improved speed, respectively. Details are as follows.
We offer another two recipes, `auto-round-best` and `auto-round-light`, designed for optimal accuracy and improved speed, respectively. Details are as follows.
<details>
<summary>Other Recipes</summary>

```bash
## best accuracy, 3X slower, low_gpu_mem_usage could save ~20G but ~30% slower
# Best accuracy, 3X slower, low_gpu_mem_usage could save ~20G but ~30% slower
auto-round-best \
--model Qwen/Qwen3-0.6B \
--scheme "W4A16" \
--low_gpu_mem_usage
```

```bash
## light accuracy, 2-3X speedup, slight accuracy drop at W4 and larger accuracy drop at W2
# 2-3X speedup, slight accuracy drop at W4 and larger accuracy drop at W2
auto-round-light \
--model Qwen/Qwen3-0.6B \
--scheme "W4A16"
Expand All @@ -147,7 +143,7 @@ auto-round-light \

<!-- ```bash
auto-round-fast \
## fast and low memory, 2-3X speedup, slight accuracy drop at W4G128
# Fast and low memory, 2-3X speedup, slight accuracy drop at W4G128
--model Qwen/Qwen3-0.6B \
--bits 4 \
--group_size 128 \
Expand Down Expand Up @@ -176,10 +172,8 @@ ar = AutoRound(model_name_or_path, scheme="W4A16")
# Faster quantization (2–3× speedup) with slight accuracy drop at W4G128.
# ar = AutoRound(model_name_or_path, nsamples=128, iters=50, lr=5e-3)

# Save quantized model
output_dir = "./tmp_autoround"
# Supported formats: "auto_round" (default), "auto_gptq", "auto_awq", "llm_compressor", "gguf:q4_k_m", etc.
ar.quantize_and_save(output_dir, format="auto_round")
ar.quantize_and_save(output_dir="./tmp_autoround", format="auto_round")
```

<details>
Expand Down
3 changes: 3 additions & 0 deletions auto_round/schemes.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ def is_preset_scheme(name: str) -> bool:
"data_type": "mx_fp",
"act_bits": 4,
"act_data_type": "mx_fp_rceil",
"act_group_size": 32,
}
)

Expand All @@ -111,6 +112,7 @@ def is_preset_scheme(name: str) -> bool:
"data_type": "mx_fp",
"act_bits": 8,
"act_data_type": "mx_fp_rceil",
"act_group_size": 32,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sym=True is also needed for mxfp/nvfp

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why? Sym vs. asym doesn’t change the quantization part. Does it matter for packing?

}
)

Expand All @@ -121,6 +123,7 @@ def is_preset_scheme(name: str) -> bool:
"data_type": "nv_fp",
"act_bits": 4,
"act_data_type": "nv_fp4_with_static_gs",
"act_group_size": 16,
}
)

Expand Down