ariG23498 HF Staff commited on
Commit
ebd3856
·
verified ·
1 Parent(s): 97e52b9

Upload DeepSeek-TNG-R1T2-Chimera_1.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. DeepSeek-TNG-R1T2-Chimera_1.py +27 -0
DeepSeek-TNG-R1T2-Chimera_1.py ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # /// script
2
+ # requires-python = ">=3.12"
3
+ # dependencies = [
4
+ # "transformers",
5
+ # "torch",
6
+ # ]
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)
20
+ # Upload exception log to HuggingFace
21
+ from huggingface_hub import upload_file
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
+ )