Text Generation
Safetensors
MLX
vllm
mistral
mlx-my-repo
text2text-generation
conversational
4-bit precision
Instructions to use introvoyz041/Devstral-Small-2507-MLX-4bit-mlx-4Bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use introvoyz041/Devstral-Small-2507-MLX-4bit-mlx-4Bit with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("introvoyz041/Devstral-Small-2507-MLX-4bit-mlx-4Bit") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use introvoyz041/Devstral-Small-2507-MLX-4bit-mlx-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 "introvoyz041/Devstral-Small-2507-MLX-4bit-mlx-4Bit"
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "introvoyz041/Devstral-Small-2507-MLX-4bit-mlx-4Bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use introvoyz041/Devstral-Small-2507-MLX-4bit-mlx-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 "introvoyz041/Devstral-Small-2507-MLX-4bit-mlx-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 introvoyz041/Devstral-Small-2507-MLX-4bit-mlx-4Bit
Run Hermes
hermes
- MLX LM
How to use introvoyz041/Devstral-Small-2507-MLX-4bit-mlx-4Bit with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "introvoyz041/Devstral-Small-2507-MLX-4bit-mlx-4Bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "introvoyz041/Devstral-Small-2507-MLX-4bit-mlx-4Bit" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "introvoyz041/Devstral-Small-2507-MLX-4bit-mlx-4Bit", "messages": [ {"role": "user", "content": "Hello"} ] }'
Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
- fr
|
| 5 |
+
- de
|
| 6 |
+
- es
|
| 7 |
+
- pt
|
| 8 |
+
- it
|
| 9 |
+
- ja
|
| 10 |
+
- ko
|
| 11 |
+
- ru
|
| 12 |
+
- zh
|
| 13 |
+
- ar
|
| 14 |
+
- fa
|
| 15 |
+
- id
|
| 16 |
+
- ms
|
| 17 |
+
- ne
|
| 18 |
+
- pl
|
| 19 |
+
- ro
|
| 20 |
+
- sr
|
| 21 |
+
- sv
|
| 22 |
+
- tr
|
| 23 |
+
- uk
|
| 24 |
+
- vi
|
| 25 |
+
- hi
|
| 26 |
+
- bn
|
| 27 |
+
license: apache-2.0
|
| 28 |
+
library_name: vllm
|
| 29 |
+
inference: false
|
| 30 |
+
base_model: lmstudio-community/Devstral-Small-2507-MLX-4bit
|
| 31 |
+
extra_gated_description: If you want to learn more about how we process your personal
|
| 32 |
+
data, please read our <a href="https://mistral.ai/terms/">Privacy Policy</a>.
|
| 33 |
+
pipeline_tag: text2text-generation
|
| 34 |
+
tags:
|
| 35 |
+
- mlx
|
| 36 |
+
- mlx
|
| 37 |
+
- mlx-my-repo
|
| 38 |
+
---
|
| 39 |
+
|
| 40 |
+
# introvoyz041/Devstral-Small-2507-MLX-4bit-mlx-4Bit
|
| 41 |
+
|
| 42 |
+
The Model [introvoyz041/Devstral-Small-2507-MLX-4bit-mlx-4Bit](https://huggingface.co/introvoyz041/Devstral-Small-2507-MLX-4bit-mlx-4Bit) was converted to MLX format from [lmstudio-community/Devstral-Small-2507-MLX-4bit](https://huggingface.co/lmstudio-community/Devstral-Small-2507-MLX-4bit) using mlx-lm version **0.28.3**.
|
| 43 |
+
|
| 44 |
+
## Use with mlx
|
| 45 |
+
|
| 46 |
+
```bash
|
| 47 |
+
pip install mlx-lm
|
| 48 |
+
```
|
| 49 |
+
|
| 50 |
+
```python
|
| 51 |
+
from mlx_lm import load, generate
|
| 52 |
+
|
| 53 |
+
model, tokenizer = load("introvoyz041/Devstral-Small-2507-MLX-4bit-mlx-4Bit")
|
| 54 |
+
|
| 55 |
+
prompt="hello"
|
| 56 |
+
|
| 57 |
+
if hasattr(tokenizer, "apply_chat_template") and tokenizer.chat_template is not None:
|
| 58 |
+
messages = [{"role": "user", "content": prompt}]
|
| 59 |
+
prompt = tokenizer.apply_chat_template(
|
| 60 |
+
messages, tokenize=False, add_generation_prompt=True
|
| 61 |
+
)
|
| 62 |
+
|
| 63 |
+
response = generate(model, tokenizer, prompt=prompt, verbose=True)
|
| 64 |
+
```
|