devstral-small-2-24b-instruct

Devstral Small 2 24B Instruct 2512

An agentic coding model that explores codebases, edits across multiple files, and drives software-engineering agents — light enough to run on a single GPU, with a 256k context window and vision support.

Apache-2.0
Text Generation
Transformers
Safetensors
vLLM
by @AIOZAI
6
0

Last updated: 16 days ago


Generic badge Generic badge

Devstral Small 2 24B Instruct 2512

Summary

Introduction

Devstral is an agentic LLM for software engineering tasks. Devstral Small 2 excels at using tools to explore codebases, edit across multiple files, and power software engineering agents. The model achieves strong performance on SWE-bench. This is an Instruct model in FP8, fine-tuned to follow instructions, which makes it well suited to chat, agentic, and instruction-based tasks for software engineering use cases.

Key Features

The Devstral Small 2 Instruct model offers the following capabilities:

  • Agentic Coding: Devstral is designed to excel at agentic coding tasks, making it a great choice for software engineering agents.
  • Lightweight: with its compact size of just 24 billion parameters, Devstral is light enough to run on a single RTX 4090 or a Mac with 32GB RAM, making it an appropriate model for local deployment and on-device use.
  • Apache 2.0 License: Open-source license allowing usage and modification for both commercial and non-commercial purposes.
  • Context Window: A 256k context window.

Updates compared to Devstral Small 1.1:

  • Vision Capabilities: Enables the model to analyze images and provide insights based on visual content, in addition to text.
  • Improved Performance: Devstral Small 2 is a step-up compared to its predecessors.
  • Attention Softmax Temperature: Devstral Small 2 shares the same architecture as Ministral 3, applying rope-scaling as introduced by Llama 4 and Scalable-Softmax Is Superior for Attention.
  • Better Generalization: Generalises better to diverse prompts and coding environments.

Use Cases

  • AI code assistants, agentic coding, and software engineering tasks — from integrating with developer tools to reasoning across an entire codebase within a single context window.

Benchmark Results

Model/BenchmarkSize (B Parameters)SWE Bench VerifiedSWE Bench MultilingualTerminal Bench 2
Devstral 212372.2%61.3%32.6%
Devstral Small 22468.0%55.7%22.5%
GLM 4.635568.0%--24.6%
Qwen 3 Coder Plus48069.6%54.7%25.4%
MiniMax M223069.4%56.5%30.0%
Kimi K2 Thinking100071.3%61.1%35.7%
DeepSeek v3.267173.1%70.2%46.4%
GPT 5.1 Codex High--73.7%--52.8%
GPT 5.1 Codex Max--77.9%--60.4%
Gemini 3 Pro--76.2%--54.2%
Claude Sonnet 4.5--77.2%68.0%42.8%

Benchmark results presented are based on publicly reported values for competitor models.

Parameters

Inputs

  • prompt_system - (text): A system-level instruction that defines the assistant’s behavior, role, and constraints. It guides how the model should interpret and respond to user inputs (e.g., tone, rules, or task-specific instructions).

  • prompt_user - (text): The user’s input message. This is the main query or request that the model will process. It is embedded as structured content within the messages field.

Output

  • output - (text): The model’s generated response based on the provided prompts and available tools.

Usage for developers

Please find below the details to track the information and access the code for processing the model on our platform.

Requirements

pip install -r requirements.txt

Code based on AIOZ structure

import os
from .prompt_input import set_prompt
from transformers import  Mistral3ForConditionalGeneration, MistralCommonBackend

...

def do_ai_task(
        prompt_system: str, 
        prompt_user: str,
        model_storage_directory: Union[str, Path],
        device: Literal["cpu", "cuda", "gpu"] = "cpu",
        *args, **kwargs) -> Any:
    """Define AI task: load model, pre-process, post-process, etc ..."""
    # Define AI task workflow. Below is an example

    model_weight_path = os.path.join(model_storage_directory, "Devstral-Small-2-24B-Instruct-2512")
    tokenizer = MistralCommonBackend.from_pretrained(model_weight_path)
    model = Mistral3ForConditionalGeneration.from_pretrained(model_weight_path, device_map="auto")

    ...

    decoded_output = tokenizer.decode(output[len(tokenized["input_ids"][0]) :])
    return decoded_output

Reference

This repository is based on and inspired by Mistral AI's work. We sincerely appreciate their generosity in sharing the model and code.

License

Devstral Small 2 is released by Mistral AI under the Apache License 2.0, which permits use, modification, and redistribution for both commercial and non-commercial purposes. AIOZ AI redistributes this model in accordance with those terms. A full copy of the license is included in the LICENSE file, and attribution is provided in the NOTICE file.

Citation

@misc{mistral2025devstral2,
  title        = {Devstral 2},
  author       = {{Mistral AI}},
  year         = {2025},
  howpublished = {\url{https://mistral.ai/news/devstral-2-vibe-cli/}},
  note         = {Accessed: 2026-07-02}
}