Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -14,13 +14,13 @@ import torch
|
|
14 |
from peft import PeftModel, PeftConfig
|
15 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
16 |
|
17 |
-
huggingface-cli login
|
18 |
-
|
19 |
# ##### ##### ##### ##### #####
|
20 |
|
21 |
peft_model_id = "charansr/llama2-7b-chat-hf-therapist"
|
22 |
config = PeftConfig.from_pretrained(peft_model_id)
|
23 |
-
newmodel = AutoModelForCausalLM.from_pretrained(config.base_model_name_or_path, return_dict=True, load_in_8bit=True, device_map='auto'
|
|
|
|
|
24 |
newtokenizer = AutoTokenizer.from_pretrained(config.base_model_name_or_path)
|
25 |
|
26 |
# Load the Lora model
|
|
|
14 |
from peft import PeftModel, PeftConfig
|
15 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
16 |
|
|
|
|
|
17 |
# ##### ##### ##### ##### #####
|
18 |
|
19 |
peft_model_id = "charansr/llama2-7b-chat-hf-therapist"
|
20 |
config = PeftConfig.from_pretrained(peft_model_id)
|
21 |
+
newmodel = AutoModelForCausalLM.from_pretrained(config.base_model_name_or_path, return_dict=True, load_in_8bit=True, device_map='auto',
|
22 |
+
token="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")
|
23 |
+
|
24 |
newtokenizer = AutoTokenizer.from_pretrained(config.base_model_name_or_path)
|
25 |
|
26 |
# Load the Lora model
|