chichomitko commited on
Commit
4759f07
·
verified ·
1 Parent(s): c882e73

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
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
- #torch_dtype=torch.float16,
22
  device_map="auto",
23
- trust_remote_code=True,
24
  token=ACCESS_TOKEN)
 
25
  tokenizer = AutoTokenizer.from_pretrained(
26
  model_id,
27
  gguf_file=filename,
28
- trust_remote_code=True,
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