coeuslearning
commited on
Commit
•
97e2712
1
Parent(s):
d39a25b
Update app.py
Browse files
app.py
CHANGED
@@ -31,7 +31,8 @@ if not torch.cuda.is_available():
|
|
31 |
|
32 |
if torch.cuda.is_available():
|
33 |
model_id = "meta-llama/Llama-2-7b-chat-hf"
|
34 |
-
|
|
|
35 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
36 |
tokenizer.use_default_system_prompt = False
|
37 |
|
|
|
31 |
|
32 |
if torch.cuda.is_available():
|
33 |
model_id = "meta-llama/Llama-2-7b-chat-hf"
|
34 |
+
auth_token = "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"
|
35 |
+
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float16, device_map="auto", use_auth_token=auth_token)
|
36 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
37 |
tokenizer.use_default_system_prompt = False
|
38 |
|