{
  "id": 702057,
  "title": "GPT-OSS-120B (with tools) | Technical Writeup",
  "content": "<h1>A. Model Summary</h1>\n<h2>A1. Background</h2>\n<table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Value</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Competition Name</td>\n<td>AI Mathematical Olympiad - Progress Prize 3</td>\n</tr>\n<tr>\n<td>Team Name</td>\n<td>Andreas Bisiadis</td>\n</tr>\n<tr>\n<td>Private Leaderboard Score</td>\n<td>41.5</td>\n</tr>\n<tr>\n<td>Private Leaderboard Place</td>\n<td>546</td>\n</tr>\n<tr>\n<td>Public Leaderboard Reference</td>\n<td>41/50 for the selected Mk I Version 16 notebook; 42/50 peak for the public no-suffix notebook lineage</td>\n</tr>\n<tr>\n<td>Team Member Name</td>\n<td>Andreas Bisiadis</td>\n</tr>\n</tbody>\n</table>\n<p>This submission was developed for Kaggle's AI Mathematical Olympiad - Progress Prize 3 competition. The selected solution is an inference-only notebook based on GPT-OSS-120B with tool-integrated Python reasoning. The notebook selected for the final submission was Mk I Version 16:</p>\n<pre><code>code/inference/gpt-oss-120b-with-tools/aimo-3-gpt-oss-120b-with-tools-version-16.ipynb\n</code></pre>\n<p>This selected notebook scored 41/50 on the public leaderboard and 41.5 on the private leaderboard. The same public, no-suffix notebook lineage reached a peak public score of 42/50 in Version 11.</p>\n<h2>A2. Background On Team</h2>\n<p>This was a solo submission by Andreas Bisiadis. The technical work represented in this repository focused on long-context LLM inference systems, vLLM backend tuning, tool-integrated mathematical reasoning, Jupyter kernel sandbox reliability, prompt minimization, and answer aggregation under Kaggle's fixed H100 runtime constraints.</p>\n<p>Primary competition work included:</p>\n<ul>\n<li>Building and iterating 68 notebook versions and previews across Mk I, Mk II, Mk III, and Mk IV.</li>\n<li>Developing the public no-suffix notebook lineage, <code>gpt-oss-120b-with-tools</code>, through 22 versions. This is the only lineage intended to correspond to the publicly available Kaggle notebook.</li>\n<li>Running later Mk II, Mk III, and Mk IV development lines as follow-up research notebooks. These lines tested more advanced pipeline ideas, but they did not improve beyond the public notebook lineage's 42/50 public leaderboard peak.</li>\n<li>Migrating the inference backend in later experiments through vLLM versions up to <code>vllm==0.17.0</code>, while the selected public Mk I Version 16 notebook used <code>vllm==0.11.2</code>.</li>\n<li>Designing a stateful Python tool sandbox with persistent Jupyter kernels, port retry logic, output truncation, process cleanup, and CPU isolation.</li>\n<li>Evaluating prompt, timeout, context length, KV cache, pass@K, voting, and backend choices against reference problems and public leaderboard submissions.</li>\n<li>Selecting a final pipeline that emphasized reliability under the 5-hour competition notebook limit.</li>\n</ul>\n<h2>A3. Summary</h2>\n<p>The final selected solution is an inference-time ensemble built around GPT-OSS-120B served locally with vLLM on a single Kaggle H100 GPU. Each math problem is solved by up to 8 parallel attempts using the Harmony prompt format, <code>ReasoningEffort.HIGH</code>, and a Python tool backed by persistent Jupyter kernels. Candidate integer answers are extracted from final answers using a <code>\\boxed{}</code> parser with a narrow textual fallback for \"final answer is\", then aggregated with inverse-entropy weighting computed from top-logprob token entropy. The selected Mk I Version 16 notebook uses <code>vllm==0.11.2</code>, a 65,536-token context, FP8 E4M3 KV cache, async scheduling, disabled log stats, and prefix caching. No model training or fine-tuning is performed; development effort was concentrated on inference robustness, tool reliability, runtime allocation, and answer selection.</p>\n<h2>A4. Feature Selection And Engineering</h2>\n<p>The effective inputs and engineered signals are:</p>\n<ul>\n<li>The original problem statement from Kaggle.</li>\n<li>A short system prompt identifying the assistant as a world-class IMO competitor and specifying the answer range and <code>\\boxed{}</code> format.</li>\n<li>A short user suffix instructing the model that it has access to <code>math</code>, <code>numpy</code>, and <code>sympy</code>.</li>\n<li>Stateful Python outputs from each attempt's Jupyter sandbox.</li>\n<li>Per-attempt top-logprob entropy over generated tokens.</li>\n<li>Normalized candidate integer answers extracted from final answer text.</li>\n</ul>\n<p>The main transformations are prompt composition, answer normalization, and entropy-based scoring. Boxed answer extraction accepts comma separators, strips them, converts to an integer, and keeps only values in <code>[0, 99999]</code>. Version 16 also includes a narrow case-insensitive fallback for text matching <code>final answer is &lt;integer&gt;</code>.</p>\n<p>No external problem data or retrieval corpus is used. The only external artifacts are allowed Kaggle inputs: the competition data, the GPT-OSS-120B model weights, utility wheels, and local tiktoken encoding files needed for offline execution.</p>\n<h2>A5. Training Method</h2>\n<p>No training, fine-tuning, reinforcement learning, or preference optimization is used in the submitted solution. The model is the pretrained GPT-OSS-120B checkpoint loaded from a Kaggle model dataset.</p>\n<p>The ensemble is created at inference time:</p>\n<ul>\n<li>8 attempts are launched per problem.</li>\n<li>Attempts use deterministic per-attempt seeds computed as <code>(seed + attempt_index) ** 2</code>, with <code>seed=42</code>.</li>\n<li>Sampling uses <code>temperature=1.0</code> and <code>min_p=0.02</code>.</li>\n<li>Each attempt can call a stateful Python tool for calculations and verification.</li>\n<li>Early stopping occurs when 4 attempts agree on the same answer.</li>\n<li>Final answer selection uses inverse entropy weighting:</li>\n</ul>\n<pre><code>mean_entropy = average per-token Shannon entropy over top logprobs\nweight = 1 / max(mean_entropy, entropy_floor)\nentropy_floor = 1e-9\n</code></pre>\n<p>The answer with the largest total weight is submitted. If no valid answer is found, the notebook returns <code>0</code>.</p>\n<h2>A6. Interesting Findings</h2>\n<p>The most important result was that inference-system reliability mattered more than adding more reasoning machinery. Strong leaderboard submissions consistently used pass@8, short prompts, FP8 KV cache, prefix caching, long context, and a 2x overprovisioned sandbox pool.</p>\n<p>Key findings from the release history:</p>\n<ul>\n<li><code>context_tokens=81920</code> avoided truncation failures observed at 65,536 tokens while preserving enough concurrency for 8 attempts.</li>\n<li>FP8 E4M3 KV cache was necessary for long-context concurrency; BF16/auto KV cache reduced concurrency and correlated with a lower public score.</li>\n<li>Pass@8 with early stop at 4 votes was a better runtime/performance tradeoff than pass@12 or pass@16 variants.</li>\n<li>Disabling vLLM prefix caching correlated with lower public scores.</li>\n<li>Short prompts were more stable than verbose problem-solving frameworks.</li>\n<li>The \"IMO Gold Medalist\" persona was more stable than broader competitor personas.</li>\n<li>A 2x sandbox pool (<code>workers=16</code> for <code>attempts=8</code>) repeatedly outperformed 1:1 worker/attempt configurations on the public leaderboard, even though the 10-problem local reference subset did not reveal the difference.</li>\n<li>For vLLM 0.17.0, the Marlin MoE backend was required to avoid CUDA OOM on the 120B model at <code>gpu_memory_utilization=0.99</code>.</li>\n<li>On the measured workload, <code>performance_mode=\"throughput\"</code> was preferred over <code>interactivity</code> because prefix caching reduced repeated prefill cost and generation throughput dominated.</li>\n<li>CUDA 12.8 wheels outperformed CUDA 13.0 wheels in the logged experiments for this pipeline.</li>\n</ul>\n<p>The later Mk II, Mk III, and Mk IV notebooks were useful research lines, but they are not the publicly available Kaggle notebook lineage. They tested superior-in-theory approaches such as vLLM upgrades, longer contexts, richer sandbox cleanup, explicit attention configuration, CUDA graph tuning, Marlin MoE backend selection, developer-channel prompt layouts, extra error interception, and XML-style prompts. Despite these improvements in engineering maturity, the follow-up pipelines did not outperform the public no-suffix notebook lineage's 42/50 public leaderboard peak.</p>\n<p>Several explored ideas were not used because they reduced reliability or exceeded the runtime budget: fine-tuning, retrieval-augmented generation, in-context example retrieval, speculative decoding, entropy pruning from larger pass@K runs, sequential refinement, extra DSL/prover tools, developer-channel prompt variants, and eager-execution router/probing experiments.</p>\n<h2>A7. Simpler Features And Methods</h2>\n<p>The closest simplified model that preserves most of the final result is the early Mk I baseline: GPT-OSS-120B with the Python tool, pass@8, prefix caching, 65,536-token context, and frequency-based voting. That baseline reached 40/50 on the public leaderboard, which is close to the selected Version 16 score of 41/50 and the public lineage peak of 42/50.</p>\n<p>The most important single model is GPT-OSS-120B. The most important method is not training but reliable inference-time sampling with Python tool use and answer aggregation.</p>\n<p>A very simple version with only one attempt would be faster but was not the selected approach because public leaderboard variance and hard-problem coverage favored multiple independent attempts.</p>\n<h2>A8. Model Execution Time</h2>\n<p>Prediction time is bounded by the Kaggle notebook limit. The final selected notebook is configured for the 5-hour competition environment with:</p>\n<table>\n<thead>\n<tr>\n<th>Runtime Setting</th>\n<th>Value</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Notebook limit</td>\n<td>17,400 seconds</td>\n</tr>\n<tr>\n<td>Server startup timeout</td>\n<td>180 seconds</td>\n</tr>\n<tr>\n<td>Base problem timeout</td>\n<td>240 seconds</td>\n</tr>\n<tr>\n<td>High problem timeout</td>\n<td>840 seconds</td>\n</tr>\n<tr>\n<td>Session timeout</td>\n<td>900 seconds</td>\n</tr>\n<tr>\n<td>Python tool timeout</td>\n<td>6 seconds</td>\n</tr>\n<tr>\n<td>Problems</td>\n<td>50</td>\n</tr>\n<tr>\n<td>Attempts per problem</td>\n<td>8</td>\n</tr>\n<tr>\n<td>Sandbox workers</td>\n<td>16</td>\n</tr>\n</tbody>\n</table>\n<p>Actual runtime is stochastic because problem difficulty, answer agreement, tool calls, and generated token counts vary. The pipeline reserves time for remaining problems and gives surplus time to current hard problems while trying to finish within the competition's 5-hour limit.</p>\n<p>The simpler Mk I-style baselines also perform no training. Their prediction runtime is similar or lower, but the selected Version 16 notebook combined tighter time allocation, refactored streaming/tool handling, regex compilation, and prefix caching in a more reliable public-notebook configuration.</p>\n<h2>A9. References</h2>\n<p>Relevant references and sources used during development:</p>\n<ul>\n<li>Kaggle, AI Mathematical Olympiad - Progress Prize 3 competition environment and evaluation API.</li>\n<li>Kaggle, Winning Model Documentation Guidelines.</li>\n<li>OpenAI GPT-OSS-120B model documentation and Harmony chat format documentation.</li>\n<li>vLLM documentation and release behavior for versions 0.11.2, 0.15.1, 0.16.0, and 0.17.0.</li>\n<li>Flash Attention 3 backend documentation and vLLM attention configuration.</li>\n<li>OCP MXFP4 quantization format references.</li>\n<li>Internal release notes in <code>code/inference/**/RELEASES.md</code>.</li>\n</ul>\n<h1>B. Submission Model</h1>\n<h2>B1. Archive Contents</h2>\n<p>The solution can be submitted as a Kaggle notebook solution. The selected final inference notebook is the public no-suffix Mk I notebook:</p>\n<pre><code>code/inference/gpt-oss-120b-with-tools/aimo-3-gpt-oss-120b-with-tools-version-16.ipynb\n</code></pre>\n<p>The utility notebook used to prepare offline wheels and tiktoken encoding files is:</p>\n<pre><code>code/inference/gpt-oss-120b-with-tools/aimo-3-utils.ipynb\n</code></pre>\n<p>The later Mk II, Mk III, and Mk IV directories document follow-up experiments. They are useful for explaining the development process, but the no-suffix <code>gpt-oss-120b-with-tools</code> lineage is the public notebook lineage, and Version 16 is the selected final submission notebook.</p>\n<p>The release notes that document development history are under:</p>\n<pre><code>code/inference/gpt-oss-120b-with-tools/RELEASES.md\ncode/inference/gpt-oss-120b-with-tools-mk-ii-previews/RELEASES.md\ncode/inference/gpt-oss-120b-with-tools-mk-ii/RELEASES.md\ncode/inference/gpt-oss-120b-with-tools-mk-iii-previews/RELEASES.md\ncode/inference/gpt-oss-120b-with-tools-mk-iii/RELEASES.md\ncode/inference/gpt-oss-120b-with-tools-mk-iv/RELEASES.md\n</code></pre>\n<p>No trained model file is produced by this repository. The pretrained model is loaded from the Kaggle GPT-OSS-120B model input.</p>\n<h2>B2. README Requirements</h2>\n<h3>Hardware</h3>\n<p>The Kaggle competition notebook environment provides:</p>\n<table>\n<thead>\n<tr>\n<th>Resource</th>\n<th>Value</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>GPU</td>\n<td>1 x NVIDIA H100 SXM</td>\n</tr>\n<tr>\n<td>GPU memory</td>\n<td>80 GB HBM3</td>\n</tr>\n<tr>\n<td>GPU bandwidth</td>\n<td>3.35 TB/s</td>\n</tr>\n<tr>\n<td>CPU workers</td>\n<td>26</td>\n</tr>\n<tr>\n<td>System memory</td>\n<td>230 GB</td>\n</tr>\n<tr>\n<td>Internet</td>\n<td>Disabled during competition inference</td>\n</tr>\n</tbody>\n</table>\n<h3>Platform</h3>\n<p>The selected notebook metadata records:</p>\n<table>\n<thead>\n<tr>\n<th>Platform Item</th>\n<th>Value</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Environment</td>\n<td>Kaggle Notebook</td>\n</tr>\n<tr>\n<td>Accelerator</td>\n<td>NVIDIA H100</td>\n</tr>\n<tr>\n<td>Python</td>\n<td>3.12.12</td>\n</tr>\n<tr>\n<td>Kaggle Docker image version</td>\n<td>31236</td>\n</tr>\n<tr>\n<td>Internet</td>\n<td>Disabled for inference notebook</td>\n</tr>\n</tbody>\n</table>\n<h3>Key Software</h3>\n<p>The selected public utility notebook downloads offline wheels for:</p>\n<pre><code>unsloth\ntrl\nvllm==0.11.2\nopenai_harmony\n</code></pre>\n<p>The utility notebook downloads Python 3.12 binary wheels using the CUDA 12.8 PyTorch index and the NVIDIA package index, then packages the wheels and tiktoken encodings into <code>wheels.tar.gz</code>. The selected inference notebook extracts that archive to:</p>\n<pre><code>/kaggle/tmp/setup\n</code></pre>\n<p>and installs from:</p>\n<pre><code>/kaggle/tmp/setup/wheels\n</code></pre>\n<p>Important runtime libraries imported by the selected notebook include <code>vllm</code>, <code>openai</code>, <code>openai_harmony</code>, <code>transformers</code>, <code>jupyter_client</code>, <code>pandas</code>, <code>polars</code>, and Kaggle's <code>kaggle_evaluation.aimo_3_inference_server</code>.</p>\n<h3>How To Train</h3>\n<p>There is no training step.</p>\n<h3>How To Predict</h3>\n<p>Run the selected Mk I Version 16 Kaggle notebook with the required Kaggle inputs attached:</p>\n<ul>\n<li>AI Mathematical Olympiad - Progress Prize 3 competition data.</li>\n<li>GPT-OSS-120B model input at <code>/kaggle/input/gpt-oss-120b/transformers/default/1</code>.</li>\n<li>Public utility input containing <code>/kaggle/input/aimo-3-utils/wheels.tar.gz</code>.</li>\n</ul>\n<p>The notebook:</p>\n<ol>\n<li>Extracts <code>/kaggle/input/aimo-3-utils/wheels.tar.gz</code> to <code>/kaggle/tmp/setup</code>.</li>\n<li>Installs <code>unsloth</code>, <code>trl</code>, <code>vllm</code>, and <code>openai_harmony</code> from offline wheels.</li>\n<li>Sets tokenizer, CUDA, and transformer-related environment variables.</li>\n<li>Starts a local vLLM OpenAI-compatible server for GPT-OSS-120B.</li>\n<li>Initializes 16 persistent Jupyter sandbox kernels.</li>\n<li>Registers <code>predict()</code> with <code>kaggle_evaluation.aimo_3_inference_server.AIMO3InferenceServer</code>.</li>\n<li>Calls <code>serve()</code> during competition reruns or <code>run_local_gateway()</code> for local reference execution.</li>\n</ol>\n<h3>Important Side Effects</h3>\n<p>The notebook intentionally modifies the runtime environment:</p>\n<ul>\n<li>Uninstalls several large packages before installing the offline wheel set: <code>keras</code>, <code>matplotlib</code>, <code>scikit-learn</code>, and <code>tensorflow</code>.</li>\n<li>Extracts the utility archive to <code>/kaggle/tmp/setup</code>.</li>\n<li>Starts a vLLM server process on port <code>8000</code>.</li>\n<li>Writes <code>vllm_server.log</code> in the working directory.</li>\n<li>Starts 16 Jupyter kernels and allocates local ports starting at <code>50000</code>.</li>\n<li>Resets and reuses sandbox kernels between problems.</li>\n<li>Does not overwrite competition input data.</li>\n</ul>\n<h3>Key Assumptions</h3>\n<ul>\n<li>The notebook runs in the Kaggle AIMO3 environment with one H100 GPU and no internet access.</li>\n<li>The GPT-OSS-120B model and <code>aimo-3-utils</code> wheel archive are attached as Kaggle inputs.</li>\n<li>The answer is an integer between 0 and 99999.</li>\n<li>The full test set contains 50 problems.</li>\n<li>The competition rerun environment sets <code>KAGGLE_IS_COMPETITION_RERUN</code>.</li>\n<li>The working directory can hold logs and kernel temporary files.</li>\n</ul>\n<h2>B3. Configuration Files</h2>\n<p>There are no external configuration files required by the final notebook. Runtime configuration is centralized in the <code>CFG</code> class inside the selected notebook.</p>\n<p>Important final configuration values include:</p>\n<table>\n<thead>\n<tr>\n<th>Setting</th>\n<th>Value</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Model</td>\n<td>GPT-OSS-120B</td>\n</tr>\n<tr>\n<td>Model path</td>\n<td><code>/kaggle/input/gpt-oss-120b/transformers/default/1</code></td>\n</tr>\n<tr>\n<td>vLLM version</td>\n<td>0.11.2</td>\n</tr>\n<tr>\n<td>Reasoning effort</td>\n<td>HIGH</td>\n</tr>\n<tr>\n<td>KV cache dtype</td>\n<td><code>fp8_e4m3</code></td>\n</tr>\n<tr>\n<td>dtype</td>\n<td><code>auto</code></td>\n</tr>\n<tr>\n<td>Context length</td>\n<td>65,536</td>\n</tr>\n<tr>\n<td>Search tokens</td>\n<td>32</td>\n</tr>\n<tr>\n<td>Buffer tokens</td>\n<td>512</td>\n</tr>\n<tr>\n<td>Max sequences</td>\n<td>256</td>\n</tr>\n<tr>\n<td>GPU memory utilization</td>\n<td>0.96</td>\n</tr>\n<tr>\n<td>Prefix caching</td>\n<td>Enabled</td>\n</tr>\n<tr>\n<td>Async scheduling</td>\n<td>Enabled</td>\n</tr>\n<tr>\n<td>Disable log stats</td>\n<td>Enabled</td>\n</tr>\n<tr>\n<td>Temperature</td>\n<td>1.0</td>\n</tr>\n<tr>\n<td>min_p</td>\n<td>0.02</td>\n</tr>\n<tr>\n<td>top_logprobs</td>\n<td>5</td>\n</tr>\n<tr>\n<td>Attempts</td>\n<td>8</td>\n</tr>\n<tr>\n<td>Workers</td>\n<td>16</td>\n</tr>\n<tr>\n<td>Early stop</td>\n<td>4 matching answers</td>\n</tr>\n<tr>\n<td>Max turns</td>\n<td>128</td>\n</tr>\n<tr>\n<td>Seed</td>\n<td>42</td>\n</tr>\n<tr>\n<td>Entropy score floor</td>\n<td><code>1e-9</code> in the inverse-entropy weighting expression</td>\n</tr>\n</tbody>\n</table>\n<h2>B4. Requirements</h2>\n<p>For the Kaggle notebook workflow, exact package installation is handled by the utility dataset. The repository <code>requirements.txt</code> corresponds to the utility notebook used by the selected Mk I Version 16 submission, <code>code/inference/gpt-oss-120b-with-tools/aimo-3-utils.ipynb</code>; it is the expanded pinned package list derived from the wheels downloaded by that utility notebook.</p>\n<p>The selected utility notebook downloads binary wheels for Python 3.12 using:</p>\n<pre><code>pip download --dest /kaggle/working/wheels --python-version 3.12 --only-binary=:all: --extra-index-url https://download.pytorch.org/whl/cu128 --extra-index-url https://pypi.nvidia.com unsloth trl vllm==0.11.2 openai_harmony\n</code></pre>\n<p>The inference notebook then installs offline with:</p>\n<pre><code>python -m pip install --no-index --find-links /kaggle/tmp/setup/wheels unsloth trl vllm openai_harmony\n</code></pre>\n<p>The tiktoken encoding files are bundled into the same archive and loaded from:</p>\n<pre><code>/kaggle/tmp/setup/tiktoken_encodings\n</code></pre>\n<h2>B5. Directory Structure</h2>\n<p>The main project directories relevant to this writeup are:</p>\n<pre><code>.\ncode/\ncode/inference/\ncode/inference/gpt-oss-120b-with-tools/\ncode/inference/gpt-oss-120b-with-tools-mk-ii-previews/\ncode/inference/gpt-oss-120b-with-tools-mk-ii/\ncode/inference/gpt-oss-120b-with-tools-mk-iii-previews/\ncode/inference/gpt-oss-120b-with-tools-mk-iii/\ncode/inference/gpt-oss-120b-with-tools-mk-iv/\ncode/other/gpt-oss-120b-error-logs/\nsandbox/\n</code></pre>\n<p>For a formal archive, generate <code>directory_structure.txt</code> from the project root with:</p>\n<pre><code>find . -type d &gt; directory_structure.txt\n</code></pre>\n<h2>B6. Settings</h2>\n<p>Kaggle's generic documentation template recommends a <code>SETTINGS.json</code> file. This repository uses a notebook-style competition submission instead. All I/O paths and runtime settings are centralized in the notebook's <code>CFG</code> class and in the Kaggle input attachments.</p>\n<p>Primary paths:</p>\n<table>\n<thead>\n<tr>\n<th>Purpose</th>\n<th>Path</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Model weights</td>\n<td><code>/kaggle/input/gpt-oss-120b/transformers/default/1</code></td>\n</tr>\n<tr>\n<td>Utility archive</td>\n<td><code>/kaggle/input/aimo-3-utils/wheels.tar.gz</code></td>\n</tr>\n<tr>\n<td>Extracted offline wheels</td>\n<td><code>/kaggle/tmp/setup/wheels</code></td>\n</tr>\n<tr>\n<td>Tiktoken encodings</td>\n<td><code>/kaggle/tmp/setup/tiktoken_encodings</code></td>\n</tr>\n<tr>\n<td>Local gateway data</td>\n<td><code>/kaggle/input/ai-mathematical-olympiad-progress-prize-3/test.csv</code></td>\n</tr>\n<tr>\n<td>vLLM server log</td>\n<td><code>vllm_server.log</code></td>\n</tr>\n</tbody>\n</table>\n<h2>B7. Serialized Trained Model</h2>\n<p>No serialized trained model is produced. The submission uses the pretrained GPT-OSS-120B checkpoint supplied as a Kaggle model input. All competition-specific behavior is implemented in the inference notebook.</p>\n<h2>B8. Entry Points</h2>\n<p>The competition entry point is the <code>predict()</code> function in the selected notebook:</p>\n<pre><code>code/inference/gpt-oss-120b-with-tools/aimo-3-gpt-oss-120b-with-tools-version-16.ipynb\n</code></pre>\n<p>The notebook creates:</p>\n<pre><code>inference_server = kaggle_evaluation.aimo_3_inference_server.AIMO3InferenceServer(predict)\n</code></pre>\n<p>Then it uses:</p>\n<pre><code>inference_server.serve()\n</code></pre>\n<p>when <code>KAGGLE_IS_COMPETITION_RERUN</code> is set. For local reference execution, it uses:</p>\n<pre><code>inference_server.run_local_gateway((\"/kaggle/input/ai-mathematical-olympiad-progress-prize-3/test.csv\",))\n</code></pre>\n<p>There are no separate <code>prepare_data.py</code>, <code>train.py</code>, or <code>predict.py</code> scripts because the Kaggle submission format is a notebook with a registered inference server callback.</p>",
  "comments": [
    {
      "id": 3463558,
      "author_name": "Yiheng Wang",
      "author_url": "",
      "post_date": "2026-05-27T09:07:11.930000",
      "content": "<p>I think you are the real champion on this challenge, respect you!</p>",
      "votes": 3,
      "replies": []
    },
    {
      "id": 3461590,
      "author_name": "rıza temizel",
      "author_url": "",
      "post_date": "2026-05-20T22:04:15.470000",
      "content": "<p>At least for this competition, your work feels like an “Attention Is All You Need” level contribution. Thank you for sharing it.</p>",
      "votes": 3,
      "replies": [
        {
          "id": 3461592,
          "author_name": "Andreas Bisiadis",
          "author_url": "",
          "post_date": "2026-05-20T22:11:50.640000",
          "content": "<blockquote>\n  <p>your work feels like an “Attention Is All You Need” level contribution.</p>\n</blockquote>\n<p>Thank you. That praise means a lot.</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 3467190,
      "author_name": "Evan Harbaugh",
      "author_url": "",
      "post_date": "2026-06-05T16:34:01.877000",
      "content": "<p>Excellent writeup! Phenomenal work.</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 3463840,
      "author_name": "Navneet",
      "author_url": "",
      "post_date": "2026-05-28T04:56:22.743000",
      "content": "<p>Cool WriteUp on GPT-OSS-120B (with tools) <a href=\"https://www.kaggle.com/andreasbis\" target=\"_blank\">@andreasbis</a> </p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 3464276,
      "author_name": "Laureano Arcanio",
      "author_url": "",
      "post_date": "2026-05-29T11:38:53.467000",
      "content": "<p>Thanks for this amazing contribution.\nI honestly wish you had won the competition, it would have been totally deserved.\nLooking forward to seeing you win the writeup prize.</p>",
      "votes": 2,
      "replies": [
        {
          "id": 3473101,
          "author_name": "Simon Frieder",
          "author_url": "",
          "post_date": "2026-06-15T19:45:38.947000",
          "content": "<p>Just FYI, Andreas Bisiadis didn't enter his write-up towards the write-up prize (i.e., he didn't leave a comment here to enter it: <a href=\"https://www.kaggle.com/competitions/ai-mathematical-olympiad-progress-prize-3/discussion/689703\" target=\"_blank\">https://www.kaggle.com/competitions/ai-mathematical-olympiad-progress-prize-3/discussion/689703</a>)</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 3461921,
      "author_name": "Durga Kumari",
      "author_url": "",
      "post_date": "2026-05-21T18:50:42.673000",
      "content": "<p>Really impressive engineering work. Especially the focus on inference reliability and tool orchestration instead of overcomplicating the pipeline.</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 3461678,
      "author_name": "Kashyapsinh gohil",
      "author_url": "",
      "post_date": "2026-05-21T06:10:18.193000",
      "content": "<p>Thank you so much for this amazing work. It has effectively become the foundation for the entire competition. Almost everyone here has used your approach and adapted it according to their own knowledge. We owe a massive part of our progress with our work to your groundwork. You truly deserve the title of <strong>Best contributor</strong> in this competition for the sheer impact you’ve had on everyone. Thank you.</p>",
      "votes": 2,
      "replies": []
    },
    {
      "id": 3461651,
      "author_name": "Onur Fidaner",
      "author_url": "",
      "post_date": "2026-05-21T03:07:18.877000",
      "content": "<p>Thank you for putting this writeup together, and of course sharing your code in the first place. Your notebook was the foundation for many of us, including myself. Incredibly efficient pipeline! Seeing the thought process behind some of the design choices is very useful.</p>",
      "votes": 2,
      "replies": []
    },
    {
      "id": 3462122,
      "author_name": "",
      "author_url": "",
      "post_date": "2026-05-22T08:09:51",
      "content": "",
      "votes": 0,
      "replies": []
    }
  ],
  "comment_count": 11,
  "messages": [
    {
      "id": 3461570,
      "postDate": "2026-05-20T20:41:43.727Z",
      "content": "<h1>A. Model Summary</h1>\n<h2>A1. Background</h2>\n<table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Value</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Competition Name</td>\n<td>AI Mathematical Olympiad - Progress Prize 3</td>\n</tr>\n<tr>\n<td>Team Name</td>\n<td>Andreas Bisiadis</td>\n</tr>\n<tr>\n<td>Private Leaderboard Score</td>\n<td>41.5</td>\n</tr>\n<tr>\n<td>Private Leaderboard Place</td>\n<td>546</td>\n</tr>\n<tr>\n<td>Public Leaderboard Reference</td>\n<td>41/50 for the selected Mk I Version 16 notebook; 42/50 peak for the public no-suffix notebook lineage</td>\n</tr>\n<tr>\n<td>Team Member Name</td>\n<td>Andreas Bisiadis</td>\n</tr>\n</tbody>\n</table>\n<p>This submission was developed for Kaggle's AI Mathematical Olympiad - Progress Prize 3 competition. The selected solution is an inference-only notebook based on GPT-OSS-120B with tool-integrated Python reasoning. The notebook selected for the final submission was Mk I Version 16:</p>\n<pre><code>code/inference/gpt-oss-120b-with-tools/aimo-3-gpt-oss-120b-with-tools-version-16.ipynb\n</code></pre>\n<p>This selected notebook scored 41/50 on the public leaderboard and 41.5 on the private leaderboard. The same public, no-suffix notebook lineage reached a peak public score of 42/50 in Version 11.</p>\n<h2>A2. Background On Team</h2>\n<p>This was a solo submission by Andreas Bisiadis. The technical work represented in this repository focused on long-context LLM inference systems, vLLM backend tuning, tool-integrated mathematical reasoning, Jupyter kernel sandbox reliability, prompt minimization, and answer aggregation under Kaggle's fixed H100 runtime constraints.</p>\n<p>Primary competition work included:</p>\n<ul>\n<li>Building and iterating 68 notebook versions and previews across Mk I, Mk II, Mk III, and Mk IV.</li>\n<li>Developing the public no-suffix notebook lineage, <code>gpt-oss-120b-with-tools</code>, through 22 versions. This is the only lineage intended to correspond to the publicly available Kaggle notebook.</li>\n<li>Running later Mk II, Mk III, and Mk IV development lines as follow-up research notebooks. These lines tested more advanced pipeline ideas, but they did not improve beyond the public notebook lineage's 42/50 public leaderboard peak.</li>\n<li>Migrating the inference backend in later experiments through vLLM versions up to <code>vllm==0.17.0</code>, while the selected public Mk I Version 16 notebook used <code>vllm==0.11.2</code>.</li>\n<li>Designing a stateful Python tool sandbox with persistent Jupyter kernels, port retry logic, output truncation, process cleanup, and CPU isolation.</li>\n<li>Evaluating prompt, timeout, context length, KV cache, pass@K, voting, and backend choices against reference problems and public leaderboard submissions.</li>\n<li>Selecting a final pipeline that emphasized reliability under the 5-hour competition notebook limit.</li>\n</ul>\n<h2>A3. Summary</h2>\n<p>The final selected solution is an inference-time ensemble built around GPT-OSS-120B served locally with vLLM on a single Kaggle H100 GPU. Each math problem is solved by up to 8 parallel attempts using the Harmony prompt format, <code>ReasoningEffort.HIGH</code>, and a Python tool backed by persistent Jupyter kernels. Candidate integer answers are extracted from final answers using a <code>\\boxed{}</code> parser with a narrow textual fallback for \"final answer is\", then aggregated with inverse-entropy weighting computed from top-logprob token entropy. The selected Mk I Version 16 notebook uses <code>vllm==0.11.2</code>, a 65,536-token context, FP8 E4M3 KV cache, async scheduling, disabled log stats, and prefix caching. No model training or fine-tuning is performed; development effort was concentrated on inference robustness, tool reliability, runtime allocation, and answer selection.</p>\n<h2>A4. Feature Selection And Engineering</h2>\n<p>The effective inputs and engineered signals are:</p>\n<ul>\n<li>The original problem statement from Kaggle.</li>\n<li>A short system prompt identifying the assistant as a world-class IMO competitor and specifying the answer range and <code>\\boxed{}</code> format.</li>\n<li>A short user suffix instructing the model that it has access to <code>math</code>, <code>numpy</code>, and <code>sympy</code>.</li>\n<li>Stateful Python outputs from each attempt's Jupyter sandbox.</li>\n<li>Per-attempt top-logprob entropy over generated tokens.</li>\n<li>Normalized candidate integer answers extracted from final answer text.</li>\n</ul>\n<p>The main transformations are prompt composition, answer normalization, and entropy-based scoring. Boxed answer extraction accepts comma separators, strips them, converts to an integer, and keeps only values in <code>[0, 99999]</code>. Version 16 also includes a narrow case-insensitive fallback for text matching <code>final answer is &lt;integer&gt;</code>.</p>\n<p>No external problem data or retrieval corpus is used. The only external artifacts are allowed Kaggle inputs: the competition data, the GPT-OSS-120B model weights, utility wheels, and local tiktoken encoding files needed for offline execution.</p>\n<h2>A5. Training Method</h2>\n<p>No training, fine-tuning, reinforcement learning, or preference optimization is used in the submitted solution. The model is the pretrained GPT-OSS-120B checkpoint loaded from a Kaggle model dataset.</p>\n<p>The ensemble is created at inference time:</p>\n<ul>\n<li>8 attempts are launched per problem.</li>\n<li>Attempts use deterministic per-attempt seeds computed as <code>(seed + attempt_index) ** 2</code>, with <code>seed=42</code>.</li>\n<li>Sampling uses <code>temperature=1.0</code> and <code>min_p=0.02</code>.</li>\n<li>Each attempt can call a stateful Python tool for calculations and verification.</li>\n<li>Early stopping occurs when 4 attempts agree on the same answer.</li>\n<li>Final answer selection uses inverse entropy weighting:</li>\n</ul>\n<pre><code>mean_entropy = average per-token Shannon entropy over top logprobs\nweight = 1 / max(mean_entropy, entropy_floor)\nentropy_floor = 1e-9\n</code></pre>\n<p>The answer with the largest total weight is submitted. If no valid answer is found, the notebook returns <code>0</code>.</p>\n<h2>A6. Interesting Findings</h2>\n<p>The most important result was that inference-system reliability mattered more than adding more reasoning machinery. Strong leaderboard submissions consistently used pass@8, short prompts, FP8 KV cache, prefix caching, long context, and a 2x overprovisioned sandbox pool.</p>\n<p>Key findings from the release history:</p>\n<ul>\n<li><code>context_tokens=81920</code> avoided truncation failures observed at 65,536 tokens while preserving enough concurrency for 8 attempts.</li>\n<li>FP8 E4M3 KV cache was necessary for long-context concurrency; BF16/auto KV cache reduced concurrency and correlated with a lower public score.</li>\n<li>Pass@8 with early stop at 4 votes was a better runtime/performance tradeoff than pass@12 or pass@16 variants.</li>\n<li>Disabling vLLM prefix caching correlated with lower public scores.</li>\n<li>Short prompts were more stable than verbose problem-solving frameworks.</li>\n<li>The \"IMO Gold Medalist\" persona was more stable than broader competitor personas.</li>\n<li>A 2x sandbox pool (<code>workers=16</code> for <code>attempts=8</code>) repeatedly outperformed 1:1 worker/attempt configurations on the public leaderboard, even though the 10-problem local reference subset did not reveal the difference.</li>\n<li>For vLLM 0.17.0, the Marlin MoE backend was required to avoid CUDA OOM on the 120B model at <code>gpu_memory_utilization=0.99</code>.</li>\n<li>On the measured workload, <code>performance_mode=\"throughput\"</code> was preferred over <code>interactivity</code> because prefix caching reduced repeated prefill cost and generation throughput dominated.</li>\n<li>CUDA 12.8 wheels outperformed CUDA 13.0 wheels in the logged experiments for this pipeline.</li>\n</ul>\n<p>The later Mk II, Mk III, and Mk IV notebooks were useful research lines, but they are not the publicly available Kaggle notebook lineage. They tested superior-in-theory approaches such as vLLM upgrades, longer contexts, richer sandbox cleanup, explicit attention configuration, CUDA graph tuning, Marlin MoE backend selection, developer-channel prompt layouts, extra error interception, and XML-style prompts. Despite these improvements in engineering maturity, the follow-up pipelines did not outperform the public no-suffix notebook lineage's 42/50 public leaderboard peak.</p>\n<p>Several explored ideas were not used because they reduced reliability or exceeded the runtime budget: fine-tuning, retrieval-augmented generation, in-context example retrieval, speculative decoding, entropy pruning from larger pass@K runs, sequential refinement, extra DSL/prover tools, developer-channel prompt variants, and eager-execution router/probing experiments.</p>\n<h2>A7. Simpler Features And Methods</h2>\n<p>The closest simplified model that preserves most of the final result is the early Mk I baseline: GPT-OSS-120B with the Python tool, pass@8, prefix caching, 65,536-token context, and frequency-based voting. That baseline reached 40/50 on the public leaderboard, which is close to the selected Version 16 score of 41/50 and the public lineage peak of 42/50.</p>\n<p>The most important single model is GPT-OSS-120B. The most important method is not training but reliable inference-time sampling with Python tool use and answer aggregation.</p>\n<p>A very simple version with only one attempt would be faster but was not the selected approach because public leaderboard variance and hard-problem coverage favored multiple independent attempts.</p>\n<h2>A8. Model Execution Time</h2>\n<p>Prediction time is bounded by the Kaggle notebook limit. The final selected notebook is configured for the 5-hour competition environment with:</p>\n<table>\n<thead>\n<tr>\n<th>Runtime Setting</th>\n<th>Value</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Notebook limit</td>\n<td>17,400 seconds</td>\n</tr>\n<tr>\n<td>Server startup timeout</td>\n<td>180 seconds</td>\n</tr>\n<tr>\n<td>Base problem timeout</td>\n<td>240 seconds</td>\n</tr>\n<tr>\n<td>High problem timeout</td>\n<td>840 seconds</td>\n</tr>\n<tr>\n<td>Session timeout</td>\n<td>900 seconds</td>\n</tr>\n<tr>\n<td>Python tool timeout</td>\n<td>6 seconds</td>\n</tr>\n<tr>\n<td>Problems</td>\n<td>50</td>\n</tr>\n<tr>\n<td>Attempts per problem</td>\n<td>8</td>\n</tr>\n<tr>\n<td>Sandbox workers</td>\n<td>16</td>\n</tr>\n</tbody>\n</table>\n<p>Actual runtime is stochastic because problem difficulty, answer agreement, tool calls, and generated token counts vary. The pipeline reserves time for remaining problems and gives surplus time to current hard problems while trying to finish within the competition's 5-hour limit.</p>\n<p>The simpler Mk I-style baselines also perform no training. Their prediction runtime is similar or lower, but the selected Version 16 notebook combined tighter time allocation, refactored streaming/tool handling, regex compilation, and prefix caching in a more reliable public-notebook configuration.</p>\n<h2>A9. References</h2>\n<p>Relevant references and sources used during development:</p>\n<ul>\n<li>Kaggle, AI Mathematical Olympiad - Progress Prize 3 competition environment and evaluation API.</li>\n<li>Kaggle, Winning Model Documentation Guidelines.</li>\n<li>OpenAI GPT-OSS-120B model documentation and Harmony chat format documentation.</li>\n<li>vLLM documentation and release behavior for versions 0.11.2, 0.15.1, 0.16.0, and 0.17.0.</li>\n<li>Flash Attention 3 backend documentation and vLLM attention configuration.</li>\n<li>OCP MXFP4 quantization format references.</li>\n<li>Internal release notes in <code>code/inference/**/RELEASES.md</code>.</li>\n</ul>\n<h1>B. Submission Model</h1>\n<h2>B1. Archive Contents</h2>\n<p>The solution can be submitted as a Kaggle notebook solution. The selected final inference notebook is the public no-suffix Mk I notebook:</p>\n<pre><code>code/inference/gpt-oss-120b-with-tools/aimo-3-gpt-oss-120b-with-tools-version-16.ipynb\n</code></pre>\n<p>The utility notebook used to prepare offline wheels and tiktoken encoding files is:</p>\n<pre><code>code/inference/gpt-oss-120b-with-tools/aimo-3-utils.ipynb\n</code></pre>\n<p>The later Mk II, Mk III, and Mk IV directories document follow-up experiments. They are useful for explaining the development process, but the no-suffix <code>gpt-oss-120b-with-tools</code> lineage is the public notebook lineage, and Version 16 is the selected final submission notebook.</p>\n<p>The release notes that document development history are under:</p>\n<pre><code>code/inference/gpt-oss-120b-with-tools/RELEASES.md\ncode/inference/gpt-oss-120b-with-tools-mk-ii-previews/RELEASES.md\ncode/inference/gpt-oss-120b-with-tools-mk-ii/RELEASES.md\ncode/inference/gpt-oss-120b-with-tools-mk-iii-previews/RELEASES.md\ncode/inference/gpt-oss-120b-with-tools-mk-iii/RELEASES.md\ncode/inference/gpt-oss-120b-with-tools-mk-iv/RELEASES.md\n</code></pre>\n<p>No trained model file is produced by this repository. The pretrained model is loaded from the Kaggle GPT-OSS-120B model input.</p>\n<h2>B2. README Requirements</h2>\n<h3>Hardware</h3>\n<p>The Kaggle competition notebook environment provides:</p>\n<table>\n<thead>\n<tr>\n<th>Resource</th>\n<th>Value</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>GPU</td>\n<td>1 x NVIDIA H100 SXM</td>\n</tr>\n<tr>\n<td>GPU memory</td>\n<td>80 GB HBM3</td>\n</tr>\n<tr>\n<td>GPU bandwidth</td>\n<td>3.35 TB/s</td>\n</tr>\n<tr>\n<td>CPU workers</td>\n<td>26</td>\n</tr>\n<tr>\n<td>System memory</td>\n<td>230 GB</td>\n</tr>\n<tr>\n<td>Internet</td>\n<td>Disabled during competition inference</td>\n</tr>\n</tbody>\n</table>\n<h3>Platform</h3>\n<p>The selected notebook metadata records:</p>\n<table>\n<thead>\n<tr>\n<th>Platform Item</th>\n<th>Value</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Environment</td>\n<td>Kaggle Notebook</td>\n</tr>\n<tr>\n<td>Accelerator</td>\n<td>NVIDIA H100</td>\n</tr>\n<tr>\n<td>Python</td>\n<td>3.12.12</td>\n</tr>\n<tr>\n<td>Kaggle Docker image version</td>\n<td>31236</td>\n</tr>\n<tr>\n<td>Internet</td>\n<td>Disabled for inference notebook</td>\n</tr>\n</tbody>\n</table>\n<h3>Key Software</h3>\n<p>The selected public utility notebook downloads offline wheels for:</p>\n<pre><code>unsloth\ntrl\nvllm==0.11.2\nopenai_harmony\n</code></pre>\n<p>The utility notebook downloads Python 3.12 binary wheels using the CUDA 12.8 PyTorch index and the NVIDIA package index, then packages the wheels and tiktoken encodings into <code>wheels.tar.gz</code>. The selected inference notebook extracts that archive to:</p>\n<pre><code>/kaggle/tmp/setup\n</code></pre>\n<p>and installs from:</p>\n<pre><code>/kaggle/tmp/setup/wheels\n</code></pre>\n<p>Important runtime libraries imported by the selected notebook include <code>vllm</code>, <code>openai</code>, <code>openai_harmony</code>, <code>transformers</code>, <code>jupyter_client</code>, <code>pandas</code>, <code>polars</code>, and Kaggle's <code>kaggle_evaluation.aimo_3_inference_server</code>.</p>\n<h3>How To Train</h3>\n<p>There is no training step.</p>\n<h3>How To Predict</h3>\n<p>Run the selected Mk I Version 16 Kaggle notebook with the required Kaggle inputs attached:</p>\n<ul>\n<li>AI Mathematical Olympiad - Progress Prize 3 competition data.</li>\n<li>GPT-OSS-120B model input at <code>/kaggle/input/gpt-oss-120b/transformers/default/1</code>.</li>\n<li>Public utility input containing <code>/kaggle/input/aimo-3-utils/wheels.tar.gz</code>.</li>\n</ul>\n<p>The notebook:</p>\n<ol>\n<li>Extracts <code>/kaggle/input/aimo-3-utils/wheels.tar.gz</code> to <code>/kaggle/tmp/setup</code>.</li>\n<li>Installs <code>unsloth</code>, <code>trl</code>, <code>vllm</code>, and <code>openai_harmony</code> from offline wheels.</li>\n<li>Sets tokenizer, CUDA, and transformer-related environment variables.</li>\n<li>Starts a local vLLM OpenAI-compatible server for GPT-OSS-120B.</li>\n<li>Initializes 16 persistent Jupyter sandbox kernels.</li>\n<li>Registers <code>predict()</code> with <code>kaggle_evaluation.aimo_3_inference_server.AIMO3InferenceServer</code>.</li>\n<li>Calls <code>serve()</code> during competition reruns or <code>run_local_gateway()</code> for local reference execution.</li>\n</ol>\n<h3>Important Side Effects</h3>\n<p>The notebook intentionally modifies the runtime environment:</p>\n<ul>\n<li>Uninstalls several large packages before installing the offline wheel set: <code>keras</code>, <code>matplotlib</code>, <code>scikit-learn</code>, and <code>tensorflow</code>.</li>\n<li>Extracts the utility archive to <code>/kaggle/tmp/setup</code>.</li>\n<li>Starts a vLLM server process on port <code>8000</code>.</li>\n<li>Writes <code>vllm_server.log</code> in the working directory.</li>\n<li>Starts 16 Jupyter kernels and allocates local ports starting at <code>50000</code>.</li>\n<li>Resets and reuses sandbox kernels between problems.</li>\n<li>Does not overwrite competition input data.</li>\n</ul>\n<h3>Key Assumptions</h3>\n<ul>\n<li>The notebook runs in the Kaggle AIMO3 environment with one H100 GPU and no internet access.</li>\n<li>The GPT-OSS-120B model and <code>aimo-3-utils</code> wheel archive are attached as Kaggle inputs.</li>\n<li>The answer is an integer between 0 and 99999.</li>\n<li>The full test set contains 50 problems.</li>\n<li>The competition rerun environment sets <code>KAGGLE_IS_COMPETITION_RERUN</code>.</li>\n<li>The working directory can hold logs and kernel temporary files.</li>\n</ul>\n<h2>B3. Configuration Files</h2>\n<p>There are no external configuration files required by the final notebook. Runtime configuration is centralized in the <code>CFG</code> class inside the selected notebook.</p>\n<p>Important final configuration values include:</p>\n<table>\n<thead>\n<tr>\n<th>Setting</th>\n<th>Value</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Model</td>\n<td>GPT-OSS-120B</td>\n</tr>\n<tr>\n<td>Model path</td>\n<td><code>/kaggle/input/gpt-oss-120b/transformers/default/1</code></td>\n</tr>\n<tr>\n<td>vLLM version</td>\n<td>0.11.2</td>\n</tr>\n<tr>\n<td>Reasoning effort</td>\n<td>HIGH</td>\n</tr>\n<tr>\n<td>KV cache dtype</td>\n<td><code>fp8_e4m3</code></td>\n</tr>\n<tr>\n<td>dtype</td>\n<td><code>auto</code></td>\n</tr>\n<tr>\n<td>Context length</td>\n<td>65,536</td>\n</tr>\n<tr>\n<td>Search tokens</td>\n<td>32</td>\n</tr>\n<tr>\n<td>Buffer tokens</td>\n<td>512</td>\n</tr>\n<tr>\n<td>Max sequences</td>\n<td>256</td>\n</tr>\n<tr>\n<td>GPU memory utilization</td>\n<td>0.96</td>\n</tr>\n<tr>\n<td>Prefix caching</td>\n<td>Enabled</td>\n</tr>\n<tr>\n<td>Async scheduling</td>\n<td>Enabled</td>\n</tr>\n<tr>\n<td>Disable log stats</td>\n<td>Enabled</td>\n</tr>\n<tr>\n<td>Temperature</td>\n<td>1.0</td>\n</tr>\n<tr>\n<td>min_p</td>\n<td>0.02</td>\n</tr>\n<tr>\n<td>top_logprobs</td>\n<td>5</td>\n</tr>\n<tr>\n<td>Attempts</td>\n<td>8</td>\n</tr>\n<tr>\n<td>Workers</td>\n<td>16</td>\n</tr>\n<tr>\n<td>Early stop</td>\n<td>4 matching answers</td>\n</tr>\n<tr>\n<td>Max turns</td>\n<td>128</td>\n</tr>\n<tr>\n<td>Seed</td>\n<td>42</td>\n</tr>\n<tr>\n<td>Entropy score floor</td>\n<td><code>1e-9</code> in the inverse-entropy weighting expression</td>\n</tr>\n</tbody>\n</table>\n<h2>B4. Requirements</h2>\n<p>For the Kaggle notebook workflow, exact package installation is handled by the utility dataset. The repository <code>requirements.txt</code> corresponds to the utility notebook used by the selected Mk I Version 16 submission, <code>code/inference/gpt-oss-120b-with-tools/aimo-3-utils.ipynb</code>; it is the expanded pinned package list derived from the wheels downloaded by that utility notebook.</p>\n<p>The selected utility notebook downloads binary wheels for Python 3.12 using:</p>\n<pre><code>pip download --dest /kaggle/working/wheels --python-version 3.12 --only-binary=:all: --extra-index-url https://download.pytorch.org/whl/cu128 --extra-index-url https://pypi.nvidia.com unsloth trl vllm==0.11.2 openai_harmony\n</code></pre>\n<p>The inference notebook then installs offline with:</p>\n<pre><code>python -m pip install --no-index --find-links /kaggle/tmp/setup/wheels unsloth trl vllm openai_harmony\n</code></pre>\n<p>The tiktoken encoding files are bundled into the same archive and loaded from:</p>\n<pre><code>/kaggle/tmp/setup/tiktoken_encodings\n</code></pre>\n<h2>B5. Directory Structure</h2>\n<p>The main project directories relevant to this writeup are:</p>\n<pre><code>.\ncode/\ncode/inference/\ncode/inference/gpt-oss-120b-with-tools/\ncode/inference/gpt-oss-120b-with-tools-mk-ii-previews/\ncode/inference/gpt-oss-120b-with-tools-mk-ii/\ncode/inference/gpt-oss-120b-with-tools-mk-iii-previews/\ncode/inference/gpt-oss-120b-with-tools-mk-iii/\ncode/inference/gpt-oss-120b-with-tools-mk-iv/\ncode/other/gpt-oss-120b-error-logs/\nsandbox/\n</code></pre>\n<p>For a formal archive, generate <code>directory_structure.txt</code> from the project root with:</p>\n<pre><code>find . -type d &gt; directory_structure.txt\n</code></pre>\n<h2>B6. Settings</h2>\n<p>Kaggle's generic documentation template recommends a <code>SETTINGS.json</code> file. This repository uses a notebook-style competition submission instead. All I/O paths and runtime settings are centralized in the notebook's <code>CFG</code> class and in the Kaggle input attachments.</p>\n<p>Primary paths:</p>\n<table>\n<thead>\n<tr>\n<th>Purpose</th>\n<th>Path</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Model weights</td>\n<td><code>/kaggle/input/gpt-oss-120b/transformers/default/1</code></td>\n</tr>\n<tr>\n<td>Utility archive</td>\n<td><code>/kaggle/input/aimo-3-utils/wheels.tar.gz</code></td>\n</tr>\n<tr>\n<td>Extracted offline wheels</td>\n<td><code>/kaggle/tmp/setup/wheels</code></td>\n</tr>\n<tr>\n<td>Tiktoken encodings</td>\n<td><code>/kaggle/tmp/setup/tiktoken_encodings</code></td>\n</tr>\n<tr>\n<td>Local gateway data</td>\n<td><code>/kaggle/input/ai-mathematical-olympiad-progress-prize-3/test.csv</code></td>\n</tr>\n<tr>\n<td>vLLM server log</td>\n<td><code>vllm_server.log</code></td>\n</tr>\n</tbody>\n</table>\n<h2>B7. Serialized Trained Model</h2>\n<p>No serialized trained model is produced. The submission uses the pretrained GPT-OSS-120B checkpoint supplied as a Kaggle model input. All competition-specific behavior is implemented in the inference notebook.</p>\n<h2>B8. Entry Points</h2>\n<p>The competition entry point is the <code>predict()</code> function in the selected notebook:</p>\n<pre><code>code/inference/gpt-oss-120b-with-tools/aimo-3-gpt-oss-120b-with-tools-version-16.ipynb\n</code></pre>\n<p>The notebook creates:</p>\n<pre><code>inference_server = kaggle_evaluation.aimo_3_inference_server.AIMO3InferenceServer(predict)\n</code></pre>\n<p>Then it uses:</p>\n<pre><code>inference_server.serve()\n</code></pre>\n<p>when <code>KAGGLE_IS_COMPETITION_RERUN</code> is set. For local reference execution, it uses:</p>\n<pre><code>inference_server.run_local_gateway((\"/kaggle/input/ai-mathematical-olympiad-progress-prize-3/test.csv\",))\n</code></pre>\n<p>There are no separate <code>prepare_data.py</code>, <code>train.py</code>, or <code>predict.py</code> scripts because the Kaggle submission format is a notebook with a registered inference server callback.</p>",
      "rawMarkdown": "# A. Model Summary\n\n## A1. Background\n\n| Field | Value |\n| :--- | :--- |\n| Competition Name | AI Mathematical Olympiad - Progress Prize 3 |\n| Team Name | Andreas Bisiadis |\n| Private Leaderboard Score | 41.5 |\n| Private Leaderboard Place | 546 |\n| Public Leaderboard Reference | 41/50 for the selected Mk I Version 16 notebook; 42/50 peak for the public no-suffix notebook lineage |\n| Team Member Name | Andreas Bisiadis |\n\nThis submission was developed for Kaggle's AI Mathematical Olympiad - Progress Prize 3 competition. The selected solution is an inference-only notebook based on GPT-OSS-120B with tool-integrated Python reasoning. The notebook selected for the final submission was Mk I Version 16:\n\n```text\ncode/inference/gpt-oss-120b-with-tools/aimo-3-gpt-oss-120b-with-tools-version-16.ipynb\n```\n\nThis selected notebook scored 41/50 on the public leaderboard and 41.5 on the private leaderboard. The same public, no-suffix notebook lineage reached a peak public score of 42/50 in Version 11.\n\n## A2. Background On Team\n\nThis was a solo submission by Andreas Bisiadis. The technical work represented in this repository focused on long-context LLM inference systems, vLLM backend tuning, tool-integrated mathematical reasoning, Jupyter kernel sandbox reliability, prompt minimization, and answer aggregation under Kaggle's fixed H100 runtime constraints.\n\nPrimary competition work included:\n\n- Building and iterating 68 notebook versions and previews across Mk I, Mk II, Mk III, and Mk IV.\n- Developing the public no-suffix notebook lineage, `gpt-oss-120b-with-tools`, through 22 versions. This is the only lineage intended to correspond to the publicly available Kaggle notebook.\n- Running later Mk II, Mk III, and Mk IV development lines as follow-up research notebooks. These lines tested more advanced pipeline ideas, but they did not improve beyond the public notebook lineage's 42/50 public leaderboard peak.\n- Migrating the inference backend in later experiments through vLLM versions up to `vllm==0.17.0`, while the selected public Mk I Version 16 notebook used `vllm==0.11.2`.\n- Designing a stateful Python tool sandbox with persistent Jupyter kernels, port retry logic, output truncation, process cleanup, and CPU isolation.\n- Evaluating prompt, timeout, context length, KV cache, pass@K, voting, and backend choices against reference problems and public leaderboard submissions.\n- Selecting a final pipeline that emphasized reliability under the 5-hour competition notebook limit.\n\n## A3. Summary\n\nThe final selected solution is an inference-time ensemble built around GPT-OSS-120B served locally with vLLM on a single Kaggle H100 GPU. Each math problem is solved by up to 8 parallel attempts using the Harmony prompt format, `ReasoningEffort.HIGH`, and a Python tool backed by persistent Jupyter kernels. Candidate integer answers are extracted from final answers using a `\\boxed{}` parser with a narrow textual fallback for \"final answer is\", then aggregated with inverse-entropy weighting computed from top-logprob token entropy. The selected Mk I Version 16 notebook uses `vllm==0.11.2`, a 65,536-token context, FP8 E4M3 KV cache, async scheduling, disabled log stats, and prefix caching. No model training or fine-tuning is performed; development effort was concentrated on inference robustness, tool reliability, runtime allocation, and answer selection.\n\n## A4. Feature Selection And Engineering\n\nThe effective inputs and engineered signals are:\n\n- The original problem statement from Kaggle.\n- A short system prompt identifying the assistant as a world-class IMO competitor and specifying the answer range and `\\boxed{}` format.\n- A short user suffix instructing the model that it has access to `math`, `numpy`, and `sympy`.\n- Stateful Python outputs from each attempt's Jupyter sandbox.\n- Per-attempt top-logprob entropy over generated tokens.\n- Normalized candidate integer answers extracted from final answer text.\n\nThe main transformations are prompt composition, answer normalization, and entropy-based scoring. Boxed answer extraction accepts comma separators, strips them, converts to an integer, and keeps only values in `[0, 99999]`. Version 16 also includes a narrow case-insensitive fallback for text matching `final answer is <integer>`.\n\nNo external problem data or retrieval corpus is used. The only external artifacts are allowed Kaggle inputs: the competition data, the GPT-OSS-120B model weights, utility wheels, and local tiktoken encoding files needed for offline execution.\n\n## A5. Training Method\n\nNo training, fine-tuning, reinforcement learning, or preference optimization is used in the submitted solution. The model is the pretrained GPT-OSS-120B checkpoint loaded from a Kaggle model dataset.\n\nThe ensemble is created at inference time:\n\n- 8 attempts are launched per problem.\n- Attempts use deterministic per-attempt seeds computed as `(seed + attempt_index) ** 2`, with `seed=42`.\n- Sampling uses `temperature=1.0` and `min_p=0.02`.\n- Each attempt can call a stateful Python tool for calculations and verification.\n- Early stopping occurs when 4 attempts agree on the same answer.\n- Final answer selection uses inverse entropy weighting:\n\n```text\nmean_entropy = average per-token Shannon entropy over top logprobs\nweight = 1 / max(mean_entropy, entropy_floor)\nentropy_floor = 1e-9\n```\n\nThe answer with the largest total weight is submitted. If no valid answer is found, the notebook returns `0`.\n\n## A6. Interesting Findings\n\nThe most important result was that inference-system reliability mattered more than adding more reasoning machinery. Strong leaderboard submissions consistently used pass@8, short prompts, FP8 KV cache, prefix caching, long context, and a 2x overprovisioned sandbox pool.\n\nKey findings from the release history:\n\n- `context_tokens=81920` avoided truncation failures observed at 65,536 tokens while preserving enough concurrency for 8 attempts.\n- FP8 E4M3 KV cache was necessary for long-context concurrency; BF16/auto KV cache reduced concurrency and correlated with a lower public score.\n- Pass@8 with early stop at 4 votes was a better runtime/performance tradeoff than pass@12 or pass@16 variants.\n- Disabling vLLM prefix caching correlated with lower public scores.\n- Short prompts were more stable than verbose problem-solving frameworks.\n- The \"IMO Gold Medalist\" persona was more stable than broader competitor personas.\n- A 2x sandbox pool (`workers=16` for `attempts=8`) repeatedly outperformed 1:1 worker/attempt configurations on the public leaderboard, even though the 10-problem local reference subset did not reveal the difference.\n- For vLLM 0.17.0, the Marlin MoE backend was required to avoid CUDA OOM on the 120B model at `gpu_memory_utilization=0.99`.\n- On the measured workload, `performance_mode=\"throughput\"` was preferred over `interactivity` because prefix caching reduced repeated prefill cost and generation throughput dominated.\n- CUDA 12.8 wheels outperformed CUDA 13.0 wheels in the logged experiments for this pipeline.\n\nThe later Mk II, Mk III, and Mk IV notebooks were useful research lines, but they are not the publicly available Kaggle notebook lineage. They tested superior-in-theory approaches such as vLLM upgrades, longer contexts, richer sandbox cleanup, explicit attention configuration, CUDA graph tuning, Marlin MoE backend selection, developer-channel prompt layouts, extra error interception, and XML-style prompts. Despite these improvements in engineering maturity, the follow-up pipelines did not outperform the public no-suffix notebook lineage's 42/50 public leaderboard peak.\n\nSeveral explored ideas were not used because they reduced reliability or exceeded the runtime budget: fine-tuning, retrieval-augmented generation, in-context example retrieval, speculative decoding, entropy pruning from larger pass@K runs, sequential refinement, extra DSL/prover tools, developer-channel prompt variants, and eager-execution router/probing experiments.\n\n## A7. Simpler Features And Methods\n\nThe closest simplified model that preserves most of the final result is the early Mk I baseline: GPT-OSS-120B with the Python tool, pass@8, prefix caching, 65,536-token context, and frequency-based voting. That baseline reached 40/50 on the public leaderboard, which is close to the selected Version 16 score of 41/50 and the public lineage peak of 42/50.\n\nThe most important single model is GPT-OSS-120B. The most important method is not training but reliable inference-time sampling with Python tool use and answer aggregation.\n\nA very simple version with only one attempt would be faster but was not the selected approach because public leaderboard variance and hard-problem coverage favored multiple independent attempts.\n\n## A8. Model Execution Time\n\nPrediction time is bounded by the Kaggle notebook limit. The final selected notebook is configured for the 5-hour competition environment with:\n\n| Runtime Setting | Value |\n| :--- | :--- |\n| Notebook limit | 17,400 seconds |\n| Server startup timeout | 180 seconds |\n| Base problem timeout | 240 seconds |\n| High problem timeout | 840 seconds |\n| Session timeout | 900 seconds |\n| Python tool timeout | 6 seconds |\n| Problems | 50 |\n| Attempts per problem | 8 |\n| Sandbox workers | 16 |\n\nActual runtime is stochastic because problem difficulty, answer agreement, tool calls, and generated token counts vary. The pipeline reserves time for remaining problems and gives surplus time to current hard problems while trying to finish within the competition's 5-hour limit.\n\nThe simpler Mk I-style baselines also perform no training. Their prediction runtime is similar or lower, but the selected Version 16 notebook combined tighter time allocation, refactored streaming/tool handling, regex compilation, and prefix caching in a more reliable public-notebook configuration.\n\n## A9. References\n\nRelevant references and sources used during development:\n\n- Kaggle, AI Mathematical Olympiad - Progress Prize 3 competition environment and evaluation API.\n- Kaggle, Winning Model Documentation Guidelines.\n- OpenAI GPT-OSS-120B model documentation and Harmony chat format documentation.\n- vLLM documentation and release behavior for versions 0.11.2, 0.15.1, 0.16.0, and 0.17.0.\n- Flash Attention 3 backend documentation and vLLM attention configuration.\n- OCP MXFP4 quantization format references.\n- Internal release notes in `code/inference/**/RELEASES.md`.\n\n# B. Submission Model\n\n## B1. Archive Contents\n\nThe solution can be submitted as a Kaggle notebook solution. The selected final inference notebook is the public no-suffix Mk I notebook:\n\n```text\ncode/inference/gpt-oss-120b-with-tools/aimo-3-gpt-oss-120b-with-tools-version-16.ipynb\n```\n\nThe utility notebook used to prepare offline wheels and tiktoken encoding files is:\n\n```text\ncode/inference/gpt-oss-120b-with-tools/aimo-3-utils.ipynb\n```\n\nThe later Mk II, Mk III, and Mk IV directories document follow-up experiments. They are useful for explaining the development process, but the no-suffix `gpt-oss-120b-with-tools` lineage is the public notebook lineage, and Version 16 is the selected final submission notebook.\n\nThe release notes that document development history are under:\n\n```text\ncode/inference/gpt-oss-120b-with-tools/RELEASES.md\ncode/inference/gpt-oss-120b-with-tools-mk-ii-previews/RELEASES.md\ncode/inference/gpt-oss-120b-with-tools-mk-ii/RELEASES.md\ncode/inference/gpt-oss-120b-with-tools-mk-iii-previews/RELEASES.md\ncode/inference/gpt-oss-120b-with-tools-mk-iii/RELEASES.md\ncode/inference/gpt-oss-120b-with-tools-mk-iv/RELEASES.md\n```\n\nNo trained model file is produced by this repository. The pretrained model is loaded from the Kaggle GPT-OSS-120B model input.\n\n## B2. README Requirements\n\n### Hardware\n\nThe Kaggle competition notebook environment provides:\n\n| Resource | Value |\n| :--- | :--- |\n| GPU | 1 x NVIDIA H100 SXM |\n| GPU memory | 80 GB HBM3 |\n| GPU bandwidth | 3.35 TB/s |\n| CPU workers | 26 |\n| System memory | 230 GB |\n| Internet | Disabled during competition inference |\n\n### Platform\n\nThe selected notebook metadata records:\n\n| Platform Item | Value |\n| :--- | :--- |\n| Environment | Kaggle Notebook |\n| Accelerator | NVIDIA H100 |\n| Python | 3.12.12 |\n| Kaggle Docker image version | 31236 |\n| Internet | Disabled for inference notebook |\n\n### Key Software\n\nThe selected public utility notebook downloads offline wheels for:\n\n```text\nunsloth\ntrl\nvllm==0.11.2\nopenai_harmony\n```\n\nThe utility notebook downloads Python 3.12 binary wheels using the CUDA 12.8 PyTorch index and the NVIDIA package index, then packages the wheels and tiktoken encodings into `wheels.tar.gz`. The selected inference notebook extracts that archive to:\n\n```text\n/kaggle/tmp/setup\n```\n\nand installs from:\n\n```text\n/kaggle/tmp/setup/wheels\n```\n\nImportant runtime libraries imported by the selected notebook include `vllm`, `openai`, `openai_harmony`, `transformers`, `jupyter_client`, `pandas`, `polars`, and Kaggle's `kaggle_evaluation.aimo_3_inference_server`.\n\n### How To Train\n\nThere is no training step.\n\n### How To Predict\n\nRun the selected Mk I Version 16 Kaggle notebook with the required Kaggle inputs attached:\n\n- AI Mathematical Olympiad - Progress Prize 3 competition data.\n- GPT-OSS-120B model input at `/kaggle/input/gpt-oss-120b/transformers/default/1`.\n- Public utility input containing `/kaggle/input/aimo-3-utils/wheels.tar.gz`.\n\nThe notebook:\n\n1. Extracts `/kaggle/input/aimo-3-utils/wheels.tar.gz` to `/kaggle/tmp/setup`.\n2. Installs `unsloth`, `trl`, `vllm`, and `openai_harmony` from offline wheels.\n3. Sets tokenizer, CUDA, and transformer-related environment variables.\n4. Starts a local vLLM OpenAI-compatible server for GPT-OSS-120B.\n5. Initializes 16 persistent Jupyter sandbox kernels.\n6. Registers `predict()` with `kaggle_evaluation.aimo_3_inference_server.AIMO3InferenceServer`.\n7. Calls `serve()` during competition reruns or `run_local_gateway()` for local reference execution.\n\n### Important Side Effects\n\nThe notebook intentionally modifies the runtime environment:\n\n- Uninstalls several large packages before installing the offline wheel set: `keras`, `matplotlib`, `scikit-learn`, and `tensorflow`.\n- Extracts the utility archive to `/kaggle/tmp/setup`.\n- Starts a vLLM server process on port `8000`.\n- Writes `vllm_server.log` in the working directory.\n- Starts 16 Jupyter kernels and allocates local ports starting at `50000`.\n- Resets and reuses sandbox kernels between problems.\n- Does not overwrite competition input data.\n\n### Key Assumptions\n\n- The notebook runs in the Kaggle AIMO3 environment with one H100 GPU and no internet access.\n- The GPT-OSS-120B model and `aimo-3-utils` wheel archive are attached as Kaggle inputs.\n- The answer is an integer between 0 and 99999.\n- The full test set contains 50 problems.\n- The competition rerun environment sets `KAGGLE_IS_COMPETITION_RERUN`.\n- The working directory can hold logs and kernel temporary files.\n\n## B3. Configuration Files\n\nThere are no external configuration files required by the final notebook. Runtime configuration is centralized in the `CFG` class inside the selected notebook.\n\nImportant final configuration values include:\n\n| Setting | Value |\n| :--- | :--- |\n| Model | GPT-OSS-120B |\n| Model path | `/kaggle/input/gpt-oss-120b/transformers/default/1` |\n| vLLM version | 0.11.2 |\n| Reasoning effort | HIGH |\n| KV cache dtype | `fp8_e4m3` |\n| dtype | `auto` |\n| Context length | 65,536 |\n| Search tokens | 32 |\n| Buffer tokens | 512 |\n| Max sequences | 256 |\n| GPU memory utilization | 0.96 |\n| Prefix caching | Enabled |\n| Async scheduling | Enabled |\n| Disable log stats | Enabled |\n| Temperature | 1.0 |\n| min_p | 0.02 |\n| top_logprobs | 5 |\n| Attempts | 8 |\n| Workers | 16 |\n| Early stop | 4 matching answers |\n| Max turns | 128 |\n| Seed | 42 |\n| Entropy score floor | `1e-9` in the inverse-entropy weighting expression |\n\n## B4. Requirements\n\nFor the Kaggle notebook workflow, exact package installation is handled by the utility dataset. The repository `requirements.txt` corresponds to the utility notebook used by the selected Mk I Version 16 submission, `code/inference/gpt-oss-120b-with-tools/aimo-3-utils.ipynb`; it is the expanded pinned package list derived from the wheels downloaded by that utility notebook.\n\nThe selected utility notebook downloads binary wheels for Python 3.12 using:\n\n```text\npip download --dest /kaggle/working/wheels --python-version 3.12 --only-binary=:all: --extra-index-url https://download.pytorch.org/whl/cu128 --extra-index-url https://pypi.nvidia.com unsloth trl vllm==0.11.2 openai_harmony\n```\n\nThe inference notebook then installs offline with:\n\n```text\npython -m pip install --no-index --find-links /kaggle/tmp/setup/wheels unsloth trl vllm openai_harmony\n```\n\nThe tiktoken encoding files are bundled into the same archive and loaded from:\n\n```text\n/kaggle/tmp/setup/tiktoken_encodings\n```\n\n## B5. Directory Structure\n\nThe main project directories relevant to this writeup are:\n\n```text\n.\ncode/\ncode/inference/\ncode/inference/gpt-oss-120b-with-tools/\ncode/inference/gpt-oss-120b-with-tools-mk-ii-previews/\ncode/inference/gpt-oss-120b-with-tools-mk-ii/\ncode/inference/gpt-oss-120b-with-tools-mk-iii-previews/\ncode/inference/gpt-oss-120b-with-tools-mk-iii/\ncode/inference/gpt-oss-120b-with-tools-mk-iv/\ncode/other/gpt-oss-120b-error-logs/\nsandbox/\n```\n\nFor a formal archive, generate `directory_structure.txt` from the project root with:\n\n```text\nfind . -type d > directory_structure.txt\n```\n\n## B6. Settings\n\nKaggle's generic documentation template recommends a `SETTINGS.json` file. This repository uses a notebook-style competition submission instead. All I/O paths and runtime settings are centralized in the notebook's `CFG` class and in the Kaggle input attachments.\n\nPrimary paths:\n\n| Purpose | Path |\n| :--- | :--- |\n| Model weights | `/kaggle/input/gpt-oss-120b/transformers/default/1` |\n| Utility archive | `/kaggle/input/aimo-3-utils/wheels.tar.gz` |\n| Extracted offline wheels | `/kaggle/tmp/setup/wheels` |\n| Tiktoken encodings | `/kaggle/tmp/setup/tiktoken_encodings` |\n| Local gateway data | `/kaggle/input/ai-mathematical-olympiad-progress-prize-3/test.csv` |\n| vLLM server log | `vllm_server.log` |\n\n## B7. Serialized Trained Model\n\nNo serialized trained model is produced. The submission uses the pretrained GPT-OSS-120B checkpoint supplied as a Kaggle model input. All competition-specific behavior is implemented in the inference notebook.\n\n## B8. Entry Points\n\nThe competition entry point is the `predict()` function in the selected notebook:\n\n```text\ncode/inference/gpt-oss-120b-with-tools/aimo-3-gpt-oss-120b-with-tools-version-16.ipynb\n```\n\nThe notebook creates:\n\n```text\ninference_server = kaggle_evaluation.aimo_3_inference_server.AIMO3InferenceServer(predict)\n```\n\nThen it uses:\n\n```text\ninference_server.serve()\n```\n\nwhen `KAGGLE_IS_COMPETITION_RERUN` is set. For local reference execution, it uses:\n\n```text\ninference_server.run_local_gateway((\"/kaggle/input/ai-mathematical-olympiad-progress-prize-3/test.csv\",))\n```\n\nThere are no separate `prepare_data.py`, `train.py`, or `predict.py` scripts because the Kaggle submission format is a notebook with a registered inference server callback.",
      "votes": 28
    },
    {
      "id": 3463558,
      "postDate": "2026-05-27T09:07:11.930Z",
      "content": "<p>I think you are the real champion on this challenge, respect you!</p>",
      "rawMarkdown": "I think you are the real champion on this challenge, respect you!",
      "votes": 3
    },
    {
      "id": 3461590,
      "postDate": "2026-05-20T22:04:15.470Z",
      "content": "<p>At least for this competition, your work feels like an “Attention Is All You Need” level contribution. Thank you for sharing it.</p>",
      "rawMarkdown": "At least for this competition, your work feels like an “Attention Is All You Need” level contribution. Thank you for sharing it.",
      "votes": 3,
      "replies": [
        {
          "id": 3461592,
          "postDate": "2026-05-20T22:11:50.640Z",
          "content": "<blockquote>\n  <p>your work feels like an “Attention Is All You Need” level contribution.</p>\n</blockquote>\n<p>Thank you. That praise means a lot.</p>",
          "rawMarkdown": "> your work feels like an “Attention Is All You Need” level contribution.\n\nThank you. That praise means a lot.",
          "votes": 1
        }
      ]
    },
    {
      "id": 3467190,
      "postDate": "2026-06-05T16:34:01.877Z",
      "content": "<p>Excellent writeup! Phenomenal work.</p>",
      "rawMarkdown": "Excellent writeup! Phenomenal work.",
      "votes": 1
    },
    {
      "id": 3463840,
      "postDate": "2026-05-28T04:56:22.743Z",
      "content": "<p>Cool WriteUp on GPT-OSS-120B (with tools) <a href=\"https://www.kaggle.com/andreasbis\" target=\"_blank\">@andreasbis</a> </p>",
      "rawMarkdown": "Cool WriteUp on GPT-OSS-120B (with tools) @andreasbis ",
      "votes": 1
    },
    {
      "id": 3464276,
      "postDate": "2026-05-29T11:38:53.467Z",
      "content": "<p>Thanks for this amazing contribution.\nI honestly wish you had won the competition, it would have been totally deserved.\nLooking forward to seeing you win the writeup prize.</p>",
      "rawMarkdown": "Thanks for this amazing contribution.\nI honestly wish you had won the competition, it would have been totally deserved.\nLooking forward to seeing you win the writeup prize.",
      "votes": 2,
      "replies": [
        {
          "id": 3473101,
          "postDate": "2026-06-15T19:45:38.947Z",
          "content": "<p>Just FYI, Andreas Bisiadis didn't enter his write-up towards the write-up prize (i.e., he didn't leave a comment here to enter it: <a href=\"https://www.kaggle.com/competitions/ai-mathematical-olympiad-progress-prize-3/discussion/689703\" target=\"_blank\">https://www.kaggle.com/competitions/ai-mathematical-olympiad-progress-prize-3/discussion/689703</a>)</p>",
          "rawMarkdown": "Just FYI, Andreas Bisiadis didn't enter his write-up towards the write-up prize (i.e., he didn't leave a comment here to enter it: https://www.kaggle.com/competitions/ai-mathematical-olympiad-progress-prize-3/discussion/689703)",
          "votes": 1
        }
      ]
    },
    {
      "id": 3461921,
      "postDate": "2026-05-21T18:50:42.673Z",
      "content": "<p>Really impressive engineering work. Especially the focus on inference reliability and tool orchestration instead of overcomplicating the pipeline.</p>",
      "rawMarkdown": "Really impressive engineering work. Especially the focus on inference reliability and tool orchestration instead of overcomplicating the pipeline.",
      "votes": 1
    },
    {
      "id": 3461678,
      "postDate": "2026-05-21T06:10:18.193Z",
      "content": "<p>Thank you so much for this amazing work. It has effectively become the foundation for the entire competition. Almost everyone here has used your approach and adapted it according to their own knowledge. We owe a massive part of our progress with our work to your groundwork. You truly deserve the title of <strong>Best contributor</strong> in this competition for the sheer impact you’ve had on everyone. Thank you.</p>",
      "rawMarkdown": "Thank you so much for this amazing work. It has effectively become the foundation for the entire competition. Almost everyone here has used your approach and adapted it according to their own knowledge. We owe a massive part of our progress with our work to your groundwork. You truly deserve the title of **Best contributor** in this competition for the sheer impact you’ve had on everyone. Thank you.",
      "votes": 2
    },
    {
      "id": 3461651,
      "postDate": "2026-05-21T03:07:18.877Z",
      "content": "<p>Thank you for putting this writeup together, and of course sharing your code in the first place. Your notebook was the foundation for many of us, including myself. Incredibly efficient pipeline! Seeing the thought process behind some of the design choices is very useful.</p>",
      "rawMarkdown": "Thank you for putting this writeup together, and of course sharing your code in the first place. Your notebook was the foundation for many of us, including myself. Incredibly efficient pipeline! Seeing the thought process behind some of the design choices is very useful.",
      "votes": 2
    },
    {
      "id": 3462122,
      "postDate": "2026-05-22T08:09:51Z",
      "rawMarkdown": "",
      "isDeleted": true
    }
  ],
  "complete": true,
  "source": "live",
  "fetched_at": "2026-10-20T04:26:35Z",
  "competition_id": 118448,
  "competition_slug": "ai-mathematical-olympiad-progress-prize-3",
  "team_id": 14799130,
  "solution_url": "/competitions/ai-mathematical-olympiad-progress-prize-3/writeups/gpt-oss-120b-with-tools-technical-writeup"
}