22 1 week ago

Quark by FirstPrinciples: a 9B reasoning model for physics, science and math

tools thinking
ollama run FirstPrinciples/quark

Applications

Claude Code
Claude Code ollama launch claude --model FirstPrinciples/quark
OpenCode
OpenCode ollama launch opencode --model FirstPrinciples/quark
Hermes Agent
Hermes Agent ollama launch hermes --model FirstPrinciples/quark
OpenClaw
OpenClaw ollama launch openclaw --model FirstPrinciples/quark

Models

View all →

Readme

quark_banner_final.png

Quark

Quark is a 9B reasoning model for physics, science and maths, built by FirstPrinciples. The base model is Qwen3.5-9B with additional post-training: supervised fine-tuning on our curated physics, maths and coding mix.

It outperforms the base model on a range of benchmarks, and reaches graduate-level science scores comparable to much larger open models. An 8-bit (Q8_0) version, FirstPrinciples/quark-q8, is about half the size and matches bf16 on every benchmark below.

Quark is the first in a series of small, powerful scientific reasoning models. You can run it locally (see Usage) or on Theo Platform, a research platform for complex problems, where you can use it alongside other frontier models, check its results with Python, Mathematica and Sage, and keep each session as a research graph you can revise one step at a time.

Results

Accuracy (%), measured with EvalScope: thinking mode, up to 131,072 output tokens, and following the Qwen3.5 model card’s sampling settings. AIME 2025 is averaged over 16 samples per problem and GPQA Diamond over 8. HLE (text-only, 2,158 questions) is graded by Qwen3.5-27B as judge.

Benchmark Qwen3.5-9B Quark (bf16) Quark (Q8_0)
GPQA Diamond 81.6 87.4 87.8
AIME 2025 86.9 91.7 94.0
MMLU-Pro Physics 90.7 91.0 91.6
Humanity’s Last Exam (HLE), text 15.9 22.7 22.3
HLE, physics subset 8.4 15.8 16.3

All were measured by us with the same setup.

Compared with other open models (scores as reported by each developer):

Model Size GPQA Diamond AIME 2025 HLE
Quark (fp16) 9B 87.4 91.7 22.7
Quark (Q8_0) 9B 87.8 94.0 22.3
Qwen3-8B 8B 59.6 69.3 4.4
Qwen3.5-9B 9B 81.7 — 14.9¹
NVIDIA Nemotron Nano 9B v2 9B 64.0 72.1 6.5
gpt-oss-20b 21B 71.5 91.7 10.9
Qwen3.5-27B 27B 85.5 — 24.3
Qwen3.8-27B 27B 89.2 — 30.8
gpt-oss-120b 117B 80.1 92.5 14.9
DeepSeek-R1-0528 671B 81.0 87.5 17.7
Kimi K2 Thinking 1T 84.5 94.5 23.9

— = not reported. Sources: each model’s official model card; Quark (bf16) and its Q8_0 version measured by us (see above)

¹ Not reported by Qwen; measured by Artificial Analysis (reasoning mode, 2,158 text-only HLE questions).

Training data

Quark was fine-tuned on our curated mix of about 200,000 physics, science, maths and coding problems, each with a worked solution written by Qwen3.8-Flash-Next. Solutions were filtered by rejection sampling, keeping only correct ones. Duplicate questions were removed, and so was any question that shares at least half of a benchmark question’s word 13-grams (after lower-casing and keeping only letters and digits). We checked against the full GPQA Diamond, AIME 2025, MATH-500, MMLU-Pro, SuperGPQA and HLE (text-only) sets.

Usage

ollama run FirstPrinciples/quark

The recommended sampling settings and a 131,072-token context are built in. We recommend keeping the full 131,072 tokens: hard problems need long answers, and shorter limits cut them off.

Model Weights Size
FirstPrinciples/quark bf16 18.4 GB
FirstPrinciples/quark-q8 Q8_0 (int8) 9.8 GB

The bf16 model does not fit on a 16 GB Mac. Use quark-q8 there, and lower the context inside the chat with /set parameter num_ctx 32768 (longer answers are then cut off); at 131,072 tokens it needs about 15 GB of GPU memory.

Thinking is on by default. Turn it off with /set nothink in the chat, or "think": false in the API. Ollama also serves an OpenAI-compatible API at http://localhost:11434/v1.

Recommended sampling (from the Qwen3.5 model card; the thinking settings are the defaults):

Thinking (default) Non-thinking
temperature / top_p / top_k 1.0 / 0.95 / 20 1.0 / 1.0 / 40
presence penalty 1.5 2.0
max output tokens up to 131,072 32,768

Example

A hard problem from AIME 2025 (II, problem 15), in thinking mode with the recommended sampling settings:

Let f(x) = (x − 18)(x − 72)(x − 98)(x − k) / x. There exist exactly three positive real values of k such that f has a minimum at exactly two real values of x. Find the sum of these three values of k.

Qwen3.5-9B Quark
Correct, out of 16 attempts 1 10
Most common answer 188 ✗ (14 of 16 attempts) 240 ✓
Approach Finds no way in and guesses that k must be one of the existing roots: 18 + 72 + 98 = 188 Turns “a minimum at two points” into an equation for k and solves it

How Quark solves it (summarised from its answer):

  1. If the minimum value m is reached at two points u and v, the numerator minus mx must be a perfect square: (x − 18)(x − 72)(x − 98)(x − k) − mx = (x − u)²(x − v)²
  2. Matching coefficients and eliminating u and v leaves one equation in k: (k² − 376k − 5120)² = 8128512·k
  3. It factors as (k − 8)(k − 32)(k − 200)(k − 512) = 0, and checking the sign before squaring rules out k = 512.
  4. So k = 8, 32, 200, and the answer is 240.

Both models’ full written answers are on the Hugging Face model card.

Limitations

  • Needs a long output budget. At a 32K-token limit about 20% of GPQA answers are cut off and GPQA drops to 74.9, below the base model.
  • Non-thinking mode is slightly weaker than the base model (AIME 56.7 vs 59.8, GPQA 76.8 vs 79.6).
  • Specialised: trained only on single-turn science, maths and code questions; not trained for conversation, tool use, images or safety beyond what Qwen3.5-9B already has.

License

Apache 2.0