Text Generation
MLX
Safetensors
motif
apple-silicon
quantized
4-bit precision
differential-attention
polynorm
conversational
custom_code
Instructions to use junhoyeo/Motif-2.6B-MLX-q4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use junhoyeo/Motif-2.6B-MLX-q4 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("junhoyeo/Motif-2.6B-MLX-q4") 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 junhoyeo/Motif-2.6B-MLX-q4 with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "junhoyeo/Motif-2.6B-MLX-q4"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "junhoyeo/Motif-2.6B-MLX-q4" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "junhoyeo/Motif-2.6B-MLX-q4", "messages": [ {"role": "user", "content": "Hello"} ] }'
Motif-2.6B — MLX 4-bit
4-bit MLX conversion of Motif-Technologies/Motif-2.6B for Apple Silicon, produced by mlx-motif — the MLX port of Motif's Differential Attention + PolyNorm architecture. This 2.6B variant uses the ungrouped ("vanilla") differential-attention form.
This checkpoint requires mlx-motif (it registers the model class into mlx-lm's loader); it will not load with stock mlx_lm.load.
Usage
git clone https://github.com/junhoyeo/mlx-motif && cd mlx-motif
uv pip install -e .
mlx-motif generate --model <this-repo> --prompt "Hello, world."
mlx-motif serve --model <this-repo> --port 8080 # OpenAI-compatible
Conversion provenance
- Converter:
mlx-motif convert --hf-path Motif-Technologies/Motif-2.6B --out … --quantize --bits 4(group_size 64, uniform preset) - mlx-motif: github.com/junhoyeo/mlx-motif @
e6c401a(converted with this repo'sconvert.py; validated at this commit) - mlx version: 0.31.2
Validation (measured on Apple M1 Max, 64 GB)
- End-to-end greedy generation verified on real weights (Python CLI, OpenAI server, and the native Swift runtime).
- Known numerical note: on this checkpoint, mlx-motif's custom-kernel path and its pure-MLX reference path produce output that diverges within a few greedy tokens — the two paths accumulate float reductions in different orders and the low-order-bit difference can flip the argmax on this architecture. Both outputs are valid samples of the model; this is documented (and expected) behavior, unlike the 12.7B grouped checkpoint where the two paths are byte-identical.
- Parity against the HF PyTorch reference is verified at bf16, not at q4.
- A q4 perplexity number for this checkpoint has not yet been recorded (the 12.7B's is 12.365); it will be added on the next benchmark pass.
License & attribution
The model weights are derivative of Motif Technologies' release and remain under Apache 2.0, © Motif Technologies. The conversion tooling is MIT (mlx-motif). If you use this model, please attribute the original model card.
- Downloads last month
- 212
Model size
0.8B params
Tensor type
BF16
·
U32 ·
F32 ·
Hardware compatibility
Log In to add your hardware
4-bit
Model tree for junhoyeo/Motif-2.6B-MLX-q4
Base model
Motif-Technologies/Motif-2.6B