Text Generation
MLX
Safetensors
English
qwen3
distill
cli
code
compression
qwen
expert-model
domain-specific
task-specialized
conversational
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"} ] }'
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -9,29 +9,62 @@ tags:
|
|
| 9 |
- code
|
| 10 |
- compression
|
| 11 |
- qwen
|
| 12 |
-
-
|
|
|
|
|
|
|
| 13 |
pipeline_tag: text-generation
|
| 14 |
base_model: Qwen/Qwen3-1.7B
|
| 15 |
---
|
| 16 |
|
| 17 |
-
# distill-1.7B
|
| 18 |
|
| 19 |
-
|
| 20 |
|
| 21 |
-
**distill
|
| 22 |
|
| 23 |
-
##
|
| 24 |
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
|
| 36 |
## Performance
|
| 37 |
|
|
@@ -40,8 +73,20 @@ Built for **[distill](https://github.com/samuelfaj/distill)** β a CLI output c
|
|
| 40 |
| Overall accuracy | **95%** |
|
| 41 |
| Tasks at 100% | 6 of 8 |
|
| 42 |
| Base model | Qwen3-1.7B |
|
| 43 |
-
|
|
| 44 |
| Dataset | 100k synthetic CLI outputs |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
|
| 46 |
## Usage
|
| 47 |
|
|
@@ -59,16 +104,8 @@ result = generate(model, tokenizer, prompt=prompt, max_tokens=256)
|
|
| 59 |
print(result)
|
| 60 |
```
|
| 61 |
|
| 62 |
-
## Variants
|
| 63 |
-
|
| 64 |
-
| Repo | Format | Size | Platform |
|
| 65 |
-
|------|--------|------|----------|
|
| 66 |
-
| [distill-1.7B-MLX](https://huggingface.co/samuelfaj/distill-1.7B-MLX) | MLX fp16 | 3.2 GB | macOS (Apple Silicon) |
|
| 67 |
-
| [distill-1.7B-GGUF](https://huggingface.co/samuelfaj/distill-1.7B-GGUF) | GGUF | 4.1 GB | Windows / Linux / macOS |
|
| 68 |
-
| distill-1.7B-2bit-MLX | MLX 2-bit | ~500 MB | macOS (Apple Silicon) β *coming soon* |
|
| 69 |
-
|
| 70 |
## Project
|
| 71 |
|
| 72 |
-
This model
|
| 73 |
|
| 74 |
-
|
|
|
|
| 9 |
- code
|
| 10 |
- compression
|
| 11 |
- qwen
|
| 12 |
+
- expert-model
|
| 13 |
+
- domain-specific
|
| 14 |
+
- task-specialized
|
| 15 |
pipeline_tag: text-generation
|
| 16 |
base_model: Qwen/Qwen3-1.7B
|
| 17 |
---
|
| 18 |
|
| 19 |
+
# distill-1.7B β Expert Language Model for CLI Output
|
| 20 |
|
| 21 |
+
**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.
|
| 22 |
|
| 23 |
+
Built for the **[distill](https://github.com/samuelfaj/distill)** engine β an open-source CLI output compression tool.
|
| 24 |
|
| 25 |
+
## What is distill?
|
| 26 |
|
| 27 |
+
[distill](https://github.com/samuelfaj/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:
|
| 28 |
+
|
| 29 |
+
```
|
| 30 |
+
PASS
|
| 31 |
+
24 packages installed, 0 vulnerabilities
|
| 32 |
+
```
|
| 33 |
+
|
| 34 |
+
Instead of parsing a wall of Terraform plan output, you get:
|
| 35 |
+
|
| 36 |
+
```json
|
| 37 |
+
{"create": 3, "change": 12, "destroy": 0}
|
| 38 |
+
```
|
| 39 |
+
|
| 40 |
+
**distill-1.7B is the brain behind distill** β it's the model that understands CLI output and knows what's signal vs noise.
|
| 41 |
+
|
| 42 |
+
## Why "Expert Language Model"?
|
| 43 |
+
|
| 44 |
+
Unlike general-purpose LLMs (ChatGPT, Claude, etc.) that can talk about anything, distill-1.7B is:
|
| 45 |
+
|
| 46 |
+
| Trait | General LLM | distill-1.7B |
|
| 47 |
+
|-------|-------------|--------------|
|
| 48 |
+
| **Scope** | Any topic | CLI output only |
|
| 49 |
+
| **Size** | 70-400B params | 1.7B params |
|
| 50 |
+
| **Training data** | Web crawl (trillions of tokens) | 100k synthetic CLI outputs |
|
| 51 |
+
| **Strengths** | Conversation, reasoning, code | CLI compression, classification |
|
| 52 |
+
| **Weaknesses** | β | Can't chat, can't code, can't reason |
|
| 53 |
+
|
| 54 |
+
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.
|
| 55 |
+
|
| 56 |
+
## 8 Specialized Tasks
|
| 57 |
+
|
| 58 |
+
| Task | What it does | Example output |
|
| 59 |
+
|------|-------------|----------------|
|
| 60 |
+
| `pass_fail` | Did the command succeed or fail? | `PASS` / `FAIL Error: ...` |
|
| 61 |
+
| `safe_review` | Is this Terraform plan safe? | `SAFE` / `UNSAFE` / `REVIEW` |
|
| 62 |
+
| `terraform_plan` | Count resources created/changed/destroyed | `{"create":3,"change":12,"destroy":0}` |
|
| 63 |
+
| `json_extraction` | Pull JSON from noisy logs | `[{"name":"app","version":"2.1.0"}]` |
|
| 64 |
+
| `security_audit` | Count vulns by severity | `[{"severity":"high","count":2}]` |
|
| 65 |
+
| `test_result` | Test suite pass/fail? | `PASS\n4 passed, 0 failed` |
|
| 66 |
+
| `typescript_check` | Extract TS compiler errors | `error TS2741: Property 'x' is missing` |
|
| 67 |
+
| `generic` | Free-form summary of any CLI output | `24 packages installed` |
|
| 68 |
|
| 69 |
## Performance
|
| 70 |
|
|
|
|
| 73 |
| Overall accuracy | **95%** |
|
| 74 |
| Tasks at 100% | 6 of 8 |
|
| 75 |
| Base model | Qwen3-1.7B |
|
| 76 |
+
| Training | LoRA rank 32, 4000 iterations |
|
| 77 |
| Dataset | 100k synthetic CLI outputs |
|
| 78 |
+
| Training hardware | Apple M4 Max, 128 GB RAM |
|
| 79 |
+
|
| 80 |
+
## Available Formats
|
| 81 |
+
|
| 82 |
+
| Repo | Format | Size | Platform |
|
| 83 |
+
|------|--------|------|----------|
|
| 84 |
+
| **distill-1.7B-MLX** | MLX fp16 | 3.2 GB | macOS (Apple Silicon) |
|
| 85 |
+
| [distill-1.7B-4bit-MLX](https://huggingface.co/samuelfaj/distill-1.7B-4bit-MLX) | MLX 4-bit | 1.0 GB | macOS (Apple Silicon) |
|
| 86 |
+
| [distill-1.7B-GGUF](https://huggingface.co/samuelfaj/distill-1.7B-GGUF) | GGUF fp16 | 4.1 GB | Cross-platform |
|
| 87 |
+
| [distill-1.7B-4bit-GGUF](https://huggingface.co/samuelfaj/distill-1.7B-4bit-GGUF) | GGUF Q4_K_M | 1.2 GB | Cross-platform |
|
| 88 |
+
|
| 89 |
+
All formats achieve **identical 95% accuracy** β pick based on your platform and size preference.
|
| 90 |
|
| 91 |
## Usage
|
| 92 |
|
|
|
|
| 104 |
print(result)
|
| 105 |
```
|
| 106 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 107 |
## Project
|
| 108 |
|
| 109 |
+
This model powers [distill](https://github.com/samuelfaj/distill) β a CLI output compression engine. The training code and dataset generation pipeline are available in the repository.
|
| 110 |
|
| 111 |
+
[Full Distill Collection](https://huggingface.co/collections/samuelfaj/distill-6a0606f9b131c289025659fc)
|