Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -15,17 +15,19 @@ ACCESS_TOKEN = os.getenv("HF_TOKEN", "")
|
|
| 15 |
model_id = "bartowski/Mistral-Nemo-Instruct-2407-GGUF"
|
| 16 |
filename = "Mistral-Nemo-Instruct-2407-Q6_K_L.gguf"
|
| 17 |
|
|
|
|
| 18 |
model = AutoModelForCausalLM.from_pretrained(
|
| 19 |
model_id,
|
| 20 |
gguf_file=filename,
|
| 21 |
-
|
| 22 |
device_map="auto",
|
| 23 |
-
trust_remote_code=
|
| 24 |
token=ACCESS_TOKEN)
|
|
|
|
| 25 |
tokenizer = AutoTokenizer.from_pretrained(
|
| 26 |
model_id,
|
| 27 |
gguf_file=filename,
|
| 28 |
-
trust_remote_code=
|
| 29 |
token=ACCESS_TOKEN)
|
| 30 |
|
| 31 |
tokenizer.use_default_system_prompt = False
|
|
|
|
| 15 |
model_id = "bartowski/Mistral-Nemo-Instruct-2407-GGUF"
|
| 16 |
filename = "Mistral-Nemo-Instruct-2407-Q6_K_L.gguf"
|
| 17 |
|
| 18 |
+
@spaces.GPU
|
| 19 |
model = AutoModelForCausalLM.from_pretrained(
|
| 20 |
model_id,
|
| 21 |
gguf_file=filename,
|
| 22 |
+
torch_dtype=torch.float16,
|
| 23 |
device_map="auto",
|
| 24 |
+
trust_remote_code=False,
|
| 25 |
token=ACCESS_TOKEN)
|
| 26 |
+
@spaces.GPU
|
| 27 |
tokenizer = AutoTokenizer.from_pretrained(
|
| 28 |
model_id,
|
| 29 |
gguf_file=filename,
|
| 30 |
+
trust_remote_code=False,
|
| 31 |
token=ACCESS_TOKEN)
|
| 32 |
|
| 33 |
tokenizer.use_default_system_prompt = False
|