gmonsoon commited on
Commit
f39147d
·
verified ·
1 Parent(s): 9891db7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -6
app.py CHANGED
@@ -17,17 +17,14 @@ MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "4096"))
17
 
18
  device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
19
 
20
- model_id = "Skywork/Skywork-o1-Open-PRM-Qwen-2.5-7B"
21
  tokenizer = AutoTokenizer.from_pretrained(model_id)
22
  model = AutoModelForCausalLM.from_pretrained(
23
  model_id,
24
  device_map="auto",
25
  torch_dtype=torch.bfloat16,
26
  )
27
- terminators = [
28
- tokenizer.eos_token_id,
29
- tokenizer.convert_tokens_to_ids("<|eot_id|>")
30
- ]
31
  model.config.sliding_window = 4096
32
  model.eval()
33
 
@@ -61,7 +58,6 @@ def generate(
61
  temperature=temperature,
62
  num_beams=1,
63
  repetition_penalty=repetition_penalty,
64
- eos_token_id=terminators,
65
  )
66
  t = Thread(target=model.generate, kwargs=generate_kwargs)
67
  t.start()
 
17
 
18
  device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
19
 
20
+ model_id = "gmonsoon/SeaMarco-o1-7B-v1"
21
  tokenizer = AutoTokenizer.from_pretrained(model_id)
22
  model = AutoModelForCausalLM.from_pretrained(
23
  model_id,
24
  device_map="auto",
25
  torch_dtype=torch.bfloat16,
26
  )
27
+
 
 
 
28
  model.config.sliding_window = 4096
29
  model.eval()
30
 
 
58
  temperature=temperature,
59
  num_beams=1,
60
  repetition_penalty=repetition_penalty,
 
61
  )
62
  t = Thread(target=model.generate, kwargs=generate_kwargs)
63
  t.start()