Instructions to use majentik/Shieldstral-1.0-3B-MLX-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use majentik/Shieldstral-1.0-3B-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("majentik/Shieldstral-1.0-3B-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
- MLX LM
How to use majentik/Shieldstral-1.0-3B-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 "majentik/Shieldstral-1.0-3B-MLX-4bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "majentik/Shieldstral-1.0-3B-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": "majentik/Shieldstral-1.0-3B-MLX-4bit", "messages": [ {"role": "user", "content": "Hello"} ] }' - Atomic Chat
Shieldstral-1.0-3B-MLX-4bit
MLX 4bit (affine, group size 64) quantized variant of mistralai/Shieldstral-1.0-3B — Mistral's content-safety / moderation model — for Apple silicon via mlx-lm.
Provenance
- Source: mistralai/Shieldstral-1.0-3B @ revision
003ec7e2b0bab5f0e6307edbaf186fa5822b76f5(Apache-2.0). - Quantized with
mlx_lm.convert(mlx-lm 0.31.3): affine, 4-bit, group size 64. - Text-only pack: the upstream checkpoint is a
mistral3multimodal wrapper; mlx-lm'smistral3loader drops the vision tower by design, so this pack ships only the Ministral-3B text model. Use the upstream repo if you need image moderation.
Caveat
This is a quantized safety classifier. Quantization can shift borderline classification decisions; validate against your own moderation benchmark before using a quantized tier in production guardrails. Prefer the 8bit tier when in doubt.
Smoke gate
Before upload this pack passed a deterministic coherence gate: greedy
64-token moderation-style chat generation loaded through
mlx_lm.load, judged for emptiness, repetition loops, multi-script
gibberish, and special-token debris. Verdict: ok.
Usage
pip install mlx-lm
mlx_lm.generate --model majentik/Shieldstral-1.0-3B-MLX-4bit \
--prompt "Classify as SAFE or UNSAFE: 'how do I sharpen a kitchen knife?'"
Evaluation
| Benchmark | Score |
|---|---|
| arc_easy_acc | 0.2300 |
| hellaswag_acc | 0.2400 |
Available tiers
- Downloads last month
- 34
4-bit
Model tree for majentik/Shieldstral-1.0-3B-MLX-4bit
Base model
mistralai/Ministral-3-3B-Base-2512