Spaces:
Running on Zero
Running on Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,12 +5,14 @@ from transformers import AutoTokenizer, AutoModelForCausalLM, TextIteratorStream
|
|
| 5 |
|
| 6 |
MODEL_ID = "NoesisLab/Spartacus-1B-Instruct"
|
| 7 |
|
| 8 |
-
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID, trust_remote_code=True
|
|
|
|
| 9 |
model = AutoModelForCausalLM.from_pretrained(
|
| 10 |
MODEL_ID,
|
| 11 |
torch_dtype=torch.float16,
|
| 12 |
device_map="auto",
|
| 13 |
trust_remote_code=True,
|
|
|
|
| 14 |
)
|
| 15 |
|
| 16 |
import spaces
|
|
|
|
| 5 |
|
| 6 |
MODEL_ID = "NoesisLab/Spartacus-1B-Instruct"
|
| 7 |
|
| 8 |
+
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID, trust_remote_code=True
|
| 9 |
+
force_download=True # This forces a fresh copy of the code)
|
| 10 |
model = AutoModelForCausalLM.from_pretrained(
|
| 11 |
MODEL_ID,
|
| 12 |
torch_dtype=torch.float16,
|
| 13 |
device_map="auto",
|
| 14 |
trust_remote_code=True,
|
| 15 |
+
force_download=True # This forces a fresh copy of the code
|
| 16 |
)
|
| 17 |
|
| 18 |
import spaces
|