RESEARCH_DASHBOARD / experiment_notes.json
thelyad's picture
Upload experiment_notes.json with huggingface_hub
fa6214d verified
Raw
History Blame Contribute Delete
16.5 kB
[
{
"id": "onboarding__note__home_jocelyn_Code_notes_experiments_onboarding_EXPERIMENT_README_md",
"experiment_id": "onboarding",
"title": "EXPERIMENT_README.md",
"filename": "EXPERIMENT_README.md",
"relative_path": "/home/jocelyn/Code/notes/experiments/onboarding/EXPERIMENT_README.md",
"content_md": "# Welcome to RACA\n\nThis is a sample experiment to show you how the dashboard works. You're looking at the **Overview** tab right now \u2014 it displays the experiment's README (this file).\n\nEverything you see here is generated from plain files in `notes/experiments/onboarding/`. You can browse them in your editor anytime.\n\n## How This Dashboard Works\n\nEach experiment has several tabs at the top. Here's what they do:\n\n### Overview (you are here)\n\nDisplays the experiment's README and any notes you've written in the `user/` folder. This is the main landing page for each experiment \u2014 a summary of what the experiment is, what you're investigating, and what you found.\n\n### Red Team Brief\n\nBefore any experiment runs, RACA reviews the design for potential problems \u2014 wrong evaluation metrics, truncated outputs, missing baselines, wasted compute. The brief lives at `red_team_brief.md`. This tab will be empty until you run your first real experiment.\n\n### Timeline\n\nA chronological log of everything that happened: when jobs were submitted, when artifacts were uploaded, when bugs were found and fixed. This is auto-generated from `activity_log.jsonl` \u2014 RACA writes to it as events happen.\n\n### Runs\n\nTracks each job submission \u2014 which model, which cluster, what status (pending, running, completed, failed), and links to the HuggingFace dataset with the results. Empty until you run something.\n\n### Artifacts\n\nLinks to all HuggingFace datasets produced by this experiment \u2014 canary runs, partial results, final data. Each artifact has metadata about what generated it. Empty until artifacts are uploaded.\n\n### Files\n\nAll the markdown and YAML files in the experiment folder. Click any file to read it. This is a quick way to browse the experiment's configuration and notes without leaving the dashboard.\n\n## Folder Structure\n\n```\nnotes/experiments/onboarding/\n EXPERIMENT_README.md \u2190 this file (shows in Overview tab)\n experiment.yaml \u2190 config: hypothesis, models, tasks\n flow_state.json \u2190 current phase (design/running/complete)\n HUGGINGFACE_REPOS.md \u2190 links to all uploaded datasets\n questions.md \u2190 research questions (read-only)\n red_team_brief.md \u2190 created during preflight review\n activity_log.jsonl \u2190 timeline entries (auto-generated)\n user/ \u2190 YOUR notes \u2014 RACA doesn't touch these\n README.md \u2190 your interpretation and observations\n FINDINGS.md \u2190 key results and surprises\n DECISIONS.md \u2190 design decisions and rationale\n summary.md \u2190 one-paragraph summary when done\n```\n\n**Most of this is automated.** RACA creates and updates the experiment files, uploads artifacts, and keeps the timeline current. The only files you write are in `user/` \u2014 that's your space for notes, findings, and decisions.\n\n## What's Next\n\nThis sample experiment hasn't been run yet \u2014 it's just here to show you the structure. When you're ready to run a real experiment, just tell RACA:\n\n> *I want to test whether Qwen3-8B follows complex instructions better than Llama-3.1-8B*\n\nOr try the full guided tutorial:\n\n> */raca:experiment-tutorial*\n",
"created": "",
"updated": ""
},
{
"id": "onboarding__note__home_jocelyn_Code_notes_experiments_onboarding_HUGGINGFACE_REPOS_md",
"experiment_id": "onboarding",
"title": "HUGGINGFACE_REPOS.md",
"filename": "HUGGINGFACE_REPOS.md",
"relative_path": "/home/jocelyn/Code/notes/experiments/onboarding/HUGGINGFACE_REPOS.md",
"content_md": "# HuggingFace Repositories\n\n| Dataset | Date | Rows | Purpose |\n|---------|------|------|---------|\n",
"created": "",
"updated": ""
},
{
"id": "onboarding__note__home_jocelyn_Code_notes_experiments_onboarding_questions_md",
"experiment_id": "onboarding",
"title": "questions.md",
"filename": "questions.md",
"relative_path": "/home/jocelyn/Code/notes/experiments/onboarding/questions.md",
"content_md": "# Research Questions\n\n1. Can Qwen3-1.7B solve basic Countdown problems (4 numbers, targets < 100)?\n2. What reasoning strategies does the model use (trial-and-error, systematic search, pattern matching)?\n3. Where does the model fail \u2014 wrong arithmetic, giving up, or invalid expressions?\n",
"created": "",
"updated": ""
},
{
"id": "verisoftbench-goedel-8b__note__home_jocelyn_Code_notes_experiments_verisoftbench-goedel-8b_EXPERIMENT_README_md",
"experiment_id": "verisoftbench-goedel-8b",
"title": "EXPERIMENT_README.md",
"filename": "EXPERIMENT_README.md",
"relative_path": "/home/jocelyn/Code/notes/experiments/verisoftbench-goedel-8b/EXPERIMENT_README.md",
"content_md": "# VeriSoftBench Evaluation: Goedel-Code-Prover-8B\n\n## Question\nHow well does Goedel-Code-Prover-8B perform on VeriSoftBench's 500 Lean 4 theorem-proving tasks when using its native proof decomposition prompt in a single-pass (pass@1) setting?\n\nThis is a **novel evaluation** \u2014 Goedel's paper evaluates on 3 other Lean benchmarks (427 tasks, 62% success rate) but not VeriSoftBench. VeriSoftBench covers 23 real-world Lean 4 repositories with diverse verification domains.\n\n## Model\n- **Goedel-Code-Prover-8B** ([HuggingFace](https://huggingface.co/Goedel-LM/Goedel-Code-Prover-8B))\n- Base: Qwen3-8B, fine-tuned with SFT + GRPO (online Lean 4 verification rewards)\n- Approach: Decomposes proofs into small, single-operation lemmas before composing the final proof\n- Reported: 62% on 427 tasks (2.6\u00d7 over strongest baseline), surpasses provers up to 84\u00d7 larger\n\n## Design\n\n### Prompt Strategy: Goedel's Native Decomposition\nInstead of VeriSoftBench's default prompt (which asks for `<lean4_proof>` tags), we use Goedel's own system prompt that instructs the model to:\n1. Break the theorem into the smallest possible lemmas (single Lean 4 operation each)\n2. Prove each lemma\n3. Compose them into a final proof without `sorry`\n4. Output everything in a ```lean code block\n\n### Input Format\n- **System prompt**: Goedel's decomposition prompt (from model card)\n- **User prompt**: `Formal Problem:\\n{theorem_with_context_and_sorry}`\n- **Context**: VeriSoftBench's `filtered_context` mode \u2014 includes library defs, repo defs, lemmas, and local context so the model can reference project-specific symbols\n- The theorem statement gets `by sorry` appended so the model knows what to fill in\n\n### Output Parsing\nGoedel outputs ```lean code blocks containing helper lemmas and the main theorem. We parse:\n1. Extract code from ```lean blocks\n2. Separate helper lemmas from the main theorem proof\n3. Feed into VeriSoftBench's Lean compilation pipeline\n\n### Inference\n- **Engine**: vLLM (OpenAI-compatible API)\n- **Temperature**: 0.9 (Goedel's default for decomposition)\n- **Max tokens**: 16,384 (decomposed proofs can be long)\n- **Samples**: 1 per theorem (pass@1)\n- **GPU**: Single GPU (8B model, ~16GB in BF16)\n\n### Verification\n- VeriSoftBench's Lean compilation pipeline (Docker or local)\n- Fix step **disabled** \u2014 clean single-pass measurement\n- Binary pass/fail per theorem\n\n## Implementation Plan\n\n### Code Changes Required\n1. **Add vLLM/base_url support to `ProverInterface`**: Modify the OpenAI path to accept a `base_url` config parameter\n2. **Add Goedel prompt mode**: New system prompt + user prompt format in `PromptBuilder` (or config override)\n3. **Add Goedel output parser**: Parse ```lean code blocks instead of `<lean4_proof>` tags\n4. **Evaluation script**: Config YAML pointing to vLLM server with Goedel's parameters\n\n### Cluster Job\n1. Start vLLM server serving Goedel-Code-Prover-8B\n2. Run VeriSoftBench evaluation against the vLLM server\n3. Upload results incrementally to HuggingFace\n\n## What Success/Failure Looks Like\n- **Strong result**: >30% pass@1 (competitive with much larger API models on VeriSoftBench)\n- **Expected result**: 15-30% pass@1 (decomposition helps but single-pass limits search)\n- **Weak result**: <10% pass@1 (model may need iterative refinement pipeline to be effective)\n- Any result is novel and publishable since this model hasn't been evaluated on VeriSoftBench\n\n## Artifacts\n- `thelyad/verisoftbench-goedel-8b-results-v1`: Full results dataset (model responses, parsed proofs, compilation results)\n",
"created": "2026-04-03",
"updated": ""
},
{
"id": "verisoftbench-goedel-8b__note__home_jocelyn_Code_notes_experiments_verisoftbench-goedel-8b_HUGGINGFACE_REPOS_md",
"experiment_id": "verisoftbench-goedel-8b",
"title": "HUGGINGFACE_REPOS.md",
"filename": "HUGGINGFACE_REPOS.md",
"relative_path": "/home/jocelyn/Code/notes/experiments/verisoftbench-goedel-8b/HUGGINGFACE_REPOS.md",
"content_md": "# HuggingFace Repositories\n\nNo artifacts uploaded yet.\n",
"created": "2026-04-03",
"updated": ""
},
{
"id": "verisoftbench-goedel-8b__note__home_jocelyn_Code_notes_experiments_verisoftbench-goedel-8b_red_team_brief_md",
"experiment_id": "verisoftbench-goedel-8b",
"title": "red_team_brief.md",
"filename": "red_team_brief.md",
"relative_path": "/home/jocelyn/Code/notes/experiments/verisoftbench-goedel-8b/red_team_brief.md",
"content_md": "# Red Team Brief: VeriSoftBench \u00d7 Goedel-Code-Prover-8B\n\n## Experiment Summary\nSingle-pass (pass@1) evaluation of Goedel-Code-Prover-8B on VeriSoftBench's 500 Lean 4 theorems using Goedel's native proof decomposition prompt, with verification via Lean compilation.\n\n## Failure Modes\n\n### F1: Prompt Format Mismatch\n**Risk: HIGH**\nGoedel's model was trained on `\"Formal Problem:\\n<theorem with sorry>\"` \u2014 a bare theorem statement. VeriSoftBench provides rich filtered context (library defs, repo defs, lemmas, local_ctx). If we stuff all this context into the \"Formal Problem:\" field, the model may not handle it \u2014 it was trained on much shorter inputs.\n\n**Mitigation:** Test with a few examples first (canary). Compare model behavior with context vs. bare theorem. If context hurts, fall back to bare theorem + just local_ctx.\n\n### F2: Output Parsing Failure\n**Risk: HIGH**\nGoedel outputs ```lean code blocks with lemmas + theorem mixed together. VeriSoftBench expects `<lean4_proof>` and `<lean4_invented_lemmas>` tags. We need a custom parser that:\n1. Extracts code from markdown code blocks\n2. Separates lemma declarations from the main theorem proof body\n3. Handles edge cases (no code block, multiple code blocks, malformed output)\n\nIf the parser fails silently, proofs that are actually correct won't compile because they're incorrectly extracted.\n\n**Mitigation:** Log raw model output alongside parsed output. Validate parser on known examples before full run. Count parse failures as a separate metric.\n\n### F3: Theorem Statement Formatting\n**Risk: MEDIUM**\nVeriSoftBench's `target_theorem` ends with `:=`. Goedel expects `by sorry` after the statement. The conversion must be correct:\n- Standard proofs: append `by sorry` after `:=`\n- `where` proofs: different format\n- Pattern match proofs: different format\n- Term-mode proofs: no `by`\n\nIf the sorry format is wrong, the model may generate syntactically incorrect output.\n\n**Mitigation:** Use VeriSoftBench's `_clean_thm_stmt()` logic to understand separator patterns. Test conversion on diverse theorem types.\n\n### F4: Truncation\n**Risk: MEDIUM**\nDecomposed proofs can be very long (multiple lemmas + proofs + final theorem). At 16,384 max_tokens this should be sufficient for most, but complex theorems with many helper lemmas could exceed it.\n\n**Mitigation:** Check `finish_reason` in vLLM responses. Log truncation count. 16,384 tokens is reasonable for pass@1 decomposition \u2014 Goedel's own decomposer uses 16,000.\n\n### F5: vLLM Chat Template\n**Risk: MEDIUM**\nGoedel-Code-Prover-8B is based on Qwen3-8B. vLLM must use the correct chat template for the model. If the tokenizer's chat template doesn't match what the model was trained on, outputs will be garbage.\n\n**Mitigation:** Check the model's `tokenizer_config.json` for chat template. Verify vLLM loads it correctly. Test with a simple theorem before full run.\n\n### F6: Lemma Name Collisions\n**Risk: MEDIUM**\nGoedel's model generates helper lemmas with arbitrary names. These may collide with existing names in the VeriSoftBench repo context (imports, local definitions). Collision = compilation failure even if the proof logic is correct.\n\n**Mitigation:** Post-process lemma names to add a unique prefix if needed. Or accept this as a natural limitation of single-pass generation.\n\n### F7: Lean Verification Environment\n**Risk: LOW-MEDIUM**\nVeriSoftBench requires 23 Lean 4 repos to be pre-built. Docker image is ~110GB. Local setup requires specific Lean toolchain versions per repo. If the verification environment isn't set up on the cluster, compilation always fails.\n\n**Decision needed:** Docker or local? Docker is more reliable but requires disk space. The cluster must support Docker or have Lean installed.\n\n**Mitigation:** Verify Lean compilation works on the target cluster before submitting the full job. The canary should compile at least one theorem from each repo category.\n\n### F8: No Intermediate Artifacts for Short Job\n**Risk: LOW**\nIf the full job runs 2-4 hours, intermediate uploads every 30 min are needed. The evaluation script must support incremental result saving and HF upload.\n\n**Mitigation:** Build incremental saving into the evaluation script. Upload partial results every 50 theorems or 30 minutes, whichever comes first.\n\n### F9: HF Upload in Same Process as vLLM\n**Risk: HIGH (if applicable)**\nIf vLLM and the evaluation + HF upload run in the same process, HF uploads will kill vLLM's EngineCore subprocess.\n\n**Mitigation:** Architecture must be: (1) vLLM server process, (2) separate evaluation client process, (3) HF uploads via subprocess from the client. These must be isolated processes.\n\n### F10: VLLM_WORKER_MULTIPROC_METHOD\n**Risk: HIGH**\nIf anything initializes CUDA before vLLM starts (pip install, import torch, etc.), vLLM's forked workers die. Must set `export VLLM_WORKER_MULTIPROC_METHOD=spawn` before any Python.\n\n**Mitigation:** Set this in the sbatch script before any Python command.\n\n## Validation Criteria\n\n### For Canary Job\n- [ ] vLLM server starts and serves the model correctly\n- [ ] Chat template matches Goedel's training format\n- [ ] At least 10-20 theorems processed (sampled across different repos)\n- [ ] At least 1 theorem compiles successfully (proves the pipeline works end-to-end)\n- [ ] Raw model outputs are saved and look like valid Lean 4 code (not gibberish)\n- [ ] No truncation in the sample (finish_reason != \"length\")\n- [ ] Parser correctly extracts lemmas and proof body\n- [ ] Lean compilation step runs without infrastructure errors\n- [ ] Results uploaded to HuggingFace with correct schema\n\n### For Full Job\n- [ ] All 500 theorems processed\n- [ ] Truncation rate < 5%\n- [ ] Parse failure rate < 10%\n- [ ] At least some theorems compile (>0% \u2014 confirms pipeline works)\n- [ ] Full raw model outputs stored (no truncation in storage)\n- [ ] Results match expected schema with all columns populated\n- [ ] Intermediate uploads happened during the run\n\n## Canary Job Specification\n\n**Scope:** 20 theorems, stratified sample across repos (at least 1 from 10+ different repos, covering different theorem categories and difficulty levels)\n\n**What it tests:**\n1. vLLM serving Goedel-Code-Prover-8B with correct chat template\n2. Prompt construction with VeriSoftBench filtered context + Goedel format\n3. Output parsing (```lean code blocks \u2192 lemmas + proof)\n4. Lean compilation on the target cluster\n5. Result formatting and HF upload\n\n**Duration:** ~30 minutes (20 theorems \u00d7 ~30s generation + ~30s compilation each, plus setup)\n\n**Artifact:** `thelyad/verisoftbench-goedel-8b-canary-v1` \u2014 20 rows with all result columns\n",
"created": "2026-04-03",
"updated": ""
}
]