fb700 commited on
Commit
8fdc516
·
1 Parent(s): 1b1cd6e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -59,7 +59,7 @@ import sys
59
  from peft import PeftModel
60
  from transformers import AutoModel, AutoTokenizer
61
  sys.path.append('..')
62
- model = AutoModel.from_pretrained("THUDM/chatglm-6b", trust_remote_code=True, device_map='auto')
63
  model = PeftModel.from_pretrained(model, "model/chatglm_fitness_lora")#"model/chatglm_fitness_lora"为您下载本项目压缩包后,解压后本地lora目录
64
  model = model.half().cuda() # fp16
65
  tokenizer = AutoTokenizer.from_pretrained("THUDM/chatglm-6b", trust_remote_code=True)
@@ -125,7 +125,7 @@ import sys
125
  from peft import PeftModel
126
  from transformers import AutoModel, AutoTokenizer
127
  sys.path.append('..')
128
- model = AutoModel.from_pretrained("fb700/chatglm-fitness-RLHF", trust_remote_code=True, device_map='auto')#fb700/chatglm-fitness-RLHF为hg自动下载地址,如已经自行下载请替换
129
  #model = PeftModel.from_pretrained(model, "model/chatglm_fitness_lora") # lora文件保存目录
130
  model = model.half().quantize(4).cuda() # int4
131
  #model = model.half().quantize(8).cuda() # int8
 
59
  from peft import PeftModel
60
  from transformers import AutoModel, AutoTokenizer
61
  sys.path.append('..')
62
+ model = AutoModel.from_pretrained("THUDM/chatglm-6b", device_map='auto')
63
  model = PeftModel.from_pretrained(model, "model/chatglm_fitness_lora")#"model/chatglm_fitness_lora"为您下载本项目压缩包后,解压后本地lora目录
64
  model = model.half().cuda() # fp16
65
  tokenizer = AutoTokenizer.from_pretrained("THUDM/chatglm-6b", trust_remote_code=True)
 
125
  from peft import PeftModel
126
  from transformers import AutoModel, AutoTokenizer
127
  sys.path.append('..')
128
+ model = AutoModel.from_pretrained("fb700/chatglm-fitness-RLHF", device_map='auto')#fb700/chatglm-fitness-RLHF为hg自动下载地址,如已经自行下载请替换
129
  #model = PeftModel.from_pretrained(model, "model/chatglm_fitness_lora") # lora文件保存目录
130
  model = model.half().quantize(4).cuda() # int4
131
  #model = model.half().quantize(8).cuda() # int8