Upload stepfun-ai_step3_0.py with huggingface_hub
Browse files- stepfun-ai_step3_0.py +4 -0
stepfun-ai_step3_0.py
CHANGED
|
@@ -26,6 +26,10 @@ try:
|
|
| 26 |
},
|
| 27 |
]
|
| 28 |
pipe(text=messages)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
with open('stepfun-ai_step3_0.txt', 'w') as f:
|
| 30 |
f.write('Everything was good in stepfun-ai_step3_0.txt')
|
| 31 |
except Exception as e:
|
|
|
|
| 26 |
},
|
| 27 |
]
|
| 28 |
pipe(text=messages)
|
| 29 |
+
|
| 30 |
+
# Load model directly
|
| 31 |
+
from transformers import AutoModelForSeq2SeqLM
|
| 32 |
+
model = AutoModelForSeq2SeqLM.from_pretrained("stepfun-ai/step3", trust_remote_code=True, torch_dtype="auto"),
|
| 33 |
with open('stepfun-ai_step3_0.txt', 'w') as f:
|
| 34 |
f.write('Everything was good in stepfun-ai_step3_0.txt')
|
| 35 |
except Exception as e:
|