vilarin commited on
Commit
f77fb99
1 Parent(s): 6ec551a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -38,10 +38,7 @@ model = AutoModelForCausalLM.from_pretrained(
38
  MODEL,
39
  torch_dtype=torch.bfloat16,
40
  device_map="auto")
41
- terminators = [
42
- tokenizer.eos_token_id,
43
- tokenizer.convert_tokens_to_ids("<|eot_id|>")
44
- ]
45
 
46
 
47
  @spaces.GPU()
@@ -80,7 +77,7 @@ def stream_chat(
80
  top_p = top_p,
81
  top_k = top_k,
82
  temperature = temperature,
83
- eos_token_id=terminators,
84
  streamer=streamer,
85
  )
86
 
 
38
  MODEL,
39
  torch_dtype=torch.bfloat16,
40
  device_map="auto")
41
+
 
 
 
42
 
43
 
44
  @spaces.GPU()
 
77
  top_p = top_p,
78
  top_k = top_k,
79
  temperature = temperature,
80
+ eos_token_id=[128001,128008,128009],
81
  streamer=streamer,
82
  )
83