HeliumTrades commited on
Commit
523de31
Β·
verified Β·
1 Parent(s): de69aa2

Fix Python 3.13 runtime and align Space with v3 frontier

Browse files
Files changed (3) hide show
  1. README.md +6 -5
  2. app.py +19 -20
  3. requirements.txt +1 -0
README.md CHANGED
@@ -1,5 +1,5 @@
1
  ---
2
- title: Beat-48 Challenge
3
  emoji: πŸ“ˆ
4
  colorFrom: blue
5
  colorTo: green
@@ -10,13 +10,14 @@ pinned: false
10
  license: mit
11
  ---
12
 
13
- # Helium Beat-48 Challenge
14
 
15
- Can your LLM read a real option chain?
16
 
17
- Sample frozen prompts from the [Market Resolution benchmark](https://huggingface.co/datasets/HeliumTrades/helium-market-resolution-benchmark) (v3) and compare to the current frontier.
 
18
 
19
- Set provider keys in Space secrets. Uses LiteLLM model strings.
20
 
21
  - [Market Resolution](https://huggingface.co/datasets/HeliumTrades/helium-market-resolution-benchmark)
22
  - [Model Worldview](https://huggingface.co/datasets/HeliumTrades/helium-model-worldview-benchmark)
 
1
  ---
2
+ title: Helium Benchmark Lab
3
  emoji: πŸ“ˆ
4
  colorFrom: blue
5
  colorTo: green
 
10
  license: mit
11
  ---
12
 
13
+ # Helium Benchmark Lab
14
 
15
+ Try two small, inspectable evaluations:
16
 
17
+ - **Market Resolution:** sample frozen option-chain questions and compare with the 58% frontier score.
18
+ - **Cue swap:** hold the task fixed, change one political cue, and compare the responses.
19
 
20
+ Set provider keys in Space secrets. Model calls use [LiteLLM](https://docs.litellm.ai/docs/providers) strings. The demo card works without a key.
21
 
22
  - [Market Resolution](https://huggingface.co/datasets/HeliumTrades/helium-market-resolution-benchmark)
23
  - [Model Worldview](https://huggingface.co/datasets/HeliumTrades/helium-model-worldview-benchmark)
app.py CHANGED
@@ -1,4 +1,4 @@
1
- """Helium Beat-48 Challenge β€” can your model read option chains?
2
 
3
  Space: https://huggingface.co/spaces/HeliumTrades/beat-48-challenge
4
  """
@@ -15,8 +15,7 @@ from datasets import load_dataset
15
  from litellm import completion
16
 
17
  DATASET = "HeliumTrades/helium-market-resolution-benchmark"
18
- FRONTIER = 0.48
19
- MYTH = 0.50
20
 
21
  MCQ = {
22
  "moneyness_logic", "prob_itm", "term_structure_mcq", "term_structure_table",
@@ -96,10 +95,10 @@ def bar(score: float, w: int = 36) -> str:
96
 
97
 
98
  def verdict(score: float) -> str:
99
- if score >= MYTH:
100
- return "MYTH BROKEN: above 50%. screenshot this."
101
  if score >= FRONTIER:
102
- return "NEW FRONTIER: beats grok-4.20-reasoning (~48%)."
 
 
103
  if score >= 0.40:
104
  return "RESPECTABLE: chain-literate, not chain-native."
105
  if score >= 0.30:
@@ -133,14 +132,14 @@ def run_beat48(model: str, n: int, seed: int, progress=gr.Progress()):
133
  return f"API error: {exc}", ""
134
  s = score_item(row, pred)
135
  scores.append(s)
136
- rows.append(f"**{row['task']}** ({row.get('symbol','')}) β†’ {s:.0%}\n> {pred[:200].replace(chr(10),' ')}…")
137
 
138
  avg = sum(scores) / len(scores)
139
- card = f"""## Beat-48 Challenge
140
 
141
  **Model:** `{model}`
142
- **Sample:** {n} / 300 frozen prompts
143
- **Bar:** grok-4.20-reasoning ~48% | myth: 50%
144
 
145
  {bar(avg)}
146
 
@@ -182,9 +181,9 @@ def run_cueswap(model: str):
182
  r = refused(resp)
183
  flags.append(r)
184
  tag = "REFUSED" if r else "WROTE IT"
185
- results.append(f"### {side} β†’ **{tag}**\n\n**Prompt:** {prompt[:300]}…\n\n**Response:** {resp[:500]}…")
186
  asym = "ASYMMETRIC (cue-swap detected)" if len(set(flags)) > 1 else "Symmetric"
187
- header = f"## Cue-swap probe (ref-0)\n\n**{asym}** β€” same essay shape, different political target.\n\n"
188
  return header, "\n\n".join(results)
189
 
190
 
@@ -201,24 +200,24 @@ Integrations: [lm-eval #3906](https://github.com/EleutherAI/lm-evaluation-harnes
201
  """
202
 
203
 
204
- with gr.Blocks(title="Helium Beat-48 Challenge") as demo:
205
  gr.Markdown(
206
- "# Helium Beat-48 Challenge\n"
207
- "Can a frontier LLM read a real option chain? **Nobody has cracked 50%.** "
208
- "Paste a [LiteLLM](https://docs.litellm.ai/docs/providers) model string and sample frozen prompts from the "
209
- "[Market Resolution benchmark](https://huggingface.co/datasets/HeliumTrades/helium-market-resolution-benchmark)."
210
  )
211
- with gr.Tab("Beat 48"):
212
  with gr.Row():
213
  model = gr.Textbox(label="Model (LiteLLM)", value="openai/gpt-4o-mini", scale=2)
214
  n = gr.Slider(1, 30, value=5, step=1, label="Prompts")
215
  seed = gr.Number(value=42, label="Seed", precision=0)
216
- go = gr.Button("Run challenge", variant="primary")
217
  card = gr.Markdown()
218
  detail = gr.Markdown()
219
  go.click(run_beat48, [model, n, seed], [card, detail])
220
  gr.Button("Show demo card").click(demo_scorecard, outputs=card)
221
- with gr.Tab("Cue-swap demo"):
222
  model2 = gr.Textbox(label="Model", value="openai/gpt-4o-mini")
223
  go2 = gr.Button("Run ref-0 pair")
224
  header = gr.Markdown()
 
1
+ """Helium Benchmark Lab: small, inspectable benchmark runs.
2
 
3
  Space: https://huggingface.co/spaces/HeliumTrades/beat-48-challenge
4
  """
 
15
  from litellm import completion
16
 
17
  DATASET = "HeliumTrades/helium-market-resolution-benchmark"
18
+ FRONTIER = 0.58
 
19
 
20
  MCQ = {
21
  "moneyness_logic", "prob_itm", "term_structure_mcq", "term_structure_table",
 
95
 
96
 
97
  def verdict(score: float) -> str:
 
 
98
  if score >= FRONTIER:
99
+ return "NEW FRONTIER: beats the best complete v3 run (58%)."
100
+ if score >= 0.50:
101
+ return "STRONG: above 50% on this sample."
102
  if score >= 0.40:
103
  return "RESPECTABLE: chain-literate, not chain-native."
104
  if score >= 0.30:
 
132
  return f"API error: {exc}", ""
133
  s = score_item(row, pred)
134
  scores.append(s)
135
+ rows.append(f"**{row['task']}** ({row.get('symbol','')}) | {s:.0%}\n> {pred[:200].replace(chr(10),' ')}...")
136
 
137
  avg = sum(scores) / len(scores)
138
+ card = f"""## Market Resolution sample
139
 
140
  **Model:** `{model}`
141
+ **Sample:** {n} / 304 frozen prompts
142
+ **Reference:** best complete v3 run: 58%
143
 
144
  {bar(avg)}
145
 
 
181
  r = refused(resp)
182
  flags.append(r)
183
  tag = "REFUSED" if r else "WROTE IT"
184
+ results.append(f"### {side} | **{tag}**\n\n**Prompt:** {prompt[:300]}...\n\n**Response:** {resp[:500]}...")
185
  asym = "ASYMMETRIC (cue-swap detected)" if len(set(flags)) > 1 else "Symmetric"
186
+ header = f"## Cue-swap probe (ref-0)\n\n**{asym}**. Same essay shape, different political target.\n\n"
187
  return header, "\n\n".join(results)
188
 
189
 
 
200
  """
201
 
202
 
203
+ with gr.Blocks(title="Helium Benchmark Lab") as demo:
204
  gr.Markdown(
205
+ "# Helium Benchmark Lab\n"
206
+ "Run two small, inspectable slices of the public benchmarks. "
207
+ "The best complete Market Resolution v3 run scores **58%**. "
208
+ "Use a [LiteLLM](https://docs.litellm.ai/docs/providers) model string, or open the demo with no API key."
209
  )
210
+ with gr.Tab("Market Resolution"):
211
  with gr.Row():
212
  model = gr.Textbox(label="Model (LiteLLM)", value="openai/gpt-4o-mini", scale=2)
213
  n = gr.Slider(1, 30, value=5, step=1, label="Prompts")
214
  seed = gr.Number(value=42, label="Seed", precision=0)
215
+ go = gr.Button("Run sample", variant="primary")
216
  card = gr.Markdown()
217
  detail = gr.Markdown()
218
  go.click(run_beat48, [model, n, seed], [card, detail])
219
  gr.Button("Show demo card").click(demo_scorecard, outputs=card)
220
+ with gr.Tab("Cue swap"):
221
  model2 = gr.Textbox(label="Model", value="openai/gpt-4o-mini")
222
  go2 = gr.Button("Run ref-0 pair")
223
  header = gr.Markdown()
requirements.txt CHANGED
@@ -1,3 +1,4 @@
1
  gradio>=4.44.0
2
  datasets>=2.14.0
3
  litellm>=1.40.0
 
 
1
  gradio>=4.44.0
2
  datasets>=2.14.0
3
  litellm>=1.40.0
4
+ audioop-lts; python_version >= "3.13"