Skip to content

Repository files navigation

Current Advances in LLM Reasoning — ACL/IJCAI 2026 Tutorial Demo

Live-demo materials for the tutorial, driven through OpenRouter so everything runs on a laptop with no local model or GPU.

Setup

Three steps and you're ready to run the notebook:

1. Clone the repo

git clone git@github.com:au-clan/llmreasoning_materials.git
cd llmreasoning_materials

2. Install dependencies with uv

uv sync                      # installs everything from pyproject.toml / uv.lock

If you don't have uv yet, install it first (then re-run uv sync):

# macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows (PowerShell)
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"

See the uv install docs for other options.

3. Add your OpenRouter API key

The repo ships a .env_example template. Open it, paste in your key from openrouter.ai/keys, then rename the file to .env:

# after editing .env_example to add your key:
mv .env_example .env

.env should look like:

OPENROUTER_API_KEY=sk-or-...
MODEL=meta-llama/llama-3.1-8b-instruct   # optional: the default model

That's it — open notebook.ipynb (select this project's uv venv as the kernel) and run top to bottom.


The notebook — a six-part tour

The hands-on companion to the ACL/IJCAI 2026 tutorial (llmreasoning.github.io). notebook.ipynb runs top to bottom as six short, self-contained stories:

  1. Instability — do models even reason consistently? Re-grade repeated Game24 attempts and watch one model, one prompt, land on different answers.
  2. Test-time strategies — spending inference compute to reason better: input–output, self-consistency, ReAct, agentic tool-use, self-refine, tree-of-thoughts, and fleet-of-agents, compared under a budget.
  3. Post-training — how successive stages (Pretrained → SFT → MPO → GSPO) reshape one model's reasoning.
  4. Budget forcing — directly controlling how long the model thinks, on easy problems (with and without a forced budget) vs. a hard one.
  5. Multilinguality — does the model reason in the language you ask in? Solve MGSM across languages and look inside a real chain-of-thought.
  6. Strict separation — the architectural alternative: hand the reasoning to a deterministic Bayesian engine (MoBayes) for an auditable trace. Case study: clinical diagnostic dialogue.

Browser demos

A few sections have live, browser-based companions. Launch them from one local server:

uv run python demo/serve.py            # opens an index page — pick a demo

Routes: /game24 and /protocols (offline, self-contained HTML) and /strategies (streams models live over SSE — needs your OpenRouter key).


Layout

notebook.ipynb             # the six-part tutorial notebook (run top to bottom)
run_demo.py                # reasoning-strategies CLI: demo | bench | plot | trace | live
demo/                      # all live demo material, one launcher
  serve.py                 # unified launcher: `uv run python demo/serve.py`
  reasoning_demo/          # §2.1 — test-time reasoning strategies engine
    client.py              # OpenRouter wrapper (sync + async), latency/token accounting
    mgsm.py                # Part 1: faithful MGSM eval + solvers
    traces.py              # Part 1: load real s1.1 traces, highlight CoT by script
    strategies.py          # Part 2: the seven strategies + sweep registry
    bench.py / plot.py     # Part 2: budget sweep -> results.json -> pareto.png
    extract.py / tools.py  # Part 2: answer parsing, majority vote, calculator tool
    tracevis.py / liveserver.py  # Part 2: static + live SSE trace explorers
    data.py                # GSM8K loader (bundled sample or HF)
  instability/             # §1 — consistency/instability eval views (+ logs, models.parquet)
    attempts.py            # parse + re-grade repeated Game24 attempts
    consistency.py         # seed-variance grid over models.parquet
    game24_tree.py / protocols_app.py  # self-contained HTML visualizers
data/
  gsm8k_sample.jsonl       # 12 GSM8K problems (offline-safe)
  mgsm/                    # MGSM TSVs, 250 problems/language
repos/                     # vendored crosslingual-test-time-scaling (read-only data source)

About

No description, website, or topics provided.

Resources

Stars

25 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages