MOSS550V commited on
Commit
64a842e
·
1 Parent(s): 113828d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -129,9 +129,9 @@ def main():
129
  model_args = parser.parse_args_into_dataclasses()[0]
130
 
131
  tokenizer = AutoTokenizer.from_pretrained(
132
- model_args.model_name_or_path, trust_remote_code=True)
133
  config = AutoConfig.from_pretrained(
134
- model_args.model_name_or_path, trust_remote_code=True)
135
 
136
  config.pre_seq_len = model_args.pre_seq_len
137
  config.prefix_projection = model_args.prefix_projection
@@ -148,7 +148,7 @@ def main():
148
  new_prefix_state_dict[k[len("transformer.prefix_encoder."):]] = v
149
  model.transformer.prefix_encoder.load_state_dict(new_prefix_state_dict)
150
  else:
151
- model = AutoModel.from_pretrained(model_args.model_name_or_path, config=config, trust_remote_code=True)
152
 
153
  if model_args.quantization_bit is not None:
154
  print(f"Quantized to {model_args.quantization_bit} bit")
 
129
  model_args = parser.parse_args_into_dataclasses()[0]
130
 
131
  tokenizer = AutoTokenizer.from_pretrained(
132
+ "THUDM/chatglm-6b-int4", trust_remote_code=True)
133
  config = AutoConfig.from_pretrained(
134
+ "MOSS550V/divination", trust_remote_code=True)
135
 
136
  config.pre_seq_len = model_args.pre_seq_len
137
  config.prefix_projection = model_args.prefix_projection
 
148
  new_prefix_state_dict[k[len("transformer.prefix_encoder."):]] = v
149
  model.transformer.prefix_encoder.load_state_dict(new_prefix_state_dict)
150
  else:
151
+ model = AutoModel.from_pretrained("THUDM/chatglm-6b-int4", config=config, trust_remote_code=True)
152
 
153
  if model_args.quantization_bit is not None:
154
  print(f"Quantized to {model_args.quantization_bit} bit")