Skip to content

PTQ-Level Efficiency, QAT-Level Accuracy | 训练后量化的效率,量化感知训练的精度

update readme

wenhuach214f6c7c56cdb9
diff --git a/README.md b/README.md
index 3382ea9db..d3a42a3bd 100644
--- a/README.md
+++ b/README.md
@@ -44,7 +44,7 @@ autoround.quantize()
# Intel CPU Inference, Currently, llama, bloom, and mistral are supported.
output_dir = "/path/to/quantized_model"
autoround.export(output_dir)
-# then follow ITREX to load the model and do inference
+# then follow ITREX(https://github.com/intel/intel-extension-for-transformers/tree/main/intel_extension_for_transformers/llm/runtime/neural_speed) to load the model and do inference
```
@@ -65,7 +65,7 @@ autoround.quantize()
# Intel CPU Inference, Currently, llama, bloom, and mistral are supported.
output_dir = "/path/to/quantized_model"
autoround.export(output_dir)
-# then follow ITREX to load the model and do inference
+# then follow ITREX(https://github.com/intel/intel-extension-for-transformers/tree/main/intel_extension_for_transformers/llm/runtime/neural_speed) to load the model and do inference
```
@@ -333,7 +333,7 @@ For wikitext2/ptb-new/c4-new ppl, we follow the code of gptq and set the sequenc
We provide a [comprehensive analysis](docs/README.md) with other methods in our accuracy data section. Notably, our approach has outperformed GPTQ with a score of 30/32 and AWQ with a score of 27/32 across llamv1/llamav2/mistral-7b on W4G-1, W4G128, W3G128, W2G128. And the tuning costs are comparable.
## Tips
-1 Consider increasing tuning steps to achieve better results, albeit with increased tuning time.
+1 Consider increasing tuning steps to achieve better results, albeit with increased tuning time. Additionally, setting 'use_quant_input' to False or adjusting 'minmax_lr' to 2.0/iters has been observed to occasionally yield improved results.
2 Leverage AutoGPTQ to run the model on GPU
diff --git a/docs/README.md b/docs/acc.md
similarity index 100%
rename from docs/README.md
rename to docs/acc.md
diff --git a/examples/language-modeling/main.py b/examples/language-modeling/main.py
index 917f0b0df..63b773863 100644
--- a/examples/language-modeling/main.py
+++ b/examples/language-modeling/main.py
@@ -177,7 +177,7 @@ if __name__ == '__main__':
seed=args.seed, gradient_accumulate_steps=args.gradient_accumulate_steps, scale_dtype=args.scale_dtype) ##TODO args pass
model, q_config = autoround.quantize()
model_name = args.model_name.rstrip("/")
- export_dir = args.output_dir + "/" + model_name.split('/')[-1] + "-autoround-int4"
+ export_dir = args.output_dir + "/" + model_name.split('/')[-1] + f"-autoround-w{args.bits}g{args.group_size}"
if args.deployment_device == 'cpu':
autoround.export(output_dir=export_dir)
del q_config