teknium/OpenHermes-2.5
Viewer • Updated • 1M • 16.3k • 868
How to use Irfanuruchi/SmolLM-360M-Instruct-MLX-5bit 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("Irfanuruchi/SmolLM-360M-Instruct-MLX-5bit")
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)How to use Irfanuruchi/SmolLM-360M-Instruct-MLX-5bit with MLX LM:
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "Irfanuruchi/SmolLM-360M-Instruct-MLX-5bit"
# Install MLX LM
uv tool install mlx-lm
# Start the server
mlx_lm.server --model "Irfanuruchi/SmolLM-360M-Instruct-MLX-5bit"
# Calling the OpenAI-compatible server with curl
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "Irfanuruchi/SmolLM-360M-Instruct-MLX-5bit",
"messages": [
{"role": "user", "content": "Hello"}
]
}'A 5-bit MLX quantized build of HuggingFaceTB/SmolLM-360M-Instruct targeting a better quality/footprint balance than 3-bit.
These numbers were measured on macOS (M3 Pro).
iPhone / iPad performance will vary depending on hardware and memory.
mlx_lm.generate \
--model Irfanuruchi/SmolLM-360M-Instruct-MLX-5bit \
--prompt "Reply with exactly 3 bullet points, 4-8 words each: what can you do offline?" \
--max-tokens 80
Upstream SmolLM is released under Apache-2.0. Preserve attribution and the original license terms.
5-bit
Base model
HuggingFaceTB/SmolLM-360M