Agent Readout

Math and Reasoning Models: DeepSeek-R1 vs Qwen QwQ vs Llama Reasoning

A benchmark comparison of the leading open-source thinking/reasoning models -- DeepSeek-R1, QwQ-32B, and Llama-based reasoning distillations -- covering accuracy, token costs, and when to use each.

Author
General Compute
Published
2026-07-25
Tags
benchmarks, reasoning models, DeepSeek-R1, QwQ, Llama, math, inference

Markdown body


A new category of LLMs has emerged: models that "think before they answer." Rather than generating a response in a single pass, these models produce chains of intermediate reasoning steps -- sometimes thousands of tokens -- before arriving at a final answer. This approach dramatically improves performance on math, logic, and multi-step reasoning tasks, but it comes with inference tradeoffs that matter in production.

This post benchmarks the three main open-source reasoning model families available today: DeepSeek-R1, Qwen's QwQ-32B, and the Llama-based reasoning distillations. We cover how they perform, where they differ, and what the inference cost looks like in practice.

## How Reasoning Models Work

Standard instruction-tuned models predict the next token based on the input prompt. They're fast but struggle with problems that require holding multiple reasoning steps in working memory.

Reasoning models are trained to produce a "thinking" block before the final answer. DeepSeek-R1 uses `<think>...</think>` tags. QwQ generates an internal scratchpad. During this phase, the model explores approaches, backtracks, and self-corrects. The final output is more reliable because the model has worked through the problem before committing to an answer.

The tradeoff: those thinking tokens cost real compute. A DeepSeek-R1 response to a hard math problem might generate 2,000 thinking tokens before a 50-token answer. At inference time, you pay for all 2,050.

## DeepSeek-R1

Released by DeepSeek in January 2025, R1 is the strongest open-source reasoning model available. It was trained using Group Relative Policy Optimization (GRPO), a reinforcement learning technique where the model learns to prefer reasoning chains that lead to correct answers rather than plausible-sounding ones.

**Architecture**: 671B parameters total, mixture-of-experts with 37B active parameters per forward pass. Also available as distilled versions ranging from 7B to 70B.

**Benchmark results:**

| Benchmark | DeepSeek-R1 | OpenAI o1 |
|-----------|------------|-----------|
| AIME 2024 | 79.8% | 74.3% |
| MATH-500 | 97.3% | 96.4% |
| GPQA Diamond | 71.5% | 75.7% |
| Codeforces percentile | 96.3 | 96.6 |
| LiveCodeBench | 65.9% | 63.4% |

On math benchmarks, R1 is slightly ahead of o1. On science reasoning (GPQA Diamond), o1 holds a narrow edge. On coding, they're essentially tied.

The distilled variants are worth examining separately:

- **DeepSeek-R1-Distill-Qwen-32B**: Achieves 72.6% on AIME 2024 -- a 32B model beating o1-mini (70%) on a hard competition math benchmark.
- **DeepSeek-R1-Distill-Llama-70B**: Around 70% on AIME 2024 and 94% on MATH-500. Competitive with QwQ-32B at similar compute cost.
- **DeepSeek-R1-Distill-Llama-8B**: Around 89% on MATH-500, which is notable for an 8B model. It won't crack AIME (roughly 25-30%), but handles structured math problems well.

Distillation works here because the full R1 model generates high-quality reasoning traces, and the student models learn reasoning patterns rather than just answers.

## QwQ-32B

QwQ-32B comes from Alibaba's Qwen team. It's a 32B dense model trained specifically for reasoning tasks. Unlike R1's 671B MoE architecture, QwQ is a dense transformer -- which makes it cheaper to serve per token than the full R1 model, and simpler to deploy.

**Benchmark results:**

| Benchmark | QwQ-32B | DeepSeek-R1 | o1-mini |
|-----------|---------|------------|---------|
| AIME 2024 | 50.0% | 79.8% | 70.0% |
| MATH-500 | 90.6% | 97.3% | 90.0% |
| GPQA Diamond | 65.2% | 71.5% | 60.0% |
| LiveCodeBench | ~50% | 65.9% | ~52% |

QwQ is meaningfully behind R1 on all benchmarks but ahead of o1-mini on GPQA. For a 32B dense model, those are solid numbers.

One practical note: QwQ can produce very long reasoning chains even for relatively simple problems. In production, this can significantly inflate token counts. Implementing a token budget or stripping the think block from logs is advisable.

## Llama-Based Reasoning Models

"Llama reasoning" covers a few different things in practice.

**DeepSeek-R1 distillations on Llama**: DeepSeek released two Llama-architecture distillations of R1: an 8B and a 70B. These use DeepSeek's reasoning traces to fine-tune a Llama base model. The 70B version is the most competitive Llama-based reasoning model available.

| Benchmark | R1-Distill-Llama-70B | R1-Distill-Llama-8B | QwQ-32B |
|-----------|---------------------|---------------------|---------|
| AIME 2024 | ~70% | ~28% | 50.0% |
| MATH-500 | ~94% | ~89% | 90.6% |
| GPQA Diamond | ~67% | ~49% | 65.2% |

The Llama-70B distill is close to QwQ-32B on MATH-500 and edges ahead on GPQA, while running on the Llama architecture with broader tooling support (llama.cpp, vLLM, Transformers, Ollama).

The 8B distill suits constrained environments. 89% on MATH-500 from an 8B model is a strong result for structured problem-solving, even if competition-level math is out of reach.

**Meta's Llama 3.3**: Meta hasn't released an explicit "reasoning" variant with chain-of-thought training, but Llama 3.3 70B shows substantially better performance on math and reasoning benchmarks than earlier versions, due to improved instruction following and RLHF. It won't compete with R1 on hard math (AIME roughly 10-15%), but it handles structured reasoning tasks without the overhead of long thinking chains.

## Comparing Inference Costs

Benchmarks measure accuracy. But in production, cost and latency matter as much.

**Token counts**: Reasoning models generate far more tokens per query than standard models. A DeepSeek-R1 response to a hard math problem might produce 3-5x the token count of a Llama 3.3 response. Budget for this when estimating costs.

**Effective throughput**: If you're serving these via an API priced per token, cost per correct answer matters more than cost per token. The combination of thinking tokens and larger model size means reasoning models are more expensive per query, but the accuracy lift can justify that cost depending on the application.

A rough comparison for solving a MATH-500 level problem:

| Model | Accuracy | Avg tokens/query | Relative cost/correct answer |
|-------|----------|-----------------|------------------------------|
| DeepSeek-R1 (671B MoE) | 97.3% | ~3,000 | High |
| R1-Distill-Llama-70B | ~94% | ~2,500 | Medium-high |
| QwQ-32B | 90.6% | ~2,800 | Medium |
| R1-Distill-Llama-8B | ~89% | ~2,000 | Low |
| Llama 3.3 70B | ~70% | ~400 | Low-medium |

For tasks where accuracy is critical -- automated math grading, scientific reasoning, code verification -- R1 or the 70B distill is worth the cost. For tasks where 70-80% accuracy is sufficient or where you can validate results externally, Llama 3.3 70B is substantially cheaper.

## When to Use Each Model

**Use DeepSeek-R1 (full or 32B Qwen distill) when:**
- You need best-in-class accuracy on math or logical reasoning
- Wrong answers have significant consequences (financial calculations, scientific analysis)
- You're running batch jobs and can tolerate 5-15 second response times

**Use QwQ-32B when:**
- You want a reasoning model without the MoE serving complexity
- You prefer a dense 32B model over a large sparse architecture
- You need easier local deployment via Ollama or llama.cpp

**Use R1-Distill-Llama-70B when:**
- You want near-R1 accuracy in a format with broader ecosystem support
- You're already running Llama infrastructure and want to add reasoning capability
- You need Llama's permissive license for commercial deployment

**Use R1-Distill-Llama-8B when:**
- Cost and speed are the primary constraints
- The task involves structured math or logic that doesn't require competition-level accuracy
- You're running on consumer hardware or in memory-constrained environments

**Use Llama 3.3 70B (no reasoning chain) when:**
- You need fast responses with sub-second latency
- The reasoning task is relatively straightforward
- You want to avoid thinking token overhead entirely

## Serving Reasoning Models in Production

A few considerations when deploying these models at scale:

**Thinking token handling**: Most APIs expose the thinking block either inline or in a separate field. For user-facing products, strip the `<think>...</think>` block from displayed responses, but keep it in your logs -- it's useful for debugging incorrect answers.

**Streaming matters more for reasoning models**: Because these models take longer before producing the final answer, streaming the thinking phase significantly improves perceived responsiveness. Users can see progress rather than waiting through a 10-second blank period.

**Token limits on thinking**: Reasoning models can produce very long chains on hard problems. Set a token limit on the thinking phase if your application has latency requirements. A partially-reasoned answer in 3 seconds is often more useful than timing out at 30 seconds waiting for a complete one.

**Prefix caching**: If you're repeatedly running similar problems (a math tutoring app, a code verification pipeline), prefix caching on the system prompt reduces costs. It won't help with the reasoning chain since that varies per query, but system prompt caching adds up across high-volume workloads.

**Batch vs. interactive use**: Reasoning models shine in batch settings where you're processing many queries offline. For interactive applications, the latency from long thinking chains can hurt the experience unless you're streaming the think block as a visible "working..." state.

## Conclusion

The open-source reasoning model landscape offers practical options across the compute spectrum. DeepSeek-R1 sets the accuracy bar -- it matches or slightly exceeds o1 on most math benchmarks, which is notable for an open model. The distilled variants bring most of that capability to 8B and 70B scales that are more manageable to serve.

QwQ-32B is a good alternative when you want a dense model without MoE routing complexity, though it sits a step below R1 distills at the same parameter count. The Llama-based R1 distillations are worth considering if you're already running Llama infrastructure and want reasoning capability with familiar tooling.

For teams that want to evaluate reasoning models before committing to full infrastructure, General Compute's API provides access to DeepSeek-R1 and other leading open models with the throughput needed to run meaningful benchmarks. You can process a batch of MATH-500 problems, measure real token costs, and decide whether the accuracy improvement justifies the overhead for your use case.
ModeHumanAgent