alt.freeweights.mistral / Magistral-Small-2509-GGUF
From: unsloth <huggingface.co/unsloth>Newsgroups: alt.freeweights.mistralSubject:

Magistral-Small-2509-GGUF

Date: 2026-11-15Commit: 77fe877Signed: 2DC28CC7B26A283B ✓

Model. Gguf weights, 377 GB in all. Published by unsloth under Apache-2.0.

mistral377GBMagistral-Small-2509-GGUFggufpermissive
FactsParamsnot statedSize377 GBFormatsggufTasknot taggedLicenseApache-2.0From sourcepermissive
$ fw get unsloth/Magistral-Small-2509-GGUF
# manifest sha256 665b1d6e9e9b… · 377 GB · 33 files
$ fw verify ./Magistral-Small-2509-GGUF unsloth/Magistral-Small-2509-GGUF
From sourceHosted (signed)unsloth/Magistral-Small-2509-GGUFLast check: 2026-11-15 04:47 UTC

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

Quantized of Magistral-Small-2509.

Works with

Convert with

Scan with

Overview

Size
377 GB
Weights
6.75 GB (smallest of 24 GGUF variants)
Parameters
not stated
Formats
gguf
Task
not tagged
License
Apache-2.0 (permissive)
Files
33, each with a sha256
Publisher
unsloth
Added
2026-11-15
Section
alt.freeweights.mistral
Lineage

Original release from the publisher.

Base model: mistralai/Magistral-Small-2509

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:47 UTCpassed

Model card

From the publisher at commit 77fe877. Shown as plain text with links; images open at the publisher.

Learn to run Magistral 1.2 correctly - Read our Guide.

Unsloth Dynamic 2.0 achieves SOTA performance in model quantization.

https://github.com/unslothai/unsloth/ https://discord.gg/unsloth https://docs.unsloth.ai/basics/magistral

✨ How to Use Magistral 1.2:#

Run in llama.cpp:

./llama.cpp/llama-cli -hf unsloth/Magistral-Small-2509-GGUF:UD-Q4_K_XL --jinja --temp 0.7 --top-k -1 --top-p 0.95 -ngl 99

Run in Ollama:

ollama run hf.co/unsloth/Magistral-Small-2509-GGUF:UD-Q4_K_XL

Read our in-depth guide about Magistral 1.2: docs.unsloth.ai/basics/magistral

  • Fine-tune Magistral 1.2 for free using our Kaggle notebook here-Reasoning-Conversational.ipynb&accelerator=nvidiaTeslaT4)!
  • View the rest of our notebooks in our docs here.

Magistral Small 1.2#

Building upon Mistral Small 3.2 (2506), with added reasoning capabilities, undergoing SFT from Magistral Medium traces and RL on top, it's a small, efficient reasoning model with 24B parameters.

Magistral Small can be deployed locally, fitting within a single RTX 4090 or a 32GB RAM MacBook once quantized.

Learn more about Magistral in our blog post.

The model was presented in the paper Magistral.

Updates compared with Magistral Small 1.1#

  • Multimodality: The model now has a vision encoder and can take multimodal inputs, extending its reasoning capabilities to vision.
  • Performance upgrade: Magistral Small 1.2 should give you significatively better performance than Magistral Small 1.1 as seen in the benchmark results.
  • Better tone and persona: You should experiment better LaTeX and Markdown formatting, and shorter answers on easy general prompts.
  • Finite generation: The model is less likely to enter infinite generation loops.
  • Special think tokens: [THINK] and [/THINK] special tokens encapsulate the reasoning content in a thinking chunk. This makes it easier to parse the reasoning trace and prevents confusion when the '[THINK]' token is given as a string in the prompt.
  • Reasoning prompt: The reasoning prompt is given in the system prompt.

Key Features#

  • Reasoning: Capable of long chains of reasoning traces before providing an answer.
  • Multilingual: Supports dozens of languages, including English, French, German, Greek, Hindi, Indonesian, Italian, Japanese, Korean, Malay, Nepali, Polish, Portuguese, Romanian, Russian, Serbian, Spanish, Turkish, Ukrainian, Vietnamese, Arabic, Bengali, Chinese, and Farsi.
  • Vision: Vision capabilities enable the model to analyze images and reason based on visual content in addition to text.
  • Apache 2.0 License: Open license allowing usage and modification for both commercial and non-commercial purposes.
  • Context Window: A 128k context window. Performance might degrade past 40k but Magistral should still give good results. Hence we recommend to leave the maximum model length to 128k and only lower if you encounter low performance.

Benchmark Results#

ModelAIME24 pass@1AIME25 pass@1GPQA DiamondLivecodebench (v5)
Magistral Medium 1.291.82%83.48%76.26%75.00%
Magistral Medium 1.172.03%60.99%71.46%59.35%
Magistral Medium 1.073.59%64.95%70.83%59.36%
Magistral Small 1.286.14%77.34%70.07%70.88%
Magistral Small 1.170.52%62.03%65.78%59.17%
Magistral Small 1.070.68%62.76%68.18%55.84%

Sampling parameters#

Please make sure to use:

  • top_p: 0.95
  • temperature: 0.7
  • max_tokens: 131072

Basic Chat Template#

We highly recommend including the following system prompt for the best results, you can edit and customise it if needed for your specific use case.

First draft your thinking process (inner monologue) until you arrive at a response. Format your response using Markdown, and use LaTeX for any mathematical equations. Write both your thoughts and the response in the same language as the input.

Your thinking process must follow the template below:[THINK]Your thoughts or/and draft, like working through an exercise on scratch paper. Be as casual and as long as you want until you are confident to generate the response. Use the same language as the input.[/THINK]Here, provide a self-contained response.

The [THINK] and [/THINK] are special tokens that must be encoded as such.

Please make sure to use mistral-common as the source of truth. Find below examples from libraries supporting mistral-common.

We invite you to choose, depending on your use case and requirements, between keeping reasoning traces during multi-turn interactions or keeping only the final assistant response.

Ping model as follows:

Python text snippet

from typing import Any
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 = "http://localhost:8000/v1"

TEMP = 0.7
TOP_P = 0.95
MAX_TOK = 131072

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

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

def load_system_prompt(repo_id: str, filename: str) -> dict[str, Any]:
    file_path = hf_hub_download(repo_id=repo_id, filename=filename)
    with open(file_path, "r") as file:
        system_prompt = file.read()

    index_begin_think = system_prompt.find("[THINK]")
    index_end_think = system_prompt.find("[/THINK]")

    return {
        "role": "system",
        "content": [
            {"type": "text", "text": system_prompt[:index_begin_think]},
            {
                "type": "thinking",
                "thinking": system_prompt[
                    index_begin_think + len("[THINK]") : index_end_think
                ],
                "closed": True,
            },
            {
                "type": "text",
                "text": system_prompt[index_end_think + len("[/THINK]") :],
            },
        ],
    }

SYSTEM_PROMPT = load_system_prompt(model, "SYSTEM_PROMPT.txt")

query = "Use each number in 2,5,6,3 exactly once, along with any combination of +, -, ×, ÷ (and parentheses for grouping), to make the number 24."

messages = [
    SYSTEM_PROMPT,
    {"role": "user", "content": query}
]
stream = client.chat.completions.create(
  model=model,
  messages=messages,
  stream=True,
  temperature=TEMP,
  top_p=TOP_P,
  max_tokens=MAX_TOK,
)

print("client: Start streaming chat completions...:\n")
printed_reasoning_content = False
answer = []

for chunk in stream:
    reasoning_content = None
    content = None
    # Check the content is reasoning_content or content
    if hasattr(chunk.choices[0].delta, "reasoning_content"):
        reasoning_content = chunk.choices[0].delta.reasoning_content
    elif hasattr(chunk.choices[0].delta, "content"):
        content = chunk.choices[0].delta.content

    if reasoning_content is not None:
        if not printed_reasoning_content:
            printed_reasoning_content = True
            print("Start reasoning:\n", end="", flush=True)
        print(reasoning_content, end="", flush=True)
    elif content is not None:
        # Extract and print the content
        if not reasoning_content and printed_reasoning_content:
            answer.extend(content)
        print(content, end="", flush=True)

if answer:
    print("\n\n=============\nAnswer\n=============\n")
    print("".join(answer))
else:
    print("\n\n=============\nNo Answer\n=============\n")
    print("No answer was generated by the model, probably because the maximum number of tokens was reached.")

# client: Start streaming chat completions...:
#
# Start reasoning:
# First, I need to ...
# ...
#
#
# =============
# Answer
# =============
# 
# Here's one way to use the numbers 2, 5, 6, 3 to make 24:
#
#\[
#(6 \div 2) \times (5 + 3) = 3 \times 8 = 24
#\]
#
#Alternatively, another solution is:
#
#\[
#6 \times (5 - 3 + 2) = 6 \times 4 = 24
#\]
#
#Both expressions use each of the numbers 2, 5, 6, 3 exactly once with the operations given.

Python text-image snippet: Pokemon

from typing import Any

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 = "http://localhost:8000/v1"

TEMP = 0.7
TOP_P = 0.95
MAX_TOK = 131072

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

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


def load_system_prompt(repo_id: str, filename: str) -> dict[str, Any]:
    file_path = hf_hub_download(repo_id=repo_id, filename=filename)
    with open(file_path, "r") as file:
        system_prompt = file.read()

    index_begin_think = system_prompt.find("[THINK]")
    index_end_think = system_prompt.find("[/THINK]")

    return {
        "role": "system",
        "content": [
            {"type": "text", "text": system_prompt[:index_begin_think]},
            {
                "type": "thinking",
                "thinking": system_prompt[
                    index_begin_think + len("[THINK]") : index_end_think
                ],
                "closed": True,
            },
            {
                "type": "text",
                "text": system_prompt[index_end_think + len("[/THINK]") :],
            },
        ],
    }


model_id = "mistralai/Magistral-Small-2509"
SYSTEM_PROMPT = load_system_prompt(model_id, "SYSTEM_PROMPT.txt")

image_url = "https://static.wikia.nocookie.net/essentialsdocs/images/7/70/Battle.png/revision/latest?cb=20220523172438"

messages = [
    SYSTEM_PROMPT,
    {
        "role": "user",
        "content": [
            {
                "type": "text",
                "text": "What action do you think I should take in this situation? List all the possible actions and explain why you think they are good or bad.",
            },
            {"type": "image_url", "image_url": {"url": image_url}},
        ],
    },
]


stream = client.chat.completions.create(
    model=model,
    messages=messages,
    stream=True,
    temperature=TEMP,
    top_p=TOP_P,
    max_tokens=MAX_TOK,
)

print("client: Start streaming chat completions...:\n")
printed_reasoning_content = False
answer = []

for chunk in stream:
    reasoning_content = None
    content = None
    # Check the content is reasoning_content or content
    if hasattr(chunk.choices[0].delta, "reasoning_content"):
        reasoning_content = chunk.choices[0].delta.reasoning_content
    elif hasattr(chunk.choices[0].delta, "content"):
        content = chunk.choices[0].delta.content

    if reasoning_content is not None:
        if not printed_reasoning_content:
            printed_reasoning_content = True
            print("Start reasoning:\n", end="", flush=True)
        print(reasoning_content, end="", flush=True)
    elif content is not None:
        # Extract and print the content
        if not reasoning_content and printed_reasoning_content:
            answer.extend(content)
        print(content, end="", flush=True)

if answer:
    print("\n\n=============\nAnswer\n=============\n")
    print("".join(answer))
else:
    print("\n\n=============\nNo Answer\n=============\n")
    print(
        "No answer was generated by the model, probably because the maximum number of tokens was reached."
    )

# client: Start streaming chat completions...:

# Start reasoning:
# In the image, we see a battle scene from a Pokémon game. The player's Pikachu is at full health (83/83 HP), and the opponent's Pidgey is at a lower level (level 17 compared to Pikachu's level 42). The possible actions available to the player are:

# 1. FIGHT: This allows the player to use one of Pikachu's moves to attack Pidgey. Given that Pikachu is at a higher level and has full HP, it is likely that Pikachu would be able to defeat Pidgey easily. This is a good option because it could potentially win the battle quickly and efficiently.

# 2. BAG: This allows the player to use an item from their bag. This could be useful if the player wants to heal Pikachu (though it's not necessary at full health) or use an item to weaken Pidgey. However, since Pikachu is at full health and Pidgey is at a lower level, this might not be necessary. It could be a good option if the player wants to use a special item, but generally, it might not be the best choice in this situation.

# 3. POKÉMON: This allows the player to switch the current Pokémon to another one in their team. Since Pikachu is at full health and at a higher level than Pidgey, switching might not be necessary. It could be useful if the player wants to train a different Pokémon, but it might not be the most efficient choice for winning the battle quickly.

# 4. RUN: This allows the player to flee from the battle. This could be a good option if the player wants to avoid the battle, but since Pikachu is at a clear advantage, running would not be the most efficient choice. It could be useful if the player wants to save time or if they are trying to avoid losing a Pokémon, but in this case, it seems unnecessary.

# Given the circumstances, the best action seems to be to FIGHT, as Pikachu is at a clear advantage in terms of level and health. The other options are not as efficient for winning the battle quickly.In the given scenario, the most appropriate action to take is to FIGHT. Here's why:

# 1. FIGHT: This is the best option because Pikachu is at a higher level and has full health, making it likely to defeat Pidgey quickly and efficiently. Using an attack move would be the most straightforward way to win the battle.

# 2. BAG: While this option could be useful for healing or using special items, it is not necessary since Pikachu is already at full health. This option is less efficient for winning the battle quickly.

# 3. POKÉMON: Switching to another Pokémon might be useful for training a different Pokémon, but it is not necessary since Pikachu is at a clear advantage. This option is not as efficient for winning the current battle.

# 4. RUN: Fleeing from the battle could be useful if the player wants to avoid the battle, but since Pikachu is at a clear advantage, running would not be the most efficient choice. It could be useful if the player wants to save time or avoid losing a Pokémon, but in this case, it seems unnecessary.

# Therefore, the best action to take in this situation is to FIGHT.

# FIGHT

# =============
# Answer
# =============

# In the given scenario, the most appropriate action to take is to FIGHT. Here's why:

# 1. FIGHT: This is the best option because Pikachu is at a higher level and has full health, making it likely to defeat Pidgey quickly and efficiently. Using an attack move would be the most straightforward way to win the battle.

# 2. BAG: While this option could be useful for healing or using special items, it is not necessary since Pikachu is already at full health. This option is less efficient for winning the battle quickly.

# 3. POKÉMON: Switching to another Pokémon might be useful for training a different Pokémon, but it is not necessary since Pikachu is at a clear advantage. This option is not as efficient for winning the current battle.

# 4. RUN: Fleeing from the battle could be useful if the player wants to avoid the battle, but since Pikachu is at a clear advantage, running would not be the most efficient choice. It could be useful if the player wants to save time or avoid losing a Pokémon, but in this case, it seems unnecessary.

# Therefore, the best action to take in this situation is to FIGHT.

# FIGHT

Python text-image snippet: Geo trivia

from typing import Any

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 = "http://localhost:8000/v1"

TEMP = 0.7
TOP_P = 0.95
MAX_TOK = 131072

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

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


def load_system_prompt(repo_id: str, filename: str) -> dict[str, Any]:
    file_path = hf_hub_download(repo_id=repo_id, filename=filename)
    with open(file_path, "r") as file:
        system_prompt = file.read()

    index_begin_think = system_prompt.find("[THINK]")
    index_end_think = system_prompt.find("[/THINK]")

    return {
        "role": "system",
        "content": [
            {"type": "text", "text": system_prompt[:index_begin_think]},
            {
                "type": "thinking",
                "thinking": system_prompt[
                    index_begin_think + len("[THINK]") : index_end_think
                ],
                "closed": True,
            },
            {
                "type": "text",
                "text": system_prompt[index_end_think + len("[/THINK]") :],
            },
        ],
    }


model_id = "mistralai/Magistral-Small-2509"
SYSTEM_PROMPT = load_system_prompt(model_id, "SYSTEM_PROMPT.txt")

image_url = "https://upload.wikimedia.org/wikipedia/commons/thumb/d/d7/201806_Tianducheng_Bird-eye_View.jpg/1280px-201806_Tianducheng_Bird-eye_View.jpg"

messages = [
    SYSTEM_PROMPT,
    {
        "role": "user",
        "content": [
            {
                "type": "text",
                "text": "Where has this picture been taken ?",
            },
            {"type": "image_url", "image_url": {"url": image_url}},
        ],
    },
]


stream = client.chat.completions.create(
    model=model,
    messages=messages,
    stream=True,
    temperature=TEMP,
    top_p=TOP_P,
    max_tokens=MAX_TOK,
)

print("client: Start streaming chat completions...:\n")
printed_reasoning_content = False
answer = []

for chunk in stream:
    reasoning_content = None
    content = None
    # Check the content is reasoning_content or content
    if hasattr(chunk.choices[0].delta, "reasoning_content"):
        reasoning_content = chunk.choices[0].delta.reasoning_content
    elif hasattr(chunk.choices[0].delta, "content"):
        content = chunk.choices[0].delta.content

    if reasoning_content is not None:
        if not printed_reasoning_content:
            printed_reasoning_content = True
            print("Start reasoning:\n", end="", flush=True)
        print(reasoning_content, end="", flush=True)
    elif content is not None:
        # Extract and print the content
        if not reasoning_content and printed_reasoning_content:
            answer.extend(content)
        print(content, end="", flush=True)

if answer:
    print("\n\n=============\nAnswer\n=============\n")
    print("".join(answer))
else:
    print("\n\n=============\nNo Answer\n=============\n")
    print(
        "No answer was generated by the model, probably because the maximum number of tokens was reached."
    )

# client: Start streaming chat completions...:

# Start reasoning:
# The image shows a replica of the Eiffel Tower, but it's not in Paris. The background includes mountains, which are not present in Paris. The surrounding architecture appears to be more modern and dense, which is also not typical of Paris. The combination of the Eiffel Tower replica and the mountainous backdrop suggests that this is likely in a city in China, as China has several replicas of the Eiffel Tower, with the most famous one being in Shanghai. However, the dense residential buildings and the specific layout suggest that this might be in another city in China, possibly Shenzhen or another major city with a similar landscape.

# Given that the question is about identifying the location based on the visual clues, and considering the presence of the Eiffel Tower replica and the mountainous backdrop, it's likely that this is a well-known location in China.

# The most probable answer is that this is in Shenzhen, as it has a well-known Eiffel Tower replica in a park, but to be precise, this is the Eiffel Tower replica in Shenzhen, which is known as the "Shenzhen Park of Eiffel Tower."

# However, to be more accurate, this is likely the Eiffel Tower replica in Shenzhen, as it matches the description and visual elements.The image shows a replica of the Eiffel Tower, which is not in Paris but rather in a city with a mountainous backdrop and modern, dense architecture. This combination of elements is typical of a Chinese city, and the presence of the Eiffel Tower replica suggests a location like Shenzhen, which is known for having such a replica. The dense residential buildings and the specific layout further support this identification. Therefore, the most probable location for this image is Shenzhen, China.

# So, the answer is:

# Shenzhen

# =============
# Answer
# =============

# The image shows a replica of the Eiffel Tower, which is not in Paris but rather in a city with a mountainous backdrop and modern, dense architecture. This combination of elements is typical of a Chinese city, and the presence of the Eiffel Tower replica suggests a location like Shenzhen, which is known for having such a replica. The dense residential buildings and the specific layout further support this identification. Therefore, the most probable location for this image is Shenzhen, China.

# So, the answer is:

# Shenzhen

Python text-image snippet: Maths

from typing import Any

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 = "http://localhost:8000/v1"

TEMP = 0.7
TOP_P = 0.95
MAX_TOK = 131072

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

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


def load_system_prompt(repo_id: str, filename: str) -> dict[str, Any]:
    file_path = hf_hub_download(repo_id=repo_id, filename=filename)
    with open(file_path, "r") as file:
        system_prompt = file.read()

    index_begin_think = system_prompt.find("[THINK]")
    index_end_think = system_prompt.find("[/THINK]")

    return {
        "role": "system",
        "content": [
            {"type": "text", "text": system_prompt[:index_begin_think]},
            {
                "type": "thinking",
                "thinking": system_prompt[
                    index_begin_think + len("[THINK]") : index_end_think
                ],
                "closed": True,
            },
            {
                "type": "text",
                "text": system_prompt[index_end_think + len("[/THINK]") :],
            },
        ],
    }


model_id = "mistralai/Magistral-Small-2509"
SYSTEM_PROMPT = load_system_prompt(model_id, "SYSTEM_PROMPT.txt")

image_url = "https://i.ytimg.com/vi/5Y3xLHeyKZU/hqdefault.jpg"

messages = [
    SYSTEM_PROMPT,
    {
        "role": "user",
        "content": [
            {
                "type": "text",
                "text": "Solve the equations. Answer in the language of the image.",
            },
            {"type": "image_url", "image_url": {"url": image_url}},
        ],
    },
]

stream = client.chat.completions.create(
    model=model,
    messages=messages,
    stream=True,
    temperature=TEMP,
    top_p=TOP_P,
    max_tokens=MAX_TOK,
)

print("client: Start streaming chat completions...:\n")
printed_reasoning_content = False
answer = []

for chunk in stream:
    reasoning_content = None
    content = None
    # Check the content is reasoning_content or content
    if hasattr(chunk.choices[0].delta, "reasoning_content"):
        reasoning_content = chunk.choices[0].delta.reasoning_content
    elif hasattr(chunk.choices[0].delta, "content"):
        content = chunk.choices[0].delta.content

    if reasoning_content is not None:
        if not printed_reasoning_content:
            printed_reasoning_content = True
            print("Start reasoning:\n", end="", flush=True)
        print(reasoning_content, end="", flush=True)
    elif content is not None:
        # Extract and print the content
        if not reasoning_content and printed_reasoning_content:
            answer.extend(content)
        print(content, end="", flush=True)

if answer:
    print("\n\n=============\nAnswer\n=============\n")
    print("".join(answer))
else:
    print("\n\n=============\nNo Answer\n=============\n")
    print(
        "No answer was generated by the model, probably because the maximum number of tokens was reached."
    )
# client: Start streaming chat completions...:

# Start reasoning:
# Je dois résoudre ce système d'équations. Voici les équations :

# 1. \(5x + 2y = -2\)
# 2. \(3x - 4y = 17\)

# D'abord, je pense que la méthode d'élimination pourrait être une bonne approche. Pour cela, je dois éliminer une des variables. Voyons comment.

# Je vais essayer d'éliminer y. Pour cela, je dois que les coefficients de y soient les mêmes (en valeur absolue) dans les deux équations.

# Le coefficient de y dans la première équation est 2, et dans la deuxième, c'est -4. Le plus petit multiple commun de 2 et 4 est 4. Donc, je vais multiplier la première équation par 2 pour que le coefficient de y devienne 4.

# Faisons cela :

# 1. \(2 \times (5x + 2y) = 2 \times (-2)\)
#    Ce qui donne : \(10x + 4y = -4\)

# Maintenant, les équations sont :

# 1. \(10x + 4y = -4\)
# 2. \(3x - 4y = 17\)

# Maintenant, si j'additionne ces deux équations, les termes avec y s'annuleront.

# Faisons l'addition :

# \( (10x + 4y) + (3x - 4y) = -4 + 17 \)

# Ce qui donne : \(13x = 13\)

# Donc, \(x = 1\).

# Maintenant que nous avons x, nous pouvons le substituer dans une des équations originales pour trouver y. Utilisons la première équation originale :

# \(5x + 2y = -2\)

# En substituant x = 1 :

# \(5(1) + 2y = -2\)

# Ce qui donne : \(5 + 2y = -2\)

# Soustraire 5 des deux côtés :

# ...

# Ce qui donne : \(5 + 2y = -2\)

# Soustraire 5 des deux côtés :

# \(2y = -2 - 5\)
# \(2y = -7\)

# Diviser par 2 :

# \(y = -\frac{7}{2}\)

# Donc, la solution est \(x = 1\) et \(y = -\frac{7}{2}\).

# $\boxed{x = 1,\ y = -\frac{7}{2}}$

# =============
# Answer
# =============

# Pour résoudre le système d'équations donné :

# 1. \(5x + 2y = -2\)
# 2. \(3x - 4y = 17\)

# Nous commençons par utiliser la méthode d'élimination pour éliminer une des variables. Nous choisissons d'éliminer \(y\) en rendant ses coefficients identiques en valeur absolue. Le coefficient de \(y\) dans la première équation est 2, et dans la deuxième, c'est -4. Le plus petit multiple commun de 2 et 4 est 4. Nous multiplions donc la première équation par 2 pour que le coefficient de \(y\) devienne 4.

# Faisons cela :

# 1. \(2 \times (5x + 2y) = 2 \times (-2)\)
#    Ce qui donne : \(10x + 4y = -4\)

# Maintenant, les équations sont :

# 1. \(10x + 4y = -4\)
# 2. \(3x - 4y = 17\)

# En additionnant ces deux équations, les termes avec \(y\) s'annuleront :

# \( (10x + 4y) + (3x - 4y) = -4 + 17 \)

# Ce qui donne : \(13x = 13\)

# Donc, \(x = 1\).

# Ensuite, nous substituons \(x = 1\) dans la première équation originale pour trouver \(y\) :

# \(5(1) + 2y = -2\)

# Ce qui donne : \(5 + 2y = -2\)

# Soustraire 5 des deux côtés :

# \(2y = -2 - 5\)
# \(2y = -7\)

# Diviser par 2 :

# \(y = -\frac{7}{2}\)

# Donc, la solution est \(x = 1\) et \(y = -\frac{7}{2}\).

# $\boxed{x = 1,\ y = -\frac{7}{2}}$
Transformers#

Make sure you install the latest Transformers version:

pip install --upgrade transformers[mistral-common]

This should also install mistral_common >= 1.8.5

To check:

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

Now you can use Transformers with Magistral:

Python snippet

from typing import Any
import torch

from huggingface_hub import hf_hub_download
from transformers import Mistral3ForConditionalGeneration
from transformers import AutoTokenizer


def load_system_prompt(repo_id: str, filename: str) -> dict[str, Any]:
    file_path = hf_hub_download(repo_id=repo_id, filename=filename)
    with open(file_path, "r") as file:
        system_prompt = file.read()

    index_begin_think = system_prompt.find("[THINK]")
    index_end_think = system_prompt.find("[/THINK]")

    return {
        "role": "system",
        "content": [
            {"type": "text", "text": system_prompt[:index_begin_think]},
            {
                "type": "thinking",
                "thinking": system_prompt[
                    index_begin_think + len("[THINK]") : index_end_think
                ],
                "closed": True,
            },
            {
                "type": "text",
                "text": system_prompt[index_end_think + len("[/THINK]") :],
            },
        ],
    }


model_id = "mistralai/Magistral-Small-2509"

tokenizer = AutoTokenizer.from_pretrained(model_id, tokenizer_type="mistral")
model = Mistral3ForConditionalGeneration.from_pretrained(
    model_id, torch_dtype=torch.bfloat16, device_map="auto"
).eval()

SYSTEM_PROMPT = load_system_prompt(model_id, "SYSTEM_PROMPT.txt")
image_url = "https://static.wikia.nocookie.net/essentialsdocs/images/7/70/Battle.png/revision/latest?cb=20220523172438"
messages = [
    SYSTEM_PROMPT,
    {
        "role": "user",
        "content": [
            {
                "type": "text",
                "text": "What action do you think I should take in this situation? List all the possible actions and explain why you think they are good or bad.",
            },
            {"type": "image_url", "image_url": {"url": image_url}},
        ],
    },
]

tokenized = tokenizer.apply_chat_template(messages, return_dict=True)

input_ids = torch.tensor(tokenized.input_ids, device="cuda").unsqueeze(0)
attention_mask = torch.tensor(tokenized.attention_mask, device="cuda").unsqueeze(0)
pixel_values = torch.tensor(
    tokenized.pixel_values[0], dtype=torch.bfloat16, device="cuda"
).unsqueeze(0)
image_sizes = torch.tensor(pixel_values.shape[-2:], device="cuda").unsqueeze(0)

with torch.inference_mode():
    output = model.generate(
        input_ids=input_ids,
        attention_mask=attention_mask,
        pixel_values=pixel_values,
        image_sizes=image_sizes,
    )[0]


decoded_output = tokenizer.decode(
    output[
        len(tokenized.input_ids) : (
            -1 if output[-1] == tokenizer.eos_token_id else len(output)
        )
    ]
)
print(decoded_output)
# [THINK]Alright, let's analyze the image carefully. It's a scene from a Pokémon game. The player is controlling Pikachu, which is at level 42 with full HP (83/83). The opponent is a Pidgey at level 17. The question is asking what action the player should take in this situation.

# First, let's list all the possible actions available. From the bottom of the screen, the options are:
# 1. FIGHT
# 2. BAG
# 3. POKÉMON
# 4. RUN

# Now, let's consider each option:

# 1. **FIGHT**: This means using Pikachu's moves to attack the Pidgey.
#    - Pros: Pikachu is at a higher level (42) compared to Pidgey (17), so it has a significant advantage. Pikachu's HP is full, so it's in good condition to fight. Fighting could potentially win the battle quickly.
#    - Cons: Even though Pikachu is stronger, there's always a risk of Pidgey landing a lucky hit or using a powerful move. However, given the level difference, this is less likely.

# 2. **BAG**: This means using items from the bag to help in the battle.
#    - Pros: Could use a potion to heal (though Pikachu is already at full HP), or use another item like a Poké Ball to try and catch Pidgey.
#    - Cons: Using items might be less efficient than just fighting, especially since Pikachu is already at full health. Also, if the goal is to catch Pidgey, using items to weaken it first might be useful, but the immediate advantage isn't clear.

# 3. **POKÉMON**: This means switching to another Pokémon from the team.
#    - Pros: If the player has another Pokémon that is stronger or has moves that are super effective against Pidgey, this could be useful.
#    - Cons: Pikachu is already at a significant level advantage and is at full health, so switching might not be necessary unless there's a strategic reason (e.g., leveling up another Pokémon).

# 4. **RUN**: This means attempting to flee from the battle.
#    - Pros: If the player wants to avoid the battle for some reason (e.g., saving time, or wanting to catch Pidgey without weakening it), running could be useful.
#    - Cons: If the goal is to catch or defeat Pidgey, running would not help in achieving that. Also, running might not always be successful, especially in a grass encounter where the chance to flee might be lower.

# Now, considering the context, if the goal is to defeat Pidgey, the best action would be to FIGHT since Pikachu is at a significant advantage in terms of level and health. Using the BAG could be useful if the goal is to catch Pidgey, as items like Poké Balls or berries could be used. Switching Pokémon doesn't seem necessary given Pikachu's current status. Running would only be useful if the player wants to avoid the battle, which seems unlikely if the goal is to progress in the game.

# However, the question asks for the best action without specifying the goal. Assuming the goal is to defeat Pidgey efficiently, the best action would be to FIGHT.

# But to list all possible actions and their pros and cons:

# 1. **FIGHT**
#    - Pros: High chance of winning quickly due to level and health advantage.
#    - Cons: Small risk of Pikachu getting damaged.

# 2. **BAG**
#    - Pros: Could use items to catch Pidgey or support Pikachu (though not necessary for healing).
#    - Cons: Might be less efficient if the goal is just to defeat Pidgey.

# 3. **POKÉMON**
#    - Pros: Could switch to another Pokémon for strategic reasons (e.g., type advantage, training a different Pokémon).
#    - Cons: Pikachu is already at a strong position, so switching might be unnecessary unless there's another goal.

# 4. **RUN**
#    - Pros: Escape the battle if needed.
#    - Cons: Does not contribute to progress if the goal is to defeat or catch Pidgey.

# Given that, if the goal is to defeat Pidgey, the best action is to FIGHT. If the goal is to catch Pidgey, using the BAG to throw a Poké Ball could be the best action.[/THINK]Here are the possible actions and their explanations:

# 1. **FIGHT**
#    - **Pros**: Pikachu is at a much higher level (42) compared to Pidgey (17) and has full HP. This makes it very likely to win quickly.
#    - **Cons**: There's always a small risk that Pidgey could land a lucky hit, but this is unlikely given the level difference.

# 2. **BAG**
#    - **Pros**: You could use items to catch Pidgey (e.g., Poké Ball) or support Pikachu (though Pikachu is already at full HP).
#    - **Cons**: Using items might be less efficient if the goal is simply to defeat Pidgey, as fighting directly could be quicker.

# 3. **POKÉMON**
#    - **Pros**: You could switch to another Pokémon that might have a type advantage or that you want to train.
#    - **Cons**: Pikachu is already in a strong position to defeat Pidgey, so switching might not be necessary unless there's another strategic reason.

# 4. **RUN**
#    - **Pros**: You can escape the battle if you need to, for example, if you want to preserve Pikachu's health for a tougher battle ahead.
#    - **Cons**: Running doesn't help you progress if your goal is to defeat or catch Pidgey. Additionally, the success rate for running might be lower in a grass encounter.

# Given these considerations, if your goal is to defeat Pidgey, the best action is likely to **FIGHT**, as Pikachu is at a significant advantage. If your goal is to catch Pidgey, using the **BAG** to throw a Poké Ball could be the best choice. If you're looking to train a different Pokémon, you might consider switching with **POKÉMON**, and if you need to preserve resources or Pikachu's health, **RUN** could be an option.

Files

33 files · 377 GBWeights 6.75 GB (smallest of 24 GGUF variants). Sizes and sha256 from the signed manifest.
Show all 33 files with their sha256
FileSizesha256
.gitattributes3.56 KBb221268fe75e750a7acffbede67d8cb8cad889246408eb961713a6e5c1912bf7
Magistral-Small-2509-BF16.gguf47.2 GB911daa502650896bc123e25de8ac0d8df87989b1697015afbe8f7da8ddb26168
Magistral-Small-2509-IQ4_NL.gguf13.5 GB1df7d7c1a1ea25db98d6e0e0dd4214e8fa31b17bede3d36bc0e253848a568774
Magistral-Small-2509-IQ4_XS.gguf12.8 GB8a8be07d61238cf1f6795a4f3575e9185bfcd95e8af55a54641de4338a94a0d5
Magistral-Small-2509-Q2_K.gguf8.89 GBcc6694f2af064faaecc06b6ceb3e61c01f5d4a8d0bc7c68d94d62c7b0c84e7ed
Magistral-Small-2509-Q2_K_L.gguf9.05 GB095036b5fa998b7db1b3b63a7ce24b89b5317f7a99ecf4a12aedb1052069b9c2
Magistral-Small-2509-Q3_K_M.gguf11.5 GB64dee5f3152802e80861ddd6d55a11a27c2789bb1e7fc4d6426fccfa1576f5d1
Magistral-Small-2509-Q3_K_S.gguf10.4 GBffa13c5a09c2048770f09dab33149d29f22669340640a211dc9555002eb9002a
Magistral-Small-2509-Q4_0.gguf13.5 GB4b74a201506f31f079512d2a9a40f4f14c8cc73f8b05c944d82a24f8ab2a55b5
Magistral-Small-2509-Q4_1.gguf14.9 GB1e2ced43b403d477191ad2e14d7636db0dd54ee74982a8935cf7f09029a2c901
Magistral-Small-2509-Q4_K_M.gguf14.3 GB6d3e5f2a83ed9d64bd3382fb03be2f6e0bc7596a9de16e107bf22f959891945b
Magistral-Small-2509-Q4_K_S.gguf13.5 GB0fbe0690da06f3376d5580d8688d9f1dda4c7d7ec6a6a767ba639184ccc90d4c
Magistral-Small-2509-Q5_K_M.gguf16.8 GBd4536b8cb877f93d1296e7af54728009aa43bf29d246183a99e26d2748533c96
Magistral-Small-2509-Q5_K_S.gguf16.3 GBca3efac5591bbeaff96363ae25e7779724b08fb2edb1a1f14997a1584e727ae6
Magistral-Small-2509-Q6_K.gguf19.3 GB91619a62003c8a8811d7db0686b104dec9de6389a1c72e39a070ac9828f99222
Magistral-Small-2509-Q8_0.gguf25.1 GB8638a8ce8e62a52e605037e86337089452ba0f54137896d1275cc73f38baf054
Magistral-Small-2509-UD-IQ2_M.gguf8.24 GB0f31d60815121cb6031a1624868078262531a42d31bd3608c6bc32e7dcc8026f
Magistral-Small-2509-UD-IQ2_XXS.gguf6.75 GBcc615e9c7b3b4328d102b4e17a71ebb99b221786274a6a93c0ba32438ae14c6f
Magistral-Small-2509-UD-IQ3_XXS.gguf9.41 GB5c2c25453bf2703e6594b106b3e459945278e63401b602edfbaaa705bc02b795
Magistral-Small-2509-UD-Q2_K_XL.gguf9.29 GB31fef1ac98ad44e3a548f8d0ef11fbc7e0a33124adc64a712a150a3e22b35230
Magistral-Small-2509-UD-Q3_K_XL.gguf11.9 GB89a2f522bd9e8f0658d11c3d505ccb8ee789ba172e0f5ec214579400718e7143
Magistral-Small-2509-UD-Q4_K_XL.gguf14.5 GB0e20314d997ebe92d6122e098ae687788ac5257f2b57372df2d76cf6fb8fe1da
Magistral-Small-2509-UD-Q5_K_XL.gguf16.8 GB84841d9e8016b50456fd495de6c4c4ade7641493d93d6166e1ba6ca92a9f39e0
Magistral-Small-2509-UD-Q6_K_XL.gguf20.8 GB325bc37919c22693c9d2f2b26e5147821d17ff33f92433d383189425a3c053b1
Magistral-Small-2509-UD-Q8_K_XL.gguf29.0 GB8adb2280d4d90e0bde57138e1ba483f66a7d223518856b77b4755151fcba7bbc
README.md38.1 KB6defa1fb1f850b9b22b85c4d5f4837cab1ebe66298d8a817c0fe69fb60a3468e
imatrix_unsloth.gguf_file10.0 MB5fcacda7b1958091d4af46a1aefe8d21ca9f976d31c31bea75ddf8c91d0afe7e
mmproj-BF16.gguf879 MBd7bca1808bd578add6687383b4c9d53b7b2b07e049dd926362df6fdc3bf96308
mmproj-F16.gguf878 MB88a9f83ab64365849114ccf13d1b9d61d6d4c7ae2003020025dbc444b2090eb2
mmproj-F32.gguf1.76 GB5861a0938164a7e56cd137a8fcd49a300b9e00861f7f1cb5dfcf2483d765447c
params130 Bed4f0cd49c4b70f14d22434e3a82060eb9b447becdd4fbc653afe0cb80a85878
system554 B88ea600602b0dbfcd849f03836340405c6987352e826df553467b7d0a5e648e4
template695 B6db27cd4e277c91264572b9c899c1980daa8dea11e902f0070a6f4763f3d13c8
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
77fe877ee8 pinned now2026-11-15 04:47 UTC33 files · 377 GB

Use it

$ fw get unsloth/Magistral-Small-2509-GGUF
# manifest sha256 665b1d6e9e9b… · 377 GB · 33 files
$ fw verify ./Magistral-Small-2509-GGUF unsloth/Magistral-Small-2509-GGUF
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/unsloth/Magistral-Small-2509-GGUF.json --dir ./Magistral-Small-2509-GGUF $ python3 fw.py verify ./Magistral-Small-2509-GGUF ./unsloth__Magistral-Small-2509-GGUF.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download unsloth/Magistral-Small-2509-GGUF --revision 77fe877ee8e44eadf97235a1ad77471678eed310 --local-dir ./Magistral-Small-2509-GGUF
llama.cppDownload one GGUF variant (Magistral-Small-2509-UD-IQ2_XXS, 6.75 GB), then serve it.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download unsloth/Magistral-Small-2509-GGUF --include "Magistral-Small-2509-UD-IQ2_XXS*" --local-dir ./Magistral-Small-2509-GGUF $ llama-server -m ./Magistral-Small-2509-GGUF/Magistral-Small-2509-UD-IQ2_XXS.gguf
OllamaMake an Ollama model from the downloaded file.
$ printf 'FROM ./Magistral-Small-2509-GGUF/Magistral-Small-2509-UD-IQ2_XXS.gguf\n' > Modelfile $ ollama create magistral-small-2509-gguf -f Modelfile

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
6defa1fb1f850b9b22b85c4d5f4837cab1ebe66298d8a817c0fe69fb60a3468e
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: unsloth <huggingface.co/unsloth>Newsgroups: alt.freeweights.mistralSubject: Magistral-Small-2509-GGUFDate: 2026-11-15Commit: 77fe877Signed: 2DC28CC7B26A283B ✓
Upstream
unsloth/Magistral-Small-2509-GGUF
Pinned commit
77fe877ee8e44eadf97235a1ad77471678eed310
Manifest
Magistral-Small-2509-GGUF.json · .minisig
Manifest sha256
665b1d6e9e9b9c14df22bc523c1804cec94430839d31a3e1602ceda832156bec
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 04:47 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/unsloth/Magistral-Small-2509-GGUF.json $ curl -O https://freeweights.allternit.com/manifests/unsloth/Magistral-Small-2509-GGUF.json.minisig $ minisign -Vm Magistral-Small-2509-GGUF.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

Parent

mistralai/Magistral-Small-2509 · this model is a quantization of it

No model in the catalog names this one as its parent.

Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download unsloth/Magistral-Small-2509-GGUF
Open in Freeweights Studio

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

Signed manifest
minisign, key 2DC28CC7B26A283B. Magistral-Small-2509-GGUF.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