Upload tencent_Hunyuan-7B-Instruct_0.py with huggingface_hub
Browse files
tencent_Hunyuan-7B-Instruct_0.py
CHANGED
@@ -20,6 +20,10 @@ try:
|
|
20 |
{"role": "user", "content": "Who are you?"},
|
21 |
]
|
22 |
pipe(messages)
|
|
|
|
|
|
|
|
|
23 |
with open('tencent_Hunyuan-7B-Instruct_0.txt', 'w') as f:
|
24 |
f.write('Everything was good in tencent_Hunyuan-7B-Instruct_0.txt')
|
25 |
except Exception as e:
|
|
|
20 |
{"role": "user", "content": "Who are you?"},
|
21 |
]
|
22 |
pipe(messages)
|
23 |
+
|
24 |
+
# Load model directly
|
25 |
+
from transformers import AutoModelForCausalLM
|
26 |
+
model = AutoModelForCausalLM.from_pretrained("tencent/Hunyuan-7B-Instruct", torch_dtype="auto"),
|
27 |
with open('tencent_Hunyuan-7B-Instruct_0.txt', 'w') as f:
|
28 |
f.write('Everything was good in tencent_Hunyuan-7B-Instruct_0.txt')
|
29 |
except Exception as e:
|