Text Generation
MLX
Safetensors
English
French
gemma2
pulse
4bit
quantized
fused
conversational
4-bit precision
Instructions to use muonai/PULSE-2B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use muonai/PULSE-2B 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("muonai/PULSE-2B") 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 muonai/PULSE-2B with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "muonai/PULSE-2B"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "muonai/PULSE-2B" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "muonai/PULSE-2B", "messages": [ {"role": "user", "content": "Hello"} ] }' - Atomic Chat
PULSE-2B
PULSE-2B is a fully standalone, merged, and 4-bit quantized version of Google's Gemma-2 2B Instruct.
It combines the base weights with a custom LoRA fine-tuning adapter into a single, high-performance weight set optimized for fast on-device inference using MLX on Apple Silicon (M1/M2/M3/M4).
Key Highlights
- Standalone: No need to download base weights or attach adapters separately.
- Quantization: 4-bit group-quantized (
group_size=64) via MLX (~1.54 GB VRAM). - Inference Speed: ~57 tokens/sec on Apple Silicon.
- Training Base: Fine-tuned over 600 iterations from
google/gemma-2-2b-it.
π Quickstart Guide
1. Installation
Ensure you are running macOS on Apple Silicon:
pip install -U mlx-lm
2. Command Line Interface (CLI)
Generate text instantly in your terminal:
mlx_lm.generate \
--model muonai/PULSE-2B \
--prompt "Instruction:\nExplain the concept of fine-tuning in 2 simple sentences.\n\nResponse:\n" \
--max-tokens 150
Start an interactive chat session:
mlx_lm.chat --model muonai/PULSE-2B
3. Python API (mlx_lm)
from mlx_lm import load, generate
model_id = "muonai/PULSE-2B"
# Load standalone model and tokenizer
model, tokenizer = load(model_id)
prompt = "Instruction:\nGive 3 quick tips for daily productivity.\n\nResponse:\n"
response = generate(
model,
tokenizer,
prompt=prompt,
max_tokens=200,
verbose=True
)
print(response)
π Performance Benchmark
Tested on Apple Silicon locally using mlx_lm.generate:
| Metric | Measurement |
|---|---|
| Generation Speed | ~56.97 tokens/sec |
| Prompt Processing | ~49.83 tokens/sec |
| Peak Memory Usage | ~1.54 GB |
| Precision | ~4.50 bits/weight |
π License
This model is a derivative work based on Google's Gemma 2 weights and is subject to the official Gemma Terms of Use.
- Downloads last month
- 236
Model size
3B params
Tensor type
U32
Β·
BF16 Β·
Hardware compatibility
Log In to add your hardware
4-bit