FINGU-AI commited on
Commit
46bc0ec
1 Parent(s): 5e3afc2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -22,6 +22,7 @@ peft_model_id = "Imran1/Llama3.1_8b_Dora"
22
  #attn_implementation="flash_attention_2",
23
  model = AutoModelForCausalLM.from_pretrained(model_id, attn_implementation="sdpa", torch_dtype= torch.bfloat16)
24
  model.load_adapter(peft_model_id)
 
25
  tokenizer = AutoTokenizer.from_pretrained(peft_model_id)
26
  # streamer = TextStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True)
27
  model.to('cuda')
 
22
  #attn_implementation="flash_attention_2",
23
  model = AutoModelForCausalLM.from_pretrained(model_id, attn_implementation="sdpa", torch_dtype= torch.bfloat16)
24
  model.load_adapter(peft_model_id)
25
+ model.enable_adapters()
26
  tokenizer = AutoTokenizer.from_pretrained(peft_model_id)
27
  # streamer = TextStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True)
28
  model.to('cuda')