lucas-w commited on
Commit
bcad892
Β·
1 Parent(s): e5cdfca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -25,13 +25,15 @@ from transformers import AutoModelForCausalLM, AutoTokenizer
25
  # ##### ##### ##### ##### #####
26
 
27
  peft_model_id = "charansr/llama2-7b-chat-hf-therapist"
 
28
  config = PeftConfig.from_pretrained(peft_model_id,
29
- use_auth_token="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")
 
30
  newmodel = AutoModelForCausalLM.from_pretrained(config.base_model_name_or_path, return_dict=True, load_in_8bit=True, device_map='auto',
31
  use_auth_token="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")
32
 
33
  newtokenizer = AutoTokenizer.from_pretrained(config.base_model_name_or_path,
34
- use_auth_token="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")
35
 
36
  # Load the Lora model
37
  newmodel = PeftModel.from_pretrained(newmodel, peft_model_id,
 
25
  # ##### ##### ##### ##### #####
26
 
27
  peft_model_id = "charansr/llama2-7b-chat-hf-therapist"
28
+
29
  config = PeftConfig.from_pretrained(peft_model_id,
30
+ use_auth_token="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", load_in_8bit=True, device_map='auto',)
31
+
32
  newmodel = AutoModelForCausalLM.from_pretrained(config.base_model_name_or_path, return_dict=True, load_in_8bit=True, device_map='auto',
33
  use_auth_token="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")
34
 
35
  newtokenizer = AutoTokenizer.from_pretrained(config.base_model_name_or_path,
36
+ use_auth_token="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", load_in_8bit=True, device_map='auto',)
37
 
38
  # Load the Lora model
39
  newmodel = PeftModel.from_pretrained(newmodel, peft_model_id,