Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -27,8 +27,8 @@ from transformers import AutoModelForCausalLM, AutoTokenizer
|
|
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 |
-
|
31 |
-
|
32 |
|
33 |
newtokenizer = AutoTokenizer.from_pretrained(config.base_model_name_or_path,
|
34 |
use_auth_token="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")
|
|
|
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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")
|