Upload PowerInfer_SmallThinker-21BA3B-Instruct_0.py with huggingface_hub
Browse files
PowerInfer_SmallThinker-21BA3B-Instruct_0.py
CHANGED
|
@@ -16,6 +16,10 @@ try:
|
|
| 16 |
from transformers import pipeline
|
| 17 |
|
| 18 |
pipe = pipeline("text-generation", model="PowerInfer/SmallThinker-21BA3B-Instruct")
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
with open('PowerInfer_SmallThinker-21BA3B-Instruct_0.txt', 'w') as f:
|
| 20 |
f.write('Everything was good in PowerInfer_SmallThinker-21BA3B-Instruct_0.txt')
|
| 21 |
except Exception as e:
|
|
|
|
| 16 |
from transformers import pipeline
|
| 17 |
|
| 18 |
pipe = pipeline("text-generation", model="PowerInfer/SmallThinker-21BA3B-Instruct")
|
| 19 |
+
|
| 20 |
+
# Load model directly
|
| 21 |
+
from transformers import AutoModel
|
| 22 |
+
model = AutoModel.from_pretrained("PowerInfer/SmallThinker-21BA3B-Instruct", torch_dtype="auto"),
|
| 23 |
with open('PowerInfer_SmallThinker-21BA3B-Instruct_0.txt', 'w') as f:
|
| 24 |
f.write('Everything was good in PowerInfer_SmallThinker-21BA3B-Instruct_0.txt')
|
| 25 |
except Exception as e:
|