Model Card for Zero-Mistral-24B

Zero-Mistral-24B is an improved TEXT-only version of mistralai/Mistral-Small-3.1-24B-Instruct-2503, primarily adapted for Russian and English languages. The original Mistral model contains vision features which were removed from this model. The training involved SFT stage primarily on Big Russian Dataset dataset and proprietary dataset from Shkolkovo.online.

The model has good math skills and some reasoning abilities.

The modele saves original mistral long context capabilities up to 128k tokens.

Model Details

image/png

Model Description

📚 Model versions

  • Merged 16-bit - original 16bit merged version for transformers.
  • GGUF - different GGUF versions: BF16, F16, Q8_0, Q6_K, Q4_K_M, IQ4_XS, etc.

📊 Benchmarks for main 16-bit merged version

MERA

MERA score: 0.623

Task Result Metric
LCS 0.194 Accuracy
RCB 0.607 / 0.592 Avg. F1 / Accuracy
USE 0.452 Grade Norm
RWSD 0.55 Accuracy
PARus 0.942 Accuracy
ruTiE 0.868 Accuracy
MultiQ 0.781 / 0.629 F1-score/EM
CheGeKa 0.397 / 0.322 F1 / EM
ruModAr 0.971 EM
MaMuRAMu 0.832 Accuracy
ruMultiAr 0.354 EM
ruCodeEval 0 / 0 / 0 pass@k ¯\_(ツ)_/¯
MathLogicQA 0.613 Accuracy
ruWorldTree 0.987 / 0.987 Avg. F1 / Accuracy
ruOpenBookQA 0.913 / 0.913 Avg. F1 / Accuracy

Оценка по открытым задачам:

Задача Результат Метрика
BPS 0.981 Accuracy
ruMMLU 0.778 Accuracy
SimpleAr 0.997 EM
ruHumanEval 0.006 / 0.006 / 0.006 pass@k ¯\_(ツ)_/¯
ruHHH 0.916 Accuracy
ruHateSpeech 0.834 Accuracy
ruDetox 0.341 / 0.843 / 0.624 / 0.66 Общая средняя оценка (J) / Оценка сохранения смысла (SIM) / Оценка натуральности (FL) / Точность переноса стиля (STA)
ruEthics [[0.386, 0.399, 0.41, 0.333, 0.327], [0.421, 0.427, 0.452, 0.375, 0.363], [0.653, 0.65, 0.697, 0.596, 0.573]] 5 MCC

Usage

The model can be used with the following frameworks;

Recommended system prompts

prompts = {
    "generic": "Ты виртуальный ассистент. Ты отвечаешь на вопросы людей, помогаешь им и поддерживаешь. Ты создан, чтобы быть полезным, безобидным и честным. Ты отвечаешь на том языке, на котором был задан вопрос или попросил пользователь.",
    "think": """Ты виртуальный ассистент. Ты отвечаешь на вопросы людей, помогаешь им и поддерживаешь. Ты создан, чтобы быть полезным, безобидным и честным. Ты отвечаешь на том языке, на котором был задан вопрос или попросил пользователь.

Answer in the following format:
<think>Reasoning: ...</think>
...""",
    "task": "Ты виртуальный ассистент. Ты отвечаешь на вопросы людей, помогаешь им и поддерживаешь. Ты создан, чтобы быть полезным, безобидным и честным. Ты отвечаешь на том языке, на котором был задан вопрос или попросил пользователь. Реши задачу по инструкции ниже. Не извиняйся, не строй диалог.",
    "task_think": """Ты виртуальный ассистент. Ты отвечаешь на вопросы людей, помогаешь им и поддерживаешь. Ты создан, чтобы быть полезным, безобидным и честным. Ты отвечаешь на том языке, на котором был задан вопрос или попросил пользователь. Реши задачу по инструкции ниже. Не извиняйся, не строй диалог.

Answer in the following format:
<think>Reasoning: ...</think>
...""",
     "english_generic": """You are Mistral Small 3, a Large Language Model (LLM) created by Mistral AI, a French startup headquartered in Paris.
Your knowledge base was last updated on 2023-10-01. The current date is 2025-01-30.
When you're not sure about some information, you say that you don't have the information and don't make up anything.
If the user's question is not clear, ambiguous, or does not provide enough context for you to accurately answer the question, you do not try to answer it right away and you rather ask the user to clarify their request (e.g. \"What are some good restaurants around me?\" => \"Where are you?\" or \"When is the next flight to Tokyo\" => \"Where do you travel from?\")
""",
     "english_think": """You are Mistral Small 3, a Large Language Model (LLM) created by Mistral AI, a French startup headquartered in Paris.
Your knowledge base was last updated on 2023-10-01. The current date is 2025-01-30.
When you're not sure about some information, you say that you don't have the information and don't make up anything.
If the user's question is not clear, ambiguous, or does not provide enough context for you to accurately answer the question, you do not try to answer it right away and you rather ask the user to clarify their request (e.g. \"What are some good restaurants around me?\" => \"Where are you?\" or \"When is the next flight to Tokyo\" => \"Where do you travel from?\")

Answer in the following format:
<think>Reasoning: ...</think>
""",
}

vLLM

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

Note 1: We recommond using a relatively low temperature, such as temperature=0.15.

Note 2: Make sure to add a system prompt to the model to best tailer it for your needs. If you want to use the model as a general assistant, we recommend the following system prompt:

system_prompt = """You are Mistral Small 3, a Large Language Model (LLM) created by Mistral AI, a French startup headquartered in Paris.
Your knowledge base was last updated on 2023-10-01. The current date is 2025-01-30.
When you're not sure about some information, you say that you don't have the information and don't make up anything.
If the user's question is not clear, ambiguous, or does not provide enough context for you to accurately answer the question, you do not try to answer it right away and you rather ask the user to clarify their request (e.g. \"What are some good restaurants around me?\" => \"Where are you?\" or \"When is the next flight to Tokyo\" => \"Where do you travel from?\")

Note 3: flash_attn or flashinfer-python preferred for better performance.

Installation

Make sure you install vLLM >= 0.8.4:

pip install --upgrade vllm

Also make sure you have mistral_common >= 1.5.4 installed:

pip install --upgrade mistral_common

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

Server

We recommand that you use ZeroAgency/Zero-Mistral-24B in a server/client setting.

  1. Spin up a server:
vllm serveZeroAgency/Zero-Mistral-24B --enable-prefix-caching --dtype bfloat16 --max-model-len 32768 --tool-call-parser mistral --enable-auto-tool-choice

Note: Running Zero-Mistral-24B on GPU requires ~55 GB of GPU RAM in bf16 or fp16.

  1. To ping the client you can use a simple Python snippet.
import requests
import json
from datetime import datetime, timedelta

url = "http://<your-server>:8000/v1/chat/completions"
headers = {"Content-Type": "application/json", "Authorization": "Bearer token"}

model = "ZeroAgency/Zero-Mistral-24B"

messages = [
    {
        "role": "system",
        "content": """Ты виртуальный ассистент. Ты отвечаешь на вопросы людей, помогаешь им и поддерживаешь. Ты создан, чтобы быть полезным, безобидным и честным. Ты отвечаешь на том языке, на котором был задан вопрос или попросил пользователь. Реши задачу по инструкции ниже. Не извиняйся, не строй диалог.

Answer in the following format:
<think>Reasoning: ...</think>
..."""
    },
    { # Task from https://3.shkolkovo.online/catalog/2552/93150
        "role": "user",
        "content": """Первый рабочий за час делает на 9 деталей больше, чем второй, и выполняет заказ, состоящий из 216 деталей, на 4 часа быстрее, чем второй рабочий, выполняющий такой же заказ. Сколько деталей в час делает первый рабочий?"""
    },
]

data = {"model": model, "messages": messages}

response = requests.post(url, headers=headers, data=json.dumps(data))
print(response.json()["choices"][0]["message"]["content"])

#<think> Пусть x — количество деталей, которые делает второй рабочий за час. Тогда первый рабочий делает x + 9 деталей за час. Составим таблицу: Первый рабочий Второй рабочий Количество деталей в час x + 9 x Количество часов 216 : (x + 9) 216 : x Разность количества часов 4 216 : (x + 9) − 216 : x = 4 216x − 216(x + 9) = 4x(x + 9) 216x − 216x − 1944 = 4x^2 + 36x 1944 = 4x^2 + 36x 4x^2 + 36x − 1944 = 0 D = 36^2 + 4 · 4 · 1944 = 1296 + 31104 = 32400 = 180^2 x1 = −36 + 180 : 8 = 144 : 8 = 18 x2 = −36 − 180 : 8 < 0 — не подходит по смыслу задачи. Тогда первый рабочий делает 18 + 9 = 27 деталей в час. </think>
#27

Offline

from vllm import LLM
from vllm.sampling_params import SamplingParams
from datetime import datetime, timedelta


# note that running this model on GPU requires over 60 GB of GPU RAM
llm = LLM(model="ZeroAgency/Zero-Mistral-24B", tokenizer_mode="mistral", tensor_parallel_size=8)

SYSTEM_PROMPT = """Ты виртуальный ассистент. Ты отвечаешь на вопросы людей, помогаешь им и поддерживаешь. Ты создан, чтобы быть полезным, безобидным и честным. Ты отвечаешь на том языке, на котором был задан вопрос или попросил пользователь.

Answer in the following format:
<think>Reasoning: ...</think>
..."""

user_prompt = """Что больше 9.9 или 9.11?"""

messages = [
    {
        "role": "system",
        "content": SYSTEM_PROMPT
    },
    {
        "role": "user",
        "content": user_prompt
    },
]


sampling_params = SamplingParams(max_tokens=512, temperature=0.0, top_p=1, top_k=-1)
outputs = llm.chat(messages, sampling_params=sampling_params)


print(outputs[0].outputs[0].text)
#<think> Задача: Сравните 9.9 и 9.11 для определения того, какой из них больше Подход: Десятичное сравнение с выравниванием десятичных точек Сложность: Низкий к среднему Я должен тщательно выровнять десятичные точки и сравнить цифры по месту. 1. Выровнять десятичные точки: 9.90 9.11 2. Сравните целые числа: оба имеют 9, поэтому они равны 3. Сравните десятые места: 9.90 имеет 9, 9.11 имеет 1 9 &gt; 1, поэтому 9.90 больше 4. Сравните сотые места: 9.90 имеет 0, 9.11 имеет 1 0 &lt; 1, но это не имеет значения, поскольку десятое место уже определило большее число<reflection>Я правильно выровнял десятичные точки и сравнил цифры по месту. Я заметил, что десятое место (9 против 1) определило, что 9.9 больше, чем 9.11. Сотые места не были необходимы для этого сравнения.</reflection> <self_improvement>В будущих сравнениях я буду уделять первоочередное внимание самым левым цифрам, где есть разница, чтобы оптимизировать процесс сравнения.</self_improvement> </think>  9.9 больше, чем 9.11. Когда вы сравниваете десятичные числа, вы начинаете с целых чисел, затем переходите к десятым местам, сотым местам и так далее. В этом случае 9.9 имеет 9 в десятом месте, в то время как 9.11 имеет 1 в десятом месте. Поскольку 9 &gt; 1, 9.9 больше, чем 9.11. 

Transformers

If you want to use Hugging Face transformers to generate text, you can do something like this.

from transformers import pipeline
import torch

messages = [
    {"role": "user", "content": "Что больше 9.9 или 9.11?"},
]
chatbot = pipeline("text-generation", model="ZeroAgency/Zero-Mistral-24B", max_new_tokens=256, torch_dtype=torch.bfloat16)
response = chatbot(messages, temperature=0.1)
print(response[0]['generated_text'][1]['content'])
# 9.9 больше, чем 9.11.

llama-server

You can run llama-server - OpenAI compatible server for serving GGUF version of model.

Example of running with docker container:

docker run --gpus all -v `pwd`:/mnt -p8000:8000 ghcr.io/ggml-org/llama.cpp:server-cuda  -fa --port 8000 --host 0.0.0.0 --temp 0.0 --jinja -ngl 100 --api-key DUMMY-API-KEY -m /mnt/Zero-Mistral-24B-Q4_K_M_L.gguf

Environmental Impact

Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).

  • Hardware Type: 8x H200
  • Hours used: 29.5
  • Cloud Provider: Runpod
  • Compute Region: US-DE
  • Carbon Emitted: ¯\_(ツ)_/¯
Downloads last month
547
Safetensors
Model size
23.6B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for ZeroAgency/Zero-Mistral-24B

Finetuned
(18)
this model
Adapters
7 models
Merges
1 model
Quantizations
3 models

Dataset used to train ZeroAgency/Zero-Mistral-24B

Collection including ZeroAgency/Zero-Mistral-24B