bots-garden/mini-mepublic Fork
⑂ v1.0.5
Commits
⬇ Clone ▾
git clone https://git.rickub.com/bots-garden/mini-me.git
git clone ssh://git@rickub.com/bots-garden/mini-me.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Download ZIP
🛟 Updated. a8d612a · on v1.0.5 · k33g · 27d ago
README.en.md · 82 lines · 3.8 KBmarkdown
Blame HistoryOpen raw

Coding helpers, with the unloadModels option

Version française

The same team as demos/coding-helpers — a coordinator that hands Go and Rust questions to a specialist — with one difference: the two models are never in the server's memory together, and no hook is needed for it. Each mmConfigs entry sets unloadModels: true (ticket 161).

Agent File Model Role
🧭 coordinator agent.yaml MiniCPM5 2B (hf.co/openbmb/MiniCPM5-2B-GGUF:Q4_K_M, 1.6 GB) picks go or rust, sends the question with the conversation
🐹 go agent.go.yaml Mellum2 12B A2.5B thinking (huggingface.co/jetbrains/mellum2-12b-a2.5b-thinking-gguf-q4_k_m:Q4_K_M, 8.1 GB) documents Go
🦀 rust agent.rust.yaml the same Mellum2 model documents Rust

The two specialists are copies of those of demos/coding-helpers. Only agent.yaml differs: unloadModels: true on both entries, and no hooks: block.

Editable source: coding-helpers-unload-option-flow.drawio (draw.io); coding-helpers-unload-option-flow.svg is the same picture.

Run

llmman pull hf.co/openbmb/MiniCPM5-2B-GGUF:Q4_K_M
llmman pull huggingface.co/jetbrains/mellum2-12b-a2.5b-thinking-gguf-q4_k_m:Q4_K_M
LLMMAN_CONTEXT_LENGTH=32768 llmman serve

cd demos/coding-helpers-unload-option
mm                 # reads ./agent.yaml

Watch the server in another terminal: llmman ps (or curl -s :17434/api/ps).

The option

mmConfigs:
  go:
    path: agent.go.yaml
    description: >-
      Go specialist. …
    yolo: true
    unloadModels: true
  rust:
    path: agent.rust.yaml
    description: >-
      Rust specialist. …
    yolo: true
    unloadModels: true

On every hand-off to go or rust — the coordinator's ask_agent, your /ask-go or /ask-rust:

  1. mm unloads the coordinator's model (MiniCPM5) right before the specialist starts;
  2. the specialist loads Mellum2 and answers;
  3. mm unloads Mellum2 once the answer is in, before the coordinator is reloaded to read it.

Each unload is one line:

🗣 ask_agent: rust (llmman/huggingface.co/jetbrains/mellum2-12b-a2.5b-thinking-gguf-q4_k_m:Q4_K_M) — …
🧹 unloaded hf.co/openbmb/MiniCPM5-2B-GGUF:Q4_K_M
…the specialist's answer…
🧹 unloaded huggingface.co/jetbrains/mellum2-12b-a2.5b-thinking-gguf-q4_k_m:Q4_K_M

The price: Mellum2 is reloaded on every question, even two in a row to the same specialist. Without the option, it stays loaded beside the coordinator.

Measured results

On 2026-10-25, llmman on the host, mm -config agent.yaml -p "…", /api/ps sampled twice a second:

Question Sent to Loaded, in order Time
"explique-moi ce qu'est le pattern matching en Rust, avec un exemple" rust ✅ MiniCPM5 → nothing → Mellum2 → nothing → MiniCPM5 31 s
"how do I read a file line by line in Go?" go ✅ MiniCPM5 → nothing → Mellum2 → nothing → MiniCPM5 79 s

The two models were never listed together.

Hooks or option?

demos/coding-helpers gets the same result with a preAsk and a postAsk hook (hooks/unload.js). The option needs no script, no Node.js, and works for any provider mm can unload with (llmman, Ollama, llama-server in router mode); each model is unloaded on its own agent's server. Hooks remain for what the option does not do: unloading another model, or only under a condition.

See How to free a model's memory and the mmConfigs reference.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Coding helpers, with the `unloadModels` option

*[Version française](README.fr.md)*

The same team as [`demos/coding-helpers`](../coding-helpers/) — a coordinator that hands Go and Rust questions to a specialist — with one difference: the two models are never in the server's memory together, and no hook is needed for it. Each `mmConfigs` entry sets `unloadModels: true` (ticket 161).

| Agent | File | Model | Role |
|---|---|---|---|
| 🧭 coordinator | `agent.yaml` | MiniCPM5 2B (`hf.co/openbmb/MiniCPM5-2B-GGUF:Q4_K_M`, 1.6 GB) | picks `go` or `rust`, sends the question with the conversation |
| 🐹 go | `agent.go.yaml` | Mellum2 12B A2.5B thinking (`huggingface.co/jetbrains/mellum2-12b-a2.5b-thinking-gguf-q4_k_m:Q4_K_M`, 8.1 GB) | documents Go |
| 🦀 rust | `agent.rust.yaml` | the same Mellum2 model | documents Rust |

The two specialists are copies of those of `demos/coding-helpers`. Only `agent.yaml` differs: `unloadModels: true` on both entries, and no `hooks:` block.

![How unloadModels works: mm unloads the coordinator's model before the specialist starts, then the specialist's model once it has answered, so the two models are never loaded together](coding-helpers-unload-option-flow.svg)

Editable source: `coding-helpers-unload-option-flow.drawio` (draw.io); `coding-helpers-unload-option-flow.svg` is the same picture.

## Run

```bash
llmman pull hf.co/openbmb/MiniCPM5-2B-GGUF:Q4_K_M
llmman pull huggingface.co/jetbrains/mellum2-12b-a2.5b-thinking-gguf-q4_k_m:Q4_K_M
LLMMAN_CONTEXT_LENGTH=32768 llmman serve

cd demos/coding-helpers-unload-option
mm                 # reads ./agent.yaml
```

Watch the server in another terminal: `llmman ps` (or `curl -s :17434/api/ps`).

## The option

```yaml
mmConfigs:
  go:
    path: agent.go.yaml
    description: >-
      Go specialist. …
    yolo: true
    unloadModels: true
  rust:
    path: agent.rust.yaml
    description: >-
      Rust specialist. …
    yolo: true
    unloadModels: true
```

On every hand-off to `go` or `rust` — the coordinator's `ask_agent`, your `/ask-go` or `/ask-rust`:

1. mm unloads the coordinator's model (MiniCPM5) right before the specialist starts;
2. the specialist loads Mellum2 and answers;
3. mm unloads Mellum2 once the answer is in, before the coordinator is reloaded to read it.

Each unload is one line:

```text
🗣 ask_agent: rust (llmman/huggingface.co/jetbrains/mellum2-12b-a2.5b-thinking-gguf-q4_k_m:Q4_K_M) — …
🧹 unloaded hf.co/openbmb/MiniCPM5-2B-GGUF:Q4_K_M
…the specialist's answer…
🧹 unloaded huggingface.co/jetbrains/mellum2-12b-a2.5b-thinking-gguf-q4_k_m:Q4_K_M
```

The price: Mellum2 is reloaded on every question, even two in a row to the same specialist. Without the option, it stays loaded beside the coordinator.

## Measured results

On 2026-10-25, llmman on the host, `mm -config agent.yaml -p "…"`, `/api/ps` sampled twice a second:

| Question | Sent to | Loaded, in order | Time |
|---|---|---|---|
| "explique-moi ce qu'est le pattern matching en Rust, avec un exemple" | rust ✅ | MiniCPM5 → nothing → Mellum2 → nothing → MiniCPM5 | 31 s |
| "how do I read a file line by line in Go?" | go ✅ | MiniCPM5 → nothing → Mellum2 → nothing → MiniCPM5 | 79 s |

The two models were never listed together.

## Hooks or option?

`demos/coding-helpers` gets the same result with a `preAsk` and a `postAsk` hook (`hooks/unload.js`). The option needs no script, no Node.js, and works for any provider mm can unload with (llmman, Ollama, llama-server in router mode); each model is unloaded on its own agent's server. Hooks remain for what the option does not do: unloading another model, or only under a condition.

See [How to free a model's memory](../../docs/en/how-to/unload-a-model.md) and the [`mmConfigs` reference](../../docs/en/reference/configuration.md).