alt.freeweights.mistral / Leanstral-2603
From: mistralai <huggingface.co/mistralai>Newsgroups: alt.freeweights.mistralSubject:

Leanstral-2603

Date: 2026-11-15Commit: 410f315Signed: 2DC28CC7B26A283B ✓

Model. Safetensors weights, 121 GB in all. Published by mistralai under Apache-2.0.

mistral121GBLeanstral-2603safetensorspermissive
FactsParamsnot statedSize121 GBFormatssafetensorsTasknot taggedLicenseApache-2.0From sourcepermissive
$ fw get mistralai/Leanstral-2603
# manifest sha256 6bd4d03b8c7d… · 121 GB · 14 files
$ fw verify ./Leanstral-2603 mistralai/Leanstral-2603
From sourceHosted (signed)mistralai/Leanstral-2603Last check: 2026-11-15 04:13 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Works with

Runs with

Ranked by fit to this model (safetensors), then by GitHub stars.

Overview

Size
121 GB
Weights
121 GB (safetensors)
Parameters
not stated
Formats
safetensors
Task
not tagged
License
Apache-2.0 (permissive)
Files
14, each with a sha256
Publisher
mistralai
Added
2026-11-15
Section
alt.freeweights.mistral
Lineage

Original release from the publisher.

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-15 04:13 UTCpassed

Model card

From the publisher at commit 410f315. Shown as plain text with links; images open at the publisher.

Leanstral 119B A6B#

Leanstral is the first open-source code agent designed for Lean 4, a proof assistant capable of expressing complex mathematical objects such as perfectoid spaces and software specifications like properties of Rust fragments.

Built as part of the Mistral Small 4 family, it combines multimodal capabilities and an efficient architecture, making it both performant and cost-effective compared to existing closed-source alternatives.

For more details about the model and its scope, please read the related blog post.

Key Features#

Leanstral incorporates the following architectural choices:

  • MoE: 128 experts, 4 active per token
  • Model Size: 119B parameters with 6.5B activated per token
  • Context Length: 256k tokens
  • Multimodal Input: Accepts text and image input, producing text output

Leanstral offers these capabilities:

  • Proof Agentic: Designed specifically for proof engineering scenarios
  • Tool Calling Support: Optimized for Mistral Vibe
  • Vision: Can analyze images and provide insights
  • Multilingual: Supports English, French, Spanish, German, Italian, Portuguese, Dutch, Chinese, Japanese, Korean, and Arabic
  • System Prompt Compliance: Strong adherence to system prompts
  • Speed-Optimized: Best-in-class performance
  • Apache 2.0 License: Open-source license for commercial and non-commercial use
  • Large Context Window: Supports up to 256k tokens
  • Temperature: 1.0
  • Reasoning Effort:
    • 'none' → Do not use reasoning
    • 'high' → Use reasoning (recommended for complex prompts) Use reasoning_effort="high" for complex tasks
  • Context Length: ≤ 200k tokens recommended

Usage#

Mistral-Vibe#

Use Leanstral 119B A6B with Mistral Vibe. Install the latest version (2.5.0):

uv pip install mistral-vibe --upgrade

# make sure it's >= 2.5.0

Leanstral can be added by starting vibe and simply running:

/leanstall

This will add leanstral as an additional model, add a system prompt (see LEAD.md) as well as ensure leanstral can be used as a subagent.

Image: Screenshot 2026-03-16 at 18.03.39

Then just press "tab+shift" a couple times until you see the new "lean" mode and leanstral model.

Image: Screenshot 2026-03-16 at 18.17.04

Local server

If instead of pinging the Mistral API, you want to use your local vLLM server, you can do the following:

  • 1. Spin up a vllm server as explained in Usage - vllm
  • 2. Create a new agent file called lean.toml in ~/.vibe/agents:
mkdir ~/.vibe/agents/ && touch ~/.vibe/agents/lean.toml

And then copy-paste the following config into ~/.vibe/agents/lean.toml

display_name = "Lean (local vLLM)"
description = "Lean 4 mode using local vLLM"
safety = "neutral"

system_prompt_id = "lean"
active_model = "leanstral"

[[providers]]
name = "vllm"
api_base = "http://<your-host-url>:8000/v1"
api_key_env_var = ""
backend = "generic"
reasoning_field_name = "reasoning_content"

[[models]]
name = "mistralai/Leanstral-2603"
provider = "vllm"
alias = "leanstral"
thinking = "high"
temperature = 1.0
auto_compact_threshold = 168000

[tools.bash]
default_timeout = 1200

Note: Make sure to overwrite <your-host-url> with your server's url.

Then restart vibe and "tab-shift" to "lean" mode.

Give it a try on some "lean" code such as, e.g.: PrimeNumberTheoremAnd

Local Deployment#

The model can also be deployed with the following libraries, we advise everyone to use the Mistral AI API if the model is subpar with local serving:

We recommend using this model with the vLLM library to implement production-ready inference pipelines.

Installation

  1. Make sure to install vllm nightly:
   uv pip install -U vllm \
       --torch-backend=auto \
       --extra-index-url https://wheels.vllm.ai/nightly

Doing so should automatically install mistral_common >= 1.11.0.

To check:

   python -c "import mistral_common; print(mistral_common.__version__)"

You can also make use of a ready-to-go docker image or on the docker hub.

  1. Install transformers from main:
   uv pip install git+https://github.com/huggingface/transformers.git

Launch server

We recommend that you use Leanstral in a server/client setting.

vllm serve mistralai/Leanstral-2603 \
  --max-model-len 200000 \
  --tensor-parallel-size 4 \
  --attention-backend FLASH_ATTN_MLA \
  --tool-call-parser mistral \
  --enable-auto-tool-choice \
  --reasoning-parser mistral

Client

from openai import OpenAI
from huggingface_hub import hf_hub_download

# Modify OpenAI's API key and API base to use vLLM's API server.
openai_api_key = "EMPTY"
openai_api_base = "<your-host-url>"

client = OpenAI(
    api_key=openai_api_key,
    base_url=openai_api_base,
)

TEMP = 1.0
MAX_TOK = 32000
REASONING = "high" # switch to 'none' for faster answers

models = client.models.list()
model = models.data[0].id


prompt = """Define the transition rules as an inductive proposition.

This choice provides better support for proving properties about valid transitions and is generally more natural for modeling state machines in Lean, where you want to express logical rules rather than just computing a yes/no vale for each possible transition."""
messages = [
    {
        "role": "user",
        "content": [
            {
                "type": "text",
                "text": prompt,
            },
        ],
    },
]



response = client.chat.completions.create(
    model=model,
    messages=messages,
    temperature=TEMP,
    max_tokens=MAX_TOK,
    reasoning_effort=REASONING,
)

print("Content")
print(response.choices[0].message.content)

pritn("Reasoning")
print(response.choices[0].message.reasoning)

Example Content:

Expand</summary To define transaction rules as an inductive proposition in Lean, you can create an inductive type that captures the valid transitions between states. This approach is particularly useful for modeling state machines and proving properties about transitions, such as invariants.

Here is an example of how to define an inductive proposition for valid transitions in a simple counter machine:

-- Example: Counter that can only increment by 1 (no decrement, no shortcuts)
inductive ValidTransition : Nat → Nat → Prop
  | step1 : ∀ s, ValidTransition s (s + 1)   -- Core transition: s → s+1
  | step2 : ∀ s, ValidTransition s (2 * s)    -- Bonus: s → 2s (optional)
  | zero_step : ValidTransition 0 0          -- Additional special case

lemma reach_any_positive : ∀ n > 0, ValidTransition 0 n := by
  induction n with
  | zero => contradiction
  | succ n ih =>
    cases' Nat.eq_zero_or_pos n with h h
    · simp [h]
    · have : ValidTransition 0 (n + 1) := by
        cases' h with _ ih    -- Wait, this is messy...

In this example, ValidTransition is defined as an inductive proposition with constructors step1, step2, and zero_step. The step1 constructor allows for any state to transition to the next state by incrementing by 1, while step2 allows for doubling the state. The zero_step constructor is a special case for the initial state 0.

The lemma reach_any_positive aims to prove that any positive natural number is reachable from the initial state 0 through valid transitions. The proof uses induction on n, but due to simplification issues, the current approach may not be the most effective.

A more concise and effective way to define and prove properties about transitions is to use a simpler model, such as the following:

-- Simpler model for counter transitions (suffices for proofs)
inductive CounterTrans : Nat → Nat → Prop
  | valid : ∀ n, CounterTrans n (n + 1)

lemma reach_positive : ∀ n > 0, CounterTrans 0 n
  -- Proof is now trivial (by induction)

In this simpler model, CounterTrans is defined with a single constructor valid, which allows for any state to transition to the next state by incrementing by 1. The lemma reach_positive is straightforward to prove by induction, leveraging the simplicity of the transition rules.

This approach ensures that the proof remains concise and effective, avoiding unnecessary complexity in the transition rules. By using inductive propositions, we can effectively reason about state transitions and prove properties about the system.

Tool-Calling

You can add tools to the chat completion as follows:

prompt = """I have the following Lean 4 code snippet and want to check if it compiles and runs without errors. Can you run it for me and let me know the result?

tools = [{ "type": "function", "function": { "name": "lean_run_code", "description": "Run or compile an independent Lean code snippet or file and return the result or error message.", "parameters": { "type": "object", "properties": { "code": { "type": "string", "description": "Lean code snippet to run or compile. Either this or file_path must be provided." }, "file_path": { "type": "string", "description": "Path to the Lean file to run or compile. Either this or code must be provided." } }, } } }]

messages = [ { "role": "user", "content": [ { "type": "text", "text": prompt, }, ], }, ]

response = client.chat.completions.create( model=model, messages=messages, temperature=TEMP, max_tokens=MAX_TOK, reasoning_effort=REASONING, tools=tools, )

print("Tool Calls") print(response.choices[0].message.tool_calls)

print("Reasoning") print(response.choices[0].message.reasoning)


_Example Tool Calls_:

Expand</summary

`Function(arguments='{"code": "inductive State where\\n  | idle\\n  | busy\\n  | error\\n\\ndef transition : State → State → Bool\\n  | .idle, .busy => true\\n  | .busy, .idle => true\\n  | .busy, .error => true\\n  | _, _ => false\\n\\n#eval transition .idle .busy"}', name='lean_run_code')`





## License

This model is licensed under the [Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0.txt).

*You must not use this model in a manner that infringes, misappropriates, or otherwise violates any third party’s rights, including intellectual property rights.*

Files

14 files · 121 GBWeights 121 GB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 14 files with their sha256
FileSizesha256
.gitattributes1.57 KBa1533fad1fb49e1230aff61a60028ea63bc924b4cc4501447351b50b9c840683
LEAN.md8.57 KB8b37377cb22b91ca02a06e56182901b29d8d80454da7ac2efa570a9c122d0b61
README.md12.2 KB939b6f3d6d1a3008f4badb559ecc2fa0c292398dfa5146ce2a4deeebd5f66c31
chat_template.jinja12.8 KB7a5a4bc329e302425fb7067edc861fc9a5fe941fced171983ed789af2c10b357
consolidated-00001-of-00007.safetensors20.0 GBc6edc7dabc142d23283e00a9aba7393788043bf85ecc1e6d19d16bcf9b4d3b0b
consolidated-00002-of-00007.safetensors20.0 GBc793c203934be95384be7bccf2a38290df6d1bd164e8361d3cd458c86baa7931
consolidated-00003-of-00007.safetensors20.0 GB51edc063dafcf83dcc7e271fb122495b9514597b742c2d0fe8e8972bd2547f98
consolidated-00004-of-00007.safetensors20.0 GBb9d605977eed5d6c9876ec013f71a1642c4edbb8af6765c601e32e2115715719
consolidated-00005-of-00007.safetensors20.0 GB84c2d0923cc0713554114689213f4dccf9e475813dc8cde74e0936ab9137b0ff
consolidated-00006-of-00007.safetensors19.9 GBd3bef3c6656bd083e24c0a9f5d244a73ce7c1871aec03a590b84536393ef3424
consolidated-00007-of-00007.safetensors1.07 GB06ab960fa7f05b0b914425919470114777643fee069ddcb601861e91a2d343c5
consolidated.safetensors.index.json3.62 MB8d7eb9d015c1608e95c1e0d26641fcdf54bf25f46d96aac011b700352992af19
params.json1.51 KBd18e00ba8bd5722364cb629ea541c56b3b49ff0780f35a203b04c87291fbd535
tekken.json16.3 MBb1272b956bd6edd2d2c674c76896c7661308c9e723997b0afb55ecb429cb5dc7
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
410f315f41 pinned now2026-11-15 04:13 UTC14 files · 121 GB

Use it

$ fw get mistralai/Leanstral-2603
# manifest sha256 6bd4d03b8c7d… · 121 GB · 14 files
$ fw verify ./Leanstral-2603 mistralai/Leanstral-2603
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/mistralai/Leanstral-2603.json --dir ./Leanstral-2603 $ python3 fw.py verify ./Leanstral-2603 ./mistralai__Leanstral-2603.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download mistralai/Leanstral-2603 --revision 410f315f41cdb7e6ed1330dbb5cda88ede250064 --local-dir ./Leanstral-2603

License

Name
Apache License 2.0
Id
Apache-2.0
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-15
Text in
README.md
Text sha256
939b6f3d6d1a3008f4badb559ecc2fa0c292398dfa5146ce2a4deeebd5f66c31
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: mistralai <huggingface.co/mistralai>Newsgroups: alt.freeweights.mistralSubject: Leanstral-2603Date: 2026-11-15Commit: 410f315Signed: 2DC28CC7B26A283B ✓
Upstream
mistralai/Leanstral-2603
Pinned commit
410f315f41cdb7e6ed1330dbb5cda88ede250064
Manifest
Leanstral-2603.json · .minisig
Manifest sha256
6bd4d03b8c7d8d97adfeb83bb145c8f1fcf2912af55d01dafa18740c87a33670
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 04:13 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/mistralai/Leanstral-2603.json $ curl -O https://freeweights.allternit.com/manifests/mistralai/Leanstral-2603.json.minisig $ minisign -Vm Leanstral-2603.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

1 model in the catalog name this one as their parent.

Fine-tunes
1
Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download mistralai/Leanstral-2603
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. Leanstral-2603.json. Provenance. Takedown history: none.
From: bartowski <huggingface.co/bartowski>Subject: alamios_Mistral-Small-3.1-DRAFT-0.5B-GGUF
From: microsoft <huggingface.co/microsoft>Subject: chatbench-mistral-7b
From: NousResearch <huggingface.co/NousResearch>Subject: DeepHermes-3-Mistral-24B-Preview
From: mistralai <huggingface.co/mistralai>Subject: Devstral-Small-2-24B-Instruct-2512
From: mlx-community <huggingface.co/mlx-community>Subject: Devstral-Small-2-24B-Instruct-2512-4bit
From: mlx-community <huggingface.co/mlx-community>Subject: Devstral-Small-2-24B-Instruct-2512-6bit