PTQ-Level Efficiency, QAT-Level Accuracy | 训练后量化的效率,量化感知训练的精度
fix eval bug of autogptq model (#72)
yintong-lub22f6aad17c9
diff --git a/examples/language-modeling/eval/evaluation.py b/examples/language-modeling/eval/evaluation.pyindex 6681607a5..adc6bdef3 100644--- a/examples/language-modeling/eval/evaluation.py+++ b/examples/language-modeling/eval/evaluation.py@@ -363,6 +363,8 @@ def eval_model(model_path, tasks=["lambada_openai", "hellaswag", "winogrande", "for shot in num_fewshot:model_type = "hf"model_args = f'pretrained={model_path},tokenizer={model_path},dtype={dtype},trust_remote_code=True'+ if 'gpu' in model_path:+ model_args = f'pretrained={model_path},tokenizer={model_path},dtype={dtype},autogptq=True,gptq_use_triton=True,trust_remote_code=True'if use_accelerate: # bool(re.search("chatglm", model_path.lower()))model_args += f',parallelize=True'