**🔥🔥🔥 Save much more tokens with our client: https://remotecode.io/**

----

# distill

Agent command outputs are one of the biggest sources of token waste.

Logs, test results, stack traces… thousands of tokens sent to an LLM just to answer a simple question.

**🔥 `distill` compresses command outputs into only what the LLM actually needs.**

Save **up to 99% of tokens** without losing the signal.

## How to use

Install:

```bash
npm i -g @samuelfaj/distill
```

Run onboarding:

```bash
distill
```

And that's it!

## Our Model

Distill uses it's own **Expert Language Model** 

https://huggingface.co/samuelfaj/distill-1.7B-MLX

**Only: 1.7B - 4bit**

Safe recommendation: machine should have 8 GB+ RAM; 16 GB+ is comfortable.

## Example

```sh
rg -n "terminal|PERMISSION|permission|Permissions|Plan|full access|default" desktop --glob '!**/node_modules/**' | distill "find where terminal and permission UI are implemented in chat screen"
```

- **Before:** [7648 tokens 30592 characters 10218 words](./examples/1/BEFORE.md)
- **After:** [99 tokens 396 characters 57 words](./examples/1/AFTER.md)
- **🔥 Saved ~98.7% tokens**

## Distill Language

We also teach your LLM to talk and think a more efficient way.

![Distill Language](https://github.com/samuelfaj/distill/blob/main/examples/distill-language.png?raw=true)
