teknium/OpenHermes-2.5
Viewer • Updated • 1M • 18.6k • 839
How to use Irfanuruchi/SmolLM-1.7B-Instruct-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("Irfanuruchi/SmolLM-1.7B-Instruct-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)How to use Irfanuruchi/SmolLM-1.7B-Instruct-MLX-4bit with MLX LM:
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "Irfanuruchi/SmolLM-1.7B-Instruct-MLX-4bit"
# Install MLX LM
uv tool install mlx-lm
# Start the server
mlx_lm.server --model "Irfanuruchi/SmolLM-1.7B-Instruct-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": "Irfanuruchi/SmolLM-1.7B-Instruct-MLX-4bit",
"messages": [
{"role": "user", "content": "Hello"}
]
}'A 4-bit MLX quantized build of HuggingFaceTB/SmolLM-1.7B-Instruct, optimized for Apple Silicon local inference.
Benchmarks were collected on macOS (M3 Pro).
Performance on iPhone / iPad will vary based on hardware and available memory.
mlx_lm.generate \
--model Irfanuruchi/SmolLM-1.7B-Instruct-MLX-4bit \
--prompt "In 5 sentences, explain the Pomodoro technique and how to start today." \
--max-tokens 140
Upstream SmolLM is released under Apache-2.0. Preserve attribution and the original license terms.
4-bit
Base model
HuggingFaceTB/SmolLM-1.7B