Instructions to use samuelfaj/distill-1.7B-MLX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use samuelfaj/distill-1.7B-MLX 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("samuelfaj/distill-1.7B-MLX") 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
- LM Studio
- Pi new
How to use samuelfaj/distill-1.7B-MLX with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "samuelfaj/distill-1.7B-MLX"
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "samuelfaj/distill-1.7B-MLX" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use samuelfaj/distill-1.7B-MLX with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "samuelfaj/distill-1.7B-MLX"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default samuelfaj/distill-1.7B-MLX
Run Hermes
hermes
- MLX LM
How to use samuelfaj/distill-1.7B-MLX with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "samuelfaj/distill-1.7B-MLX"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "samuelfaj/distill-1.7B-MLX" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "samuelfaj/distill-1.7B-MLX", "messages": [ {"role": "user", "content": "Hello"} ] }'
distill-1.7B — Expert Language Model for CLI Output
distill-1.7B is a domain-specific Expert Language Model — not a general-purpose chatbot. It does exactly one thing: compress and classify raw terminal output into structured, actionable summaries.
Built for the distill engine — an open-source CLI output compression tool.
What is distill?
distill is a tool that takes arbitrary command-line output and reduces it to only what matters. Instead of scrolling through 500 lines of npm install logs, you get:
PASS
24 packages installed, 0 vulnerabilities
Instead of parsing a wall of Terraform plan output, you get:
{"create": 3, "change": 12, "destroy": 0}
distill-1.7B is the brain behind distill — it's the model that understands CLI output and knows what's signal vs noise.
Why "Expert Language Model"?
Unlike general-purpose LLMs (ChatGPT, Claude, etc.) that can talk about anything, distill-1.7B is:
| Trait | General LLM | distill-1.7B |
|---|---|---|
| Scope | Any topic | CLI output only |
| Size | 70-400B params | 1.7B params |
| Training data | Web crawl (trillions of tokens) | 100k synthetic CLI outputs |
| Strengths | Conversation, reasoning, code | CLI compression, classification |
| Weaknesses | — | Can't chat, can't code, can't reason |
It's an expert in the same way a radiologist is an expert — highly skilled in one narrow domain, not trying to be a general practitioner.
8 Specialized Tasks
| Task | What it does | Example output |
|---|---|---|
pass_fail |
Did the command succeed or fail? | PASS / FAIL Error: ... |
safe_review |
Is this Terraform plan safe? | SAFE / UNSAFE / REVIEW |
terraform_plan |
Count resources created/changed/destroyed | {"create":3,"change":12,"destroy":0} |
json_extraction |
Pull JSON from noisy logs | [{"name":"app","version":"2.1.0"}] |
security_audit |
Count vulns by severity | [{"severity":"high","count":2}] |
test_result |
Test suite pass/fail? | PASS\n4 passed, 0 failed |
typescript_check |
Extract TS compiler errors | error TS2741: Property 'x' is missing |
generic |
Free-form summary of any CLI output | 24 packages installed |
Performance
| Metric | Value |
|---|---|
| Overall accuracy | 95% |
| Tasks at 100% | 6 of 8 |
| Base model | Qwen3-1.7B |
| Training | LoRA rank 32, 4000 iterations |
| Dataset | 100k synthetic CLI outputs |
| Training hardware | Apple M4 Max, 128 GB RAM |
Available Formats
| Repo | Format | Size | Platform |
|---|---|---|---|
| distill-1.7B-MLX | MLX fp16 | 3.2 GB | macOS (Apple Silicon) |
| distill-1.7B-4bit-MLX | MLX 4-bit | 1.0 GB | macOS (Apple Silicon) |
| distill-1.7B-GGUF | GGUF fp16 | 4.1 GB | Cross-platform |
| distill-1.7B-4bit-GGUF | GGUF Q4_K_M | 1.2 GB | Cross-platform |
All formats achieve identical 95% accuracy — pick based on your platform and size preference.
Usage
from mlx_lm import load, generate
model, tokenizer = load("samuelfaj/distill-1.7B-MLX")
messages = [
{"role": "system", "content": "You are distill. Compress CLI output concisely."},
{"role": "user", "content": "Command output:\nnpm test\n4 tests passed, 0 failed"}
]
prompt = tokenizer.apply_chat_template(messages, add_generation_prompt=True, tokenize=False)
result = generate(model, tokenizer, prompt=prompt, max_tokens=256)
print(result)
Project
This model powers distill — a CLI output compression engine. The training code and dataset generation pipeline are available in the repository.
- Downloads last month
- 47
Quantized