cczhong commited on
Commit
09d6024
1 Parent(s): 859c4c1

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +10 -0
README.md ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ # how to use
2
+ need install "pip install git+https://github.com/cczhong11/AutoGPTQ" before https://github.com/PanQiWei/AutoGPTQ/pull/189 got merged
3
+ ```
4
+ from transformers import AutoTokenizer, AutoModelForCausalLM
5
+ from auto_gptq import AutoGPTQForCausalLM, BaseQuantizeConfig
6
+ quantized_model_dir = "cczhong/internlm-chat-7b-4bit-gptq"
7
+ tokenizer = AutoTokenizer.from_pretrained(quantized_model_dir, trust_remote_code=True)
8
+ model = AutoGPTQForCausalLM.from_quantized(quantized_model_dir, device="cuda:0",trust_remote_code=True)
9
+ response, history = model.chat(tokenizer, "你好", history=[])
10
+ ```