# Mathstral 7B

> Mistral's 7B open-weight model tuned for math and STEM reasoning

- Maker: Mistral AI
- Line: Specialist open models (Mathstral / Codestral Mamba)
- Canonical page: https://ai-tldr.dev/models/mathstral/
- Updated: 2026-06-18

## In short

Mathstral 7B is an open-weight large language model released by Mistral AI on 16 July 2024, fine-tuned from Mistral 7B and specialized for mathematical reasoning and STEM problem-solving. It has a 32K-token context window. You can use it through Mistral AI (la Plateforme), Hugging Face (open weights) and Ollama.

## Facts

| Fact | Value | Source |
| --- | --- | --- |
| Context window | 32K tokens (max output Not separately published (shares the 32K context budget)) | [1] |
| Licence | Apache 2.0 · open weights | [1] |
| Released | 16 July 2024 | [2] |
| Parameters | 7.3B | [1] |
| Knowledge cutoff | Not published by Mistral | [1] |

## Sources

1. [Mathstral-7B-v0.1 model card (Hugging Face)](https://huggingface.co/mistralai/Mathstral-7B-v0.1)
2. [Mathstral announcement (Mistral AI)](https://mistral.ai/news/mathstral/)

## Overview

Mathstral 7B is an open-weight large language model released by Mistral AI on 16 July 2024, fine-tuned from Mistral 7B and specialized for mathematical reasoning and STEM problem-solving. Named as a tribute to Archimedes, it was produced in collaboration with Project Numina and shipped as a community contribution: the weights are hosted on Hugging Face (mistralai/Mathstral-7B-v0.1) under the permissive Apache 2.0 license, runnable with mistral-inference and adaptable with mistral-finetune.

The model is a 7.3-billion-parameter instructed model with a 32K-token context window. Mistral positioned it as state-of-the-art for its size class on math benchmarks, scoring 56.6% on MATH and 63.47% on MMLU. Because it leaves more compute available at inference time, Mathstral also benefits from test-time scaling: with majority voting over 64 candidates it reaches 68.37% on MATH, and 74.59% with a strong reward model over the same candidates.

Mathstral was one half of a two-model 'specialist' launch alongside Codestral Mamba, a 7B code model built on the Mamba2 state-space architecture (API id codestral-mamba-2407, tested for in-context retrieval up to 256K tokens). Both were released the same day under Apache 2.0. Mathstral is now listed among Mistral's legacy/deprecated models, with Magistral Small suggested as a current alternative, but the open weights remain available for self-hosting and fine-tuning.

## Benchmarks

- MATH: 56.6% ([source](https://mistral.ai/news/mathstral/))
- MMLU: 63.47% ([source](https://mistral.ai/news/mathstral/))
- GSM8K (8-shot): 77.1% ([source](https://www.marktechpost.com/2024/07/16/mistral-ai-unveils-mathstral-7b-and-math-fine-tuning-base-achieving-56-6-on-math-and-63-47-on-mmlu-restructuring-mathematical-discovery/))
- MATH (maj@64, majority voting): 68.37% ([source](https://mistral.ai/news/mathstral/))
- MATH (reward model, 64 candidates): 74.59% ([source](https://mistral.ai/news/mathstral/))
- GRE Math (maj@16): 56.9% ([source](https://www.marktechpost.com/2024/07/16/mistral-ai-unveils-mathstral-7b-and-math-fine-tuning-base-achieving-56-6-on-math-and-63-47-on-mmlu-restructuring-mathematical-discovery/))
- AMC 2023 (maj@16): 42.4% ([source](https://www.marktechpost.com/2024/07/16/mistral-ai-unveils-mathstral-7b-and-math-fine-tuning-base-achieving-56-6-on-math-and-63-47-on-mmlu-restructuring-mathematical-discovery/))
- Odyssey Math (maj@16): 37.2% ([source](https://www.marktechpost.com/2024/07/16/mistral-ai-unveils-mathstral-7b-and-math-fine-tuning-base-achieving-56-6-on-math-and-63-47-on-mmlu-restructuring-mathematical-discovery/))

## Strengths

- Strong math reasoning for a 7B model — 56.6% on MATH, the best in its class at launch
- Fully open weights under Apache 2.0, free to self-host, modify, and fine-tune commercially
- Benefits from inference-time scaling (majority voting / reward model) for higher MATH accuracy
- Small enough to run on a single consumer GPU, making STEM tutoring and research experiments cheap
- Released as a fine-tunable base for academic and scientific projects (Project Numina collaboration)

## Best for

- Solving multi-step math and STEM word problems
- Academic and research projects on mathematical reasoning
- Math tutoring and step-by-step explanation assistants
- Fine-tuning a small open model for domain-specific quantitative tasks
- Local/offline math reasoning where data cannot leave the device

## How to access

- [Mistral AI (la Plateforme)](https://docs.mistral.ai/models/overview) — model id `mathstral (legacy/deprecated)`
- [Hugging Face (open weights)](https://huggingface.co/mistralai/Mathstral-7B-v0.1) — model id `mistralai/Mathstral-7B-v0.1`
- [Ollama](https://ollama.com/library/mathstral) — model id `mathstral`

## Specialist open models (Mathstral / Codestral Mamba) versions

- Mathstral 7B (16 July 2024) — this page
- [Codestral Mamba](https://ai-tldr.dev/models/codestral-mamba/) (16 July 2024)

## FAQ

### Is Mathstral 7B free to use?

Yes. Mathstral 7B is released under the Apache 2.0 license, so you can download, run, modify, fine-tune, and use it commercially for free. The weights are on Hugging Face at mistralai/Mathstral-7B-v0.1, and it runs locally via mistral-inference or tools like Ollama. Note the model is now in Mistral's legacy/deprecated list.

### What is Mathstral good at compared to regular Mistral 7B?

Mathstral is fine-tuned from Mistral 7B specifically for mathematical and STEM reasoning. At launch it scored 56.6% on MATH and 63.47% on MMLU, leading its 7B size class on math benchmarks. It also gains accuracy with inference-time techniques, reaching 68.37% on MATH with majority voting over 64 candidates.

### How is Mathstral different from Codestral Mamba?

They were released the same day (16 July 2024) as a two-model specialist launch. Mathstral is a dense transformer focused on math, while Codestral Mamba is a code model built on the Mamba2 state-space architecture (tested for in-context retrieval up to 256K tokens). Both are 7B and Apache 2.0; Codestral Mamba was retired from the hosted API on 6 June 2025.

### Is Mathstral still supported?

Mathstral appears in Mistral's legacy/deprecated models, with Magistral Small suggested as a current alternative for reasoning tasks. The open weights remain freely available on Hugging Face for self-hosting and fine-tuning, but it is no longer a primary supported model on la Plateforme.

## Links

- [Mathstral announcement (Mistral AI)](https://mistral.ai/news/mathstral/)
- [Mathstral-7B-v0.1 model card (Hugging Face)](https://huggingface.co/mistralai/Mathstral-7B-v0.1)
- [Mistral models overview (legacy/deprecation status)](https://docs.mistral.ai/models/overview)
- [Codestral Mamba announcement (sibling model)](https://mistral.ai/news/codestral-mamba/)
- [Mistral AI unveils Mathstral 7B (MarkTechPost benchmark coverage)](https://www.marktechpost.com/2024/07/16/mistral-ai-unveils-mathstral-7b-and-math-fine-tuning-base-achieving-56-6-on-math-and-63-47-on-mmlu-restructuring-mathematical-discovery/)
- [Mathstral on Ollama](https://ollama.com/library/mathstral)

Source: AI/TLDR LLM registry, https://ai-tldr.dev/models/mathstral/
