netrough commited on
Commit
b612298
·
1 Parent(s): 89a32e3

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +6 -3
README.md CHANGED
@@ -1,3 +1,6 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
1
+ from transformers import AutoTokenizer, AutoModelForCausalLM
2
+ from auto_gptq import AutoGPTQForCausalLM, BaseQuantizeConfig
3
+ quantized_model_dir = "cczhong/internlm-chat-7b-4bit-gptq"
4
+ tokenizer = AutoTokenizer.from_pretrained(quantized_model_dir, trust_remote_code=True)
5
+ model = AutoGPTQForCausalLM.from_quantized(quantized_model_dir, device="cuda:0",trust_remote_code=True)
6
+ response, history = model.chat(tokenizer, "你好", history=[])