gmonsoon commited on
Commit
547eba8
·
verified ·
1 Parent(s): 6cd979e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -5
app.py CHANGED
@@ -25,10 +25,6 @@ model = AutoModelForCausalLM.from_pretrained(
25
  device_map="auto",
26
  torch_dtype=torch.bfloat16,
27
  )
28
- terminators = [
29
- tokenizer.eos_token_id,
30
- tokenizer.convert_tokens_to_ids("<|eot_id|>")
31
- ]
32
  model.config.sliding_window = 4096
33
  model.eval()
34
 
@@ -63,7 +59,6 @@ def generate(
63
  temperature=temperature,
64
  num_beams=1,
65
  repetition_penalty=repetition_penalty,
66
- eos_token_id=terminators,
67
  )
68
  t = Thread(target=model.generate, kwargs=generate_kwargs)
69
  t.start()
 
25
  device_map="auto",
26
  torch_dtype=torch.bfloat16,
27
  )
 
 
 
 
28
  model.config.sliding_window = 4096
29
  model.eval()
30
 
 
59
  temperature=temperature,
60
  num_beams=1,
61
  repetition_penalty=repetition_penalty,
 
62
  )
63
  t = Thread(target=model.generate, kwargs=generate_kwargs)
64
  t.start()