ariG23498 HF Staff commited on
Commit
9814b57
·
verified ·
1 Parent(s): f077871

Upload moonshotai_Kimi-K2-Instruct-0905_2.py with huggingface_hub

Browse files
moonshotai_Kimi-K2-Instruct-0905_2.py CHANGED
@@ -11,9 +11,8 @@
11
  # ///
12
 
13
  try:
14
- # Load model directly
15
- from transformers import AutoModelForCausalLM
16
- model = AutoModelForCausalLM.from_pretrained("moonshotai/Kimi-K2-Instruct-0905", trust_remote_code=True, torch_dtype="auto")
17
  with open('moonshotai_Kimi-K2-Instruct-0905_2.txt', 'w', encoding='utf-8') as f:
18
  f.write('Everything was good in moonshotai_Kimi-K2-Instruct-0905_2.txt')
19
  except Exception as e:
@@ -28,9 +27,8 @@ except Exception as e:
28
  with open('moonshotai_Kimi-K2-Instruct-0905_2.txt', 'a', encoding='utf-8') as f:
29
  import traceback
30
  f.write('''```CODE:
31
- # Load model directly
32
- from transformers import AutoModelForCausalLM
33
- model = AutoModelForCausalLM.from_pretrained("moonshotai/Kimi-K2-Instruct-0905", trust_remote_code=True, torch_dtype="auto")
34
  ```
35
 
36
  ERROR:
 
11
  # ///
12
 
13
  try:
14
+ import os
15
+ os.environ['HF_TOKEN'] = 'YOUR_TOKEN_HERE'
 
16
  with open('moonshotai_Kimi-K2-Instruct-0905_2.txt', 'w', encoding='utf-8') as f:
17
  f.write('Everything was good in moonshotai_Kimi-K2-Instruct-0905_2.txt')
18
  except Exception as e:
 
27
  with open('moonshotai_Kimi-K2-Instruct-0905_2.txt', 'a', encoding='utf-8') as f:
28
  import traceback
29
  f.write('''```CODE:
30
+ import os
31
+ os.environ['HF_TOKEN'] = 'YOUR_TOKEN_HERE'
 
32
  ```
33
 
34
  ERROR: