Instructions to use mlx-community/Devstral-Small-2-24B-Instruct-2512-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/Devstral-Small-2-24B-Instruct-2512-4bit with MLX:
# Make sure mlx-vlm is installed # pip install --upgrade mlx-vlm from mlx_vlm import load, generate from mlx_vlm.prompt_utils import apply_chat_template from mlx_vlm.utils import load_config # Load the model model, processor = load("mlx-community/Devstral-Small-2-24B-Instruct-2512-4bit") config = load_config("mlx-community/Devstral-Small-2-24B-Instruct-2512-4bit") # Prepare input image = ["http://images.cocodataset.org/val2017/000000039769.jpg"] prompt = "Describe this image." # Apply chat template formatted_prompt = apply_chat_template( processor, config, prompt, num_images=1 ) # Generate output output = generate(model, processor, formatted_prompt, image) print(output) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use mlx-community/Devstral-Small-2-24B-Instruct-2512-4bit with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "mlx-community/Devstral-Small-2-24B-Instruct-2512-4bit"
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "mlx-community/Devstral-Small-2-24B-Instruct-2512-4bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent
How to use mlx-community/Devstral-Small-2-24B-Instruct-2512-4bit with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "mlx-community/Devstral-Small-2-24B-Instruct-2512-4bit"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default mlx-community/Devstral-Small-2-24B-Instruct-2512-4bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use mlx-community/Devstral-Small-2-24B-Instruct-2512-4bit with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "mlx-community/Devstral-Small-2-24B-Instruct-2512-4bit"
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "mlx-community/Devstral-Small-2-24B-Instruct-2512-4bit" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Re-upload mistralai/Devstral-Small-2-24B-Instruct-2512 MLX 4bit
Browse filesConverted from mistralai/Devstral-Small-2-24B-Instruct-2512 at revision c599e8e56f3f9110e97f0dc0450ce248e3334d84 with the current mlx-vlm checkout. README.md is intentionally preserved from the existing repository card.
- config.json +78 -78
- model-00001-of-00003.safetensors +2 -2
- model-00002-of-00003.safetensors +2 -2
- model-00003-of-00003.safetensors +2 -2
- processor_config.json +0 -1
- tokenizer_config.json +1 -1
config.json
CHANGED
|
@@ -1,83 +1,83 @@
|
|
| 1 |
{
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
"do_sample": true,
|
| 6 |
-
"dtype": "bfloat16",
|
| 7 |
-
"eos_token_id": 2,
|
| 8 |
-
"generation_config": {
|
| 9 |
-
"bos_token_id": 1,
|
| 10 |
"do_sample": true,
|
|
|
|
| 11 |
"eos_token_id": 2,
|
| 12 |
-
"
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
"temperature": 0.15,
|
| 15 |
-
"
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
"
|
| 45 |
-
"
|
| 46 |
-
"
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
},
|
| 58 |
-
"
|
| 59 |
-
|
| 60 |
-
"vocab_size": 131072
|
| 61 |
-
},
|
| 62 |
-
"tie_word_embeddings": false,
|
| 63 |
-
"transformers_version": "5.0.0.dev0",
|
| 64 |
-
"vision_config": {
|
| 65 |
-
"attention_dropout": 0.0,
|
| 66 |
-
"head_dim": 64,
|
| 67 |
-
"hidden_act": "silu",
|
| 68 |
-
"hidden_size": 1024,
|
| 69 |
-
"image_size": 1540,
|
| 70 |
-
"initializer_range": 0.02,
|
| 71 |
-
"intermediate_size": 4096,
|
| 72 |
-
"model_type": "pixtral",
|
| 73 |
-
"num_attention_heads": 16,
|
| 74 |
-
"num_channels": 3,
|
| 75 |
-
"num_hidden_layers": 24,
|
| 76 |
-
"patch_size": 14,
|
| 77 |
-
"rope_parameters": {
|
| 78 |
-
"rope_theta": 10000.0,
|
| 79 |
-
"rope_type": "default"
|
| 80 |
-
}
|
| 81 |
-
},
|
| 82 |
-
"vision_feature_layer": -1
|
| 83 |
-
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"Mistral3ForConditionalGeneration"
|
| 4 |
+
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
"do_sample": true,
|
| 6 |
+
"dtype": "bfloat16",
|
| 7 |
"eos_token_id": 2,
|
| 8 |
+
"generation_config": {
|
| 9 |
+
"bos_token_id": 1,
|
| 10 |
+
"eos_token_id": 2,
|
| 11 |
+
"max_length": 262144,
|
| 12 |
+
"pad_token_id": 11,
|
| 13 |
+
"do_sample": true,
|
| 14 |
+
"temperature": 0.15,
|
| 15 |
+
"transformers_version": "5.0.0.dev0"
|
| 16 |
+
},
|
| 17 |
+
"image_token_index": 10,
|
| 18 |
+
"model_type": "mistral3",
|
| 19 |
+
"multimodal_projector_bias": false,
|
| 20 |
+
"projector_hidden_act": "gelu",
|
| 21 |
+
"quantization": {
|
| 22 |
+
"group_size": 64,
|
| 23 |
+
"bits": 4,
|
| 24 |
+
"mode": "affine"
|
| 25 |
+
},
|
| 26 |
+
"quantization_config": {
|
| 27 |
+
"group_size": 64,
|
| 28 |
+
"bits": 4,
|
| 29 |
+
"mode": "affine"
|
| 30 |
+
},
|
| 31 |
+
"spatial_merge_size": 2,
|
| 32 |
"temperature": 0.15,
|
| 33 |
+
"text_config": {
|
| 34 |
+
"attention_dropout": 0.0,
|
| 35 |
+
"head_dim": 128,
|
| 36 |
+
"hidden_act": "silu",
|
| 37 |
+
"hidden_size": 5120,
|
| 38 |
+
"initializer_range": 0.02,
|
| 39 |
+
"intermediate_size": 32768,
|
| 40 |
+
"max_position_embeddings": 393216,
|
| 41 |
+
"model_type": "ministral3",
|
| 42 |
+
"num_attention_heads": 32,
|
| 43 |
+
"num_hidden_layers": 40,
|
| 44 |
+
"num_key_value_heads": 8,
|
| 45 |
+
"rms_norm_eps": 1e-05,
|
| 46 |
+
"rope_parameters": {
|
| 47 |
+
"beta_fast": 32.0,
|
| 48 |
+
"beta_slow": 1.0,
|
| 49 |
+
"factor": 48.0,
|
| 50 |
+
"llama_4_scaling_beta": 0.1,
|
| 51 |
+
"mscale": 1.0,
|
| 52 |
+
"mscale_all_dim": 1.0,
|
| 53 |
+
"original_max_position_embeddings": 8192,
|
| 54 |
+
"rope_theta": 100000000.0,
|
| 55 |
+
"rope_type": "yarn",
|
| 56 |
+
"type": "yarn"
|
| 57 |
+
},
|
| 58 |
+
"sliding_window": null,
|
| 59 |
+
"use_cache": true,
|
| 60 |
+
"vocab_size": 131072
|
| 61 |
+
},
|
| 62 |
+
"tie_word_embeddings": false,
|
| 63 |
+
"transformers_version": "5.0.0.dev0",
|
| 64 |
+
"vision_config": {
|
| 65 |
+
"attention_dropout": 0.0,
|
| 66 |
+
"head_dim": 64,
|
| 67 |
+
"hidden_act": "silu",
|
| 68 |
+
"hidden_size": 1024,
|
| 69 |
+
"image_size": 1540,
|
| 70 |
+
"initializer_range": 0.02,
|
| 71 |
+
"intermediate_size": 4096,
|
| 72 |
+
"model_type": "pixtral",
|
| 73 |
+
"num_attention_heads": 16,
|
| 74 |
+
"num_channels": 3,
|
| 75 |
+
"num_hidden_layers": 24,
|
| 76 |
+
"patch_size": 14,
|
| 77 |
+
"rope_parameters": {
|
| 78 |
+
"rope_theta": 10000.0,
|
| 79 |
+
"rope_type": "default"
|
| 80 |
+
}
|
| 81 |
},
|
| 82 |
+
"vision_feature_layer": -1
|
| 83 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
model-00001-of-00003.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bf03240339489cbf7582654c237b7c7bba729640eb5957fbb8918b889d9a8e91
|
| 3 |
+
size 5349121612
|
model-00002-of-00003.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1adbf960fd4eee50836d54683dd0a8915976ec57a6326cfa0588238fa6c6e69f
|
| 3 |
+
size 5314713116
|
model-00003-of-00003.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:562933b8e4840869a912bf0d9ba1b53a7ebd13619f299342d0c0e2229b95a639
|
| 3 |
+
size 4438996896
|
processor_config.json
CHANGED
|
@@ -24,7 +24,6 @@
|
|
| 24 |
],
|
| 25 |
"pad_size": null,
|
| 26 |
"patch_size": 14,
|
| 27 |
-
"processor_class": "Mistral3Processor",
|
| 28 |
"resample": 3,
|
| 29 |
"rescale_factor": 0.00392156862745098,
|
| 30 |
"size": {
|
|
|
|
| 24 |
],
|
| 25 |
"pad_size": null,
|
| 26 |
"patch_size": 14,
|
|
|
|
| 27 |
"resample": 3,
|
| 28 |
"rescale_factor": 0.00392156862745098,
|
| 29 |
"size": {
|
tokenizer_config.json
CHANGED
|
@@ -1,5 +1,4 @@
|
|
| 1 |
{
|
| 2 |
-
"additional_special_tokens": null,
|
| 3 |
"backend": "tokenizers",
|
| 4 |
"bos_token": "<s>",
|
| 5 |
"eos_token": "</s>",
|
|
@@ -1006,6 +1005,7 @@
|
|
| 1006 |
"<SPECIAL_999>"
|
| 1007 |
],
|
| 1008 |
"is_local": true,
|
|
|
|
| 1009 |
"model_max_length": 1000000000000000019884624838656,
|
| 1010 |
"pad_token": "<pad>",
|
| 1011 |
"processor_class": "Mistral3Processor",
|
|
|
|
| 1 |
{
|
|
|
|
| 2 |
"backend": "tokenizers",
|
| 3 |
"bos_token": "<s>",
|
| 4 |
"eos_token": "</s>",
|
|
|
|
| 1005 |
"<SPECIAL_999>"
|
| 1006 |
],
|
| 1007 |
"is_local": true,
|
| 1008 |
+
"local_files_only": false,
|
| 1009 |
"model_max_length": 1000000000000000019884624838656,
|
| 1010 |
"pad_token": "<pad>",
|
| 1011 |
"processor_class": "Mistral3Processor",
|