---
title: "mathstral-7b-v0.1"
publisher: "mistralai"
type: "endpoint"
updated: "2025-01-17T20:58:28.940Z"
description: "Specialized language model designed for mathematical reasoning and scientific discovery."
canonical: "https://build.nvidia.com/mistralai/mathstral-7b-v01"
---

# Model Overview

## Description:

MathΣtral is designed specifically for math reasoning and scientific discovery, inspired by the legacy of Archimedes. It is a 7B model, aimed at solving advanced mathematical problems and supporting scientific research. Mathstral is released under the Apache 2.0 license and is part of a broader effort to support academic projects, produced in collaboration with Project Numina.

This model is ready for commercial use.  

## Third-Party Community Consideration:

Mathstral is developed by Mistral AI and is intended for use by the scientific and academic community. The model is available on [Hugging Face](https://huggingface.co/mistralai/Mathstral-7B-v0.1).

## Terms of Use

By using this software or model, you agree to the [terms and conditions](https://mistral.ai/terms-of-service/), acceptable use policy, and Mistral's privacy policy. Mathstral-7B-v0.1 is released under the Apache 2.0 license.

## References(s):

Mathstral [blogpost](https://mistral.ai/news/mathstral/) <br>

## Model Architecture:

**Architecture Type:** Transformer <br>
**Network Architecture:** Mathstral 7B v0.1 <br>
**Model Version:** 0.1 <br>

## Input:
**Input Type(s):** Text <br>
**Input Format:** String <br>
**Input Parameters:** Max Tokens, Temperature, Top P <br>
**Max Input Tokens:** 4096 Tokens <br>

## Output:
**Output Type(s):** Text <br>
**Output Format:** String <br>
**Max Output Tokens:** 4096 Tokens <br>

## Software Integration:

**Supported Hardware Platform(s):** NVIDIA Ampere, NVIDIA Hopper, NVIDIA Turing <br>
**Supported Operating System(s):** Linux <br>

## Inference:

**Engine:** TRT-LLM <br>
**Test Hardware:** L40S <br>

## Benchmarks:

Mathstral achieves state-of-the-art reasoning capacities in its size category across various industry-standard benchmarks. It scores 56.6% on [MATH](https://github.com/hendrycks/math) and 63.47% on [MMLU](https://arxiv.org/abs/2009.03300). With more inference-time computation, Mathstral 7B scores 68.37% on MATH with majority voting and 74.59% with a strong reward model among 64 candidates.

## Ethical Considerations

NVIDIA believes Trustworthy AI is a shared responsibility and we have established policies and practices to enable development for a wide array of AI applications. When downloaded or used in accordance with our terms of service, developers should work with their internal model team to ensure this model meets requirements for the relevant industry and use case and addresses unforeseen product misuse. Please report security vulnerabilities or NVIDIA AI Concerns [here](https://www.nvidia.com/en-us/support/submit-security-vulnerability/).

## Prototype

```python
from openai import OpenAI

client = OpenAI(
base_url = "https://integrate.api.nvidia.com/v1",
api_key = "$NVIDIA_API_KEY"
)

completion = client.chat.completions.create(
model="",
messages=[{"role":"user","content":""}],
temperature=,
top_p=,
max_tokens=,
stream=NaN
)

print(completion.choices[0].message)
```

```javascript
import OpenAI from 'openai';

const openai = new OpenAI({
apiKey: '$NVIDIA_API_KEY',
baseURL: 'https://integrate.api.nvidia.com/v1',
})

async function main() {
const completion = await openai.chat.completions.create({
model: "",
messages: [{"role":"user","content":""}],
temperature: ,
top_p: ,
max_tokens: ,
stream: ,
})

process.stdout.write(completion.choices[0]?.message?.content);

}

main();
```

```bash
curl https://integrate.api.nvidia.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $NVIDIA_API_KEY" \
-d '{
"model": "mistralai/mathstral-7b-v0.1",
"messages": [{"role":"user","content":""}],
"temperature": ,   
"top_p": ,
"max_tokens": ,
"stream":                 
}'
```