mamkkl commited on
Commit
608fa3f
·
verified ·
1 Parent(s): e95bddb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -70,7 +70,7 @@ def generator(input_ids, generation_config, max_new_tokens):
70
  def loadModel():
71
  from llama_rope_scaled_monkey_patch import replace_llama_rope_with_scaled_rope
72
  replace_llama_rope_with_scaled_rope()
73
- base_model = transformers.AutoModelForCausalLM.from_pretrained(
74
  base_model,
75
  torch_dtype=torch.float16,
76
  cache_dir=cache_dir,
@@ -78,7 +78,7 @@ def loadModel():
78
  )
79
 
80
  model = PeftModel.from_pretrained(
81
- base_model,
82
  lora_weights,
83
  device_map="auto",
84
  cache_dir=cache_dir,
 
70
  def loadModel():
71
  from llama_rope_scaled_monkey_patch import replace_llama_rope_with_scaled_rope
72
  replace_llama_rope_with_scaled_rope()
73
+ t_model = transformers.AutoModelForCausalLM.from_pretrained(
74
  base_model,
75
  torch_dtype=torch.float16,
76
  cache_dir=cache_dir,
 
78
  )
79
 
80
  model = PeftModel.from_pretrained(
81
+ t_model,
82
  lora_weights,
83
  device_map="auto",
84
  cache_dir=cache_dir,