Pra-tham commited on
Commit
bacf272
·
1 Parent(s): f9026c5
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -12,7 +12,7 @@ model_prompt = "Explain and solve the following mathematical problem step by ste
12
  tokenizer = AutoTokenizer.from_pretrained("AI-MO/NuminaMath-7B-TIR")
13
  model_path = snapshot_download(repo_id="Makima57/deepseek-math-Numina")
14
  generator = ctranslate2.Generator(model_path, device="cpu", compute_type="int8")
15
- iterations = 10
16
 
17
  # Function to generate predictions using the model
18
  def get_prediction(question):
@@ -59,7 +59,7 @@ def majority_vote_with_steps(question, num_iterations=10):
59
  if sucess:
60
  all_predictions.append(prediction)
61
  all_answers.append(answer)
62
- steps_list.append(steps)
63
  majority_voted_ans = get_majority_vote(all_answers)
64
  else:
65
  answer, steps = parse_prediction(prediction)
 
12
  tokenizer = AutoTokenizer.from_pretrained("AI-MO/NuminaMath-7B-TIR")
13
  model_path = snapshot_download(repo_id="Makima57/deepseek-math-Numina")
14
  generator = ctranslate2.Generator(model_path, device="cpu", compute_type="int8")
15
+ iterations = 4
16
 
17
  # Function to generate predictions using the model
18
  def get_prediction(question):
 
59
  if sucess:
60
  all_predictions.append(prediction)
61
  all_answers.append(answer)
62
+ steps_list.append(prediction)
63
  majority_voted_ans = get_majority_vote(all_answers)
64
  else:
65
  answer, steps = parse_prediction(prediction)