Upload DeepSeek-TNG-R1T2-Chimera with huggingface_hub
Browse files
DeepSeek-TNG-R1T2-Chimera
CHANGED
|
@@ -7,16 +7,13 @@
|
|
| 7 |
# ///
|
| 8 |
|
| 9 |
try:
|
| 10 |
-
#
|
| 11 |
-
from transformers import
|
| 12 |
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
{"role": "user", "content": "Who are you?"},
|
| 16 |
-
]
|
| 17 |
-
pipe(messages)
|
| 18 |
except Exception as e:
|
| 19 |
-
exception_file = 'tngtech_DeepSeek-TNG-R1T2-
|
| 20 |
with open(exception_file, 'w') as f:
|
| 21 |
import traceback
|
| 22 |
traceback.print_exc(file=f)
|
|
@@ -25,6 +22,6 @@ except Exception as e:
|
|
| 25 |
upload_file(
|
| 26 |
path_or_fileobj=exception_file,
|
| 27 |
repo_id='model-metadata/model-code-exception',
|
| 28 |
-
path_in_repo='09-07-25/tngtech_DeepSeek-TNG-R1T2-
|
| 29 |
repo_type='dataset',
|
| 30 |
)
|
|
|
|
| 7 |
# ///
|
| 8 |
|
| 9 |
try:
|
| 10 |
+
# Load model directly
|
| 11 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 12 |
|
| 13 |
+
tokenizer = AutoTokenizer.from_pretrained("tngtech/DeepSeek-TNG-R1T2-Chimera", trust_remote_code=True)
|
| 14 |
+
model = AutoModelForCausalLM.from_pretrained("tngtech/DeepSeek-TNG-R1T2-Chimera", trust_remote_code=True)
|
|
|
|
|
|
|
|
|
|
| 15 |
except Exception as e:
|
| 16 |
+
exception_file = 'tngtech_DeepSeek-TNG-R1T2-Chimera_1_exception.txt'
|
| 17 |
with open(exception_file, 'w') as f:
|
| 18 |
import traceback
|
| 19 |
traceback.print_exc(file=f)
|
|
|
|
| 22 |
upload_file(
|
| 23 |
path_or_fileobj=exception_file,
|
| 24 |
repo_id='model-metadata/model-code-exception',
|
| 25 |
+
path_in_repo='09-07-25/tngtech_DeepSeek-TNG-R1T2-Chimera_1_exception.txt',
|
| 26 |
repo_type='dataset',
|
| 27 |
)
|