electblake commited on
Commit
bbcca9d
·
1 Parent(s): be9bfee

fix: separate reasoning from final answer

Browse files
Files changed (1) hide show
  1. app.py +11 -0
app.py CHANGED
@@ -129,6 +129,17 @@ def generate(
129
  ],
130
  dim=-1,
131
  )
 
 
 
 
 
 
 
 
 
 
 
132
 
133
  answer_ids = model.generate(
134
  input_ids=reasoning_ids,
 
129
  ],
130
  dim=-1,
131
  )
132
+ reasoning_ids = torch.cat(
133
+ [
134
+ reasoning_ids,
135
+ tokenizer.encode(
136
+ "\n\n",
137
+ add_special_tokens=False,
138
+ return_tensors="pt",
139
+ ).to(model.device),
140
+ ],
141
+ dim=-1,
142
+ )
143
 
144
  answer_ids = model.generate(
145
  input_ids=reasoning_ids,