AntonioJun commited on
Commit
2be537c
·
verified ·
1 Parent(s): 8243a78

thinking-mode arm: enable_thinking + think-block splitting + think-closing force tail

Browse files
Files changed (1) hide show
  1. calibration/run.py +18 -6
calibration/run.py CHANGED
@@ -75,6 +75,7 @@ def run_grid(
75
  strip_schema_legend=False,
76
  prose_legend=False,
77
  reasoning_note=False,
 
78
  ):
79
  """Run every (model, budget) pair through harness.B.launch -- the unmodified
80
  extended path, only ``reasoning_budget`` varies -- on the operator's questions."""
@@ -89,12 +90,16 @@ def run_grid(
89
  plan = build_plan(models, budgets)
90
  for index, (model, budget) in enumerate(plan, start=1):
91
  print(f"=== calibration {index}/{len(plan)}: {model} @ {budget} tokens ===", flush=True)
92
- variant = (
93
- f"{budget}-reasoning" if reasoning_note
94
- else f"{budget}-prose-legend" if prose_legend
95
- else f"{budget}-no-legend" if strip_schema_legend
96
- else budget
97
- )
 
 
 
 
98
  harness_kwargs = {}
99
  if prose_legend:
100
  from harness.B.prompts import PROSE_LEGEND
@@ -116,6 +121,7 @@ def run_grid(
116
  question_ids=question_ids,
117
  strip_schema_legend=strip_schema_legend or prose_legend,
118
  reasoning_note=reasoning_note,
 
119
  **harness_kwargs,
120
  )
121
 
@@ -164,6 +170,11 @@ def main():
164
  help="Thinking-with-Spatial-Code step-by-step note prefixed to the "
165
  "post-prompt; results land in a '<budget>-reasoning' sibling directory",
166
  )
 
 
 
 
 
167
  parser.add_argument("--rebuild", action="store_true")
168
  args = parser.parse_args()
169
 
@@ -203,6 +214,7 @@ def main():
203
  strip_schema_legend=args.strip_schema_legend,
204
  prose_legend=args.prose_legend,
205
  reasoning_note=args.reasoning_note,
 
206
  )
207
  except ValueError as exc:
208
  parser.error(str(exc))
 
75
  strip_schema_legend=False,
76
  prose_legend=False,
77
  reasoning_note=False,
78
+ thinking=False,
79
  ):
80
  """Run every (model, budget) pair through harness.B.launch -- the unmodified
81
  extended path, only ``reasoning_budget`` varies -- on the operator's questions."""
 
90
  plan = build_plan(models, budgets)
91
  for index, (model, budget) in enumerate(plan, start=1):
92
  print(f"=== calibration {index}/{len(plan)}: {model} @ {budget} tokens ===", flush=True)
93
+ variant_parts = [str(budget)]
94
+ if thinking:
95
+ variant_parts.append("thinking")
96
+ if reasoning_note:
97
+ variant_parts.append("reasoning")
98
+ if prose_legend:
99
+ variant_parts.append("prose-legend")
100
+ elif strip_schema_legend:
101
+ variant_parts.append("no-legend")
102
+ variant = "-".join(variant_parts)
103
  harness_kwargs = {}
104
  if prose_legend:
105
  from harness.B.prompts import PROSE_LEGEND
 
121
  question_ids=question_ids,
122
  strip_schema_legend=strip_schema_legend or prose_legend,
123
  reasoning_note=reasoning_note,
124
+ thinking=thinking,
125
  **harness_kwargs,
126
  )
127
 
 
170
  help="Thinking-with-Spatial-Code step-by-step note prefixed to the "
171
  "post-prompt; results land in a '<budget>-reasoning' sibling directory",
172
  )
173
+ parser.add_argument(
174
+ "--thinking", action="store_true",
175
+ help="enable native thinking mode (Qwen only); results land in a "
176
+ "'<budget>-thinking[...]' sibling directory",
177
+ )
178
  parser.add_argument("--rebuild", action="store_true")
179
  args = parser.parse_args()
180
 
 
214
  strip_schema_legend=args.strip_schema_legend,
215
  prose_legend=args.prose_legend,
216
  reasoning_note=args.reasoning_note,
217
+ thinking=args.thinking,
218
  )
219
  except ValueError as exc:
220
  parser.error(str(exc))