bots-garden/mini-mepublic Fork
⑂ 40a9cf1
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.

k33g committed 2026-11-28T06:23:22+01:00 Browse files
40a9cf1 parent: 0c90008
modified demos/decision-chat/README.en.md +14 -4
@@ -2,7 +2,7 @@
22
33 *[Version française](README.fr.md)*
44
5-A chat agent (Qwen3.5-4B on llmman, a git helper with no tools) and a decider (LiquidAI d1-3B, `agent.decider.yaml`). Before each question reaches the chat model, a `preGeneration` hook, `hooks/ask-decider.js`, sends it to the decider and adds its answers under the question. The chat model's system prompt says what to do with them: here, adapt the answer to the person asking.
5+A chat agent (Qwen3.5-4B on llama.cpp (`provider: llamacpp`), a git helper with no tools) and a decider (LiquidAI d1-3B, `agent.decider.yaml`). Before each question reaches the chat model, a `preGeneration` hook, `hooks/ask-decider.js`, sends it to the decider and adds its answers under the question. The chat model's system prompt says what to do with them: here, adapt the answer to the person asking.
66
77 ![The decision-chat flow: the question goes to a preGeneration hook, which asks the decider and passes its answers to the chat model](decision-chat-flow.svg)
88
@@ -25,13 +25,21 @@ upset: no (0.03)
2525
2626 ## Run it
2727
28-Pull the models into llmman once:
28+Both models are served by the same llama-server, in router mode (started without `-m`), on its default port 9931. A preset file names them; a model missing from the Hugging Face cache is downloaded on its first load:
2929
3030 ```bash
31-llmman pull hf.co/LiquidAI/d1-3B-GGUF:Q4_K_M
32-llmman pull hf.co/unsloth/Qwen3.5-4B-GGUF:Q4_K_M
31+cat > models.ini <<'EOF'
32+[LiquidAI/d1-3B-GGUF:Q4_K_M]
33+hf-repo = LiquidAI/d1-3B-GGUF:Q4_K_M
34+
35+[unsloth/Qwen3.5-4B-GGUF:Q4_K_M]
36+hf-repo = unsloth/Qwen3.5-4B-GGUF:Q4_K_M
37+EOF
38+llama-server --host 127.0.0.1 --port 9931 --models-preset models.ini
3339 ```
3440
41+`llamacpp.autoStart` is not enough here: the server mm starts lists the agent's model only, not the decider's. mm also does not pull a model for llama-server (`autoPull` only warns): the first question that uses a model waits for its download.
42+
3543 Then, from this directory:
3644
3745 ```bash
@@ -54,6 +62,8 @@ Some ideas with the same three files: the language to answer in (choice), a ques
5462
5563 ## What was measured (2026-10-24, from the sandbox, llmman on the host)
5664
65+These figures date from when the demo ran on llmman (`hf.co/…` model names, port 17434). They have not been measured again on llama-server.
66+
5767 The decider on four questions:
5868
5969 | Question | level | hurry | upset |
@@ -2,7 +2,7 @@
2 2
3 *[Version française](README.fr.md)*3 *[Version française](README.fr.md)*
4 4
5-A chat agent (Qwen3.5-4B on llmman, a git helper with no tools) and a decider (LiquidAI d1-3B, `agent.decider.yaml`). Before each question reaches the chat model, a `preGeneration` hook, `hooks/ask-decider.js`, sends it to the decider and adds its answers under the question. The chat model's system prompt says what to do with them: here, adapt the answer to the person asking.5+A chat agent (Qwen3.5-4B on llama.cpp (`provider: llamacpp`), a git helper with no tools) and a decider (LiquidAI d1-3B, `agent.decider.yaml`). Before each question reaches the chat model, a `preGeneration` hook, `hooks/ask-decider.js`, sends it to the decider and adds its answers under the question. The chat model's system prompt says what to do with them: here, adapt the answer to the person asking.
6 6
7 ![The decision-chat flow: the question goes to a preGeneration hook, which asks the decider and passes its answers to the chat model](decision-chat-flow.svg)7 ![The decision-chat flow: the question goes to a preGeneration hook, which asks the decider and passes its answers to the chat model](decision-chat-flow.svg)
8 8
@@ -25,13 +25,21 @@ upset: no (0.03)
25 25
26 ## Run it26 ## Run it
27 27
28-Pull the models into llmman once:28+Both models are served by the same llama-server, in router mode (started without `-m`), on its default port 9931. A preset file names them; a model missing from the Hugging Face cache is downloaded on its first load:
29 29
30 ```bash30 ```bash
31-llmman pull hf.co/LiquidAI/d1-3B-GGUF:Q4_K_M31+cat > models.ini <<'EOF'
32-llmman pull hf.co/unsloth/Qwen3.5-4B-GGUF:Q4_K_M32+[LiquidAI/d1-3B-GGUF:Q4_K_M]
33+hf-repo = LiquidAI/d1-3B-GGUF:Q4_K_M
34+
35+[unsloth/Qwen3.5-4B-GGUF:Q4_K_M]
36+hf-repo = unsloth/Qwen3.5-4B-GGUF:Q4_K_M
37+EOF
38+llama-server --host 127.0.0.1 --port 9931 --models-preset models.ini
33 ```39 ```
34 40
41+`llamacpp.autoStart` is not enough here: the server mm starts lists the agent's model only, not the decider's. mm also does not pull a model for llama-server (`autoPull` only warns): the first question that uses a model waits for its download.
42+
35 Then, from this directory:43 Then, from this directory:
36 44
37 ```bash45 ```bash
@@ -54,6 +62,8 @@ Some ideas with the same three files: the language to answer in (choice), a ques
54 62
55 ## What was measured (2026-10-24, from the sandbox, llmman on the host)63 ## What was measured (2026-10-24, from the sandbox, llmman on the host)
56 64
65+These figures date from when the demo ran on llmman (`hf.co/…` model names, port 17434). They have not been measured again on llama-server.
66+
57 The decider on four questions:67 The decider on four questions:
58 68
59 | Question | level | hurry | upset |69 | Question | level | hurry | upset |
modified demos/decision-chat/README.fr.md +14 -4
@@ -2,7 +2,7 @@
22
33 *[English version](README.en.md)*
44
5-Un agent de chat (Qwen3.5-4B sur llmman, un assistant git sans outils) et un décideur (LiquidAI d1-3B, `agent.decider.yaml`). Avant que chaque question n'arrive au modèle de chat, un hook `preGeneration`, `hooks/ask-decider.js`, l'envoie au décideur et ajoute ses réponses sous la question. Le prompt système du modèle de chat dit quoi en faire : ici, adapter la réponse à la personne qui demande.
5+Un agent de chat (Qwen3.5-4B sur llama.cpp (`provider: llamacpp`), un assistant git sans outils) et un décideur (LiquidAI d1-3B, `agent.decider.yaml`). Avant que chaque question n'arrive au modèle de chat, un hook `preGeneration`, `hooks/ask-decider.js`, l'envoie au décideur et ajoute ses réponses sous la question. Le prompt système du modèle de chat dit quoi en faire : ici, adapter la réponse à la personne qui demande.
66
77 ![Le flux de decision-chat : la question passe par un hook preGeneration, qui interroge le décideur et transmet ses réponses au modèle de chat](decision-chat-flow.svg)
88
@@ -25,13 +25,21 @@ upset: no (0.03)
2525
2626 ## La lancer
2727
28-Téléchargez les modèles dans llmman une fois :
28+Les deux modèles sont servis par le même llama-server, en mode router (lancé sans `-m`), sur son port par défaut 9931. Un fichier de preset les nomme ; un modèle absent du cache Hugging Face est téléchargé à son premier chargement :
2929
3030 ```bash
31-llmman pull hf.co/LiquidAI/d1-3B-GGUF:Q4_K_M
32-llmman pull hf.co/unsloth/Qwen3.5-4B-GGUF:Q4_K_M
31+cat > models.ini <<'EOF'
32+[LiquidAI/d1-3B-GGUF:Q4_K_M]
33+hf-repo = LiquidAI/d1-3B-GGUF:Q4_K_M
34+
35+[unsloth/Qwen3.5-4B-GGUF:Q4_K_M]
36+hf-repo = unsloth/Qwen3.5-4B-GGUF:Q4_K_M
37+EOF
38+llama-server --host 127.0.0.1 --port 9931 --models-preset models.ini
3339 ```
3440
41+`llamacpp.autoStart` ne suffit pas ici : le serveur que mm démarre ne liste que le modèle de l'agent, pas celui du décideur. mm ne télécharge pas non plus de modèle pour llama-server (`autoPull` se contente d'un avertissement) : la première question qui utilise un modèle attend son téléchargement.
42+
3543 Puis, depuis ce dossier :
3644
3745 ```bash
@@ -54,6 +62,8 @@ Quelques idées avec les trois mêmes fichiers : la langue de la réponse (choic
5462
5563 ## Ce qui a été mesuré (2026-10-24, depuis le sandbox, llmman sur l'hôte)
5664
65+Ces chiffres datent de l'époque où la démo tournait sur llmman (noms de modèles `hf.co/…`, port 17434). Ils n'ont pas été mesurés à nouveau sur llama-server.
66+
5767 Le décideur sur quatre questions :
5868
5969 | Question | level | hurry | upset |
@@ -2,7 +2,7 @@
2 2
3 *[English version](README.en.md)*3 *[English version](README.en.md)*
4 4
5-Un agent de chat (Qwen3.5-4B sur llmman, un assistant git sans outils) et un décideur (LiquidAI d1-3B, `agent.decider.yaml`). Avant que chaque question n'arrive au modèle de chat, un hook `preGeneration`, `hooks/ask-decider.js`, l'envoie au décideur et ajoute ses réponses sous la question. Le prompt système du modèle de chat dit quoi en faire : ici, adapter la réponse à la personne qui demande.5+Un agent de chat (Qwen3.5-4B sur llama.cpp (`provider: llamacpp`), un assistant git sans outils) et un décideur (LiquidAI d1-3B, `agent.decider.yaml`). Avant que chaque question n'arrive au modèle de chat, un hook `preGeneration`, `hooks/ask-decider.js`, l'envoie au décideur et ajoute ses réponses sous la question. Le prompt système du modèle de chat dit quoi en faire : ici, adapter la réponse à la personne qui demande.
6 6
7 ![Le flux de decision-chat : la question passe par un hook preGeneration, qui interroge le décideur et transmet ses réponses au modèle de chat](decision-chat-flow.svg)7 ![Le flux de decision-chat : la question passe par un hook preGeneration, qui interroge le décideur et transmet ses réponses au modèle de chat](decision-chat-flow.svg)
8 8
@@ -25,13 +25,21 @@ upset: no (0.03)
25 25
26 ## La lancer26 ## La lancer
27 27
28-Téléchargez les modèles dans llmman une fois :28+Les deux modèles sont servis par le même llama-server, en mode router (lancé sans `-m`), sur son port par défaut 9931. Un fichier de preset les nomme ; un modèle absent du cache Hugging Face est téléchargé à son premier chargement :
29 29
30 ```bash30 ```bash
31-llmman pull hf.co/LiquidAI/d1-3B-GGUF:Q4_K_M31+cat > models.ini <<'EOF'
32-llmman pull hf.co/unsloth/Qwen3.5-4B-GGUF:Q4_K_M32+[LiquidAI/d1-3B-GGUF:Q4_K_M]
33+hf-repo = LiquidAI/d1-3B-GGUF:Q4_K_M
34+
35+[unsloth/Qwen3.5-4B-GGUF:Q4_K_M]
36+hf-repo = unsloth/Qwen3.5-4B-GGUF:Q4_K_M
37+EOF
38+llama-server --host 127.0.0.1 --port 9931 --models-preset models.ini
33 ```39 ```
34 40
41+`llamacpp.autoStart` ne suffit pas ici : le serveur que mm démarre ne liste que le modèle de l'agent, pas celui du décideur. mm ne télécharge pas non plus de modèle pour llama-server (`autoPull` se contente d'un avertissement) : la première question qui utilise un modèle attend son téléchargement.
42+
35 Puis, depuis ce dossier :43 Puis, depuis ce dossier :
36 44
37 ```bash45 ```bash
@@ -54,6 +62,8 @@ Quelques idées avec les trois mêmes fichiers : la langue de la réponse (choic
54 62
55 ## Ce qui a été mesuré (2026-10-24, depuis le sandbox, llmman sur l'hôte)63 ## Ce qui a été mesuré (2026-10-24, depuis le sandbox, llmman sur l'hôte)
56 64
65+Ces chiffres datent de l'époque où la démo tournait sur llmman (noms de modèles `hf.co/…`, port 17434). Ils n'ont pas été mesurés à nouveau sur llama-server.
66+
57 Le décideur sur quatre questions :67 Le décideur sur quatre questions :
58 68
59 | Question | level | hurry | upset |69 | Question | level | hurry | upset |
modified demos/decision-chat/agent.decider.yaml +7 -5
@@ -8,14 +8,16 @@
88 # chat model, whatever its name and type. Then say in agent.yaml's `system`
99 # what the chat model should do with it.
1010 #
11-# Pull the model once: llmman pull hf.co/LiquidAI/d1-3B-GGUF:Q4_K_M
12-provider: llmman
13-model: hf.co/LiquidAI/d1-3B-GGUF:Q4_K_M
14-baseUrl: http://127.0.0.1:17434/v1
15-fallback: http://host.docker.internal:17434/v1
11+# Served by the same llama-server as agent.yaml, in router mode (README:
12+# "Run it"): its /v1/systemone route answers the decision questions.
13+provider: llamacpp
14+model: LiquidAI/d1-3B-GGUF:Q4_K_M
15+baseUrl: http://127.0.0.1:9931/v1
16+fallback: http://host.docker.internal:9931/v1
1617
1718 decision:
1819 # The first call loads the model (2 to 13 s); a warm one takes 0.2–0.5 s.
20+ display: true
1921 timeout: 60s
2022 questions:
2123 level:
@@ -8,14 +8,16 @@
8 # chat model, whatever its name and type. Then say in agent.yaml's `system`8 # chat model, whatever its name and type. Then say in agent.yaml's `system`
9 # what the chat model should do with it.9 # what the chat model should do with it.
10 #10 #
11-# Pull the model once: llmman pull hf.co/LiquidAI/d1-3B-GGUF:Q4_K_M11+# Served by the same llama-server as agent.yaml, in router mode (README:
12-provider: llmman12+# "Run it"): its /v1/systemone route answers the decision questions.
13-model: hf.co/LiquidAI/d1-3B-GGUF:Q4_K_M13+provider: llamacpp
14-baseUrl: http://127.0.0.1:17434/v114+model: LiquidAI/d1-3B-GGUF:Q4_K_M
15-fallback: http://host.docker.internal:17434/v115+baseUrl: http://127.0.0.1:9931/v1
16+fallback: http://host.docker.internal:9931/v1
16 17
17 decision:18 decision:
18 # The first call loads the model (2 to 13 s); a warm one takes 0.2–0.5 s.19 # The first call loads the model (2 to 13 s); a warm one takes 0.2–0.5 s.
20+ display: true
19 timeout: 60s21 timeout: 60s
20 questions:22 questions:
21 level:23 level:
modified demos/decision-chat/agent.yaml +7 -4
@@ -8,12 +8,15 @@
88 # ▼
99 # question + answers ──► chat model (Qwen3.5-4B) ──► answer
1010 #
11+# llama-server on 127.0.0.1:9931 in router mode, serving both models
12+# (this one and agent.decider.yaml's) — see the README, "Run it".
13+#
1114 # cd demos/decision-chat
1215 # mm tui agent.yaml # or: mm agent.yaml, or mm -config agent.yaml -p "…"
13-provider: llmman
14-model: hf.co/unsloth/Qwen3.5-4B-GGUF:Q4_K_M
15-baseUrl: http://127.0.0.1:17434/v1
16-fallback: http://host.docker.internal:17434/v1
16+provider: llamacpp
17+model: unsloth/Qwen3.5-4B-GGUF:Q4_K_M
18+baseUrl: http://127.0.0.1:9931/v1
19+fallback: http://host.docker.internal:9931/v1
1720
1821 system: |
1922 You are a git helper. You answer questions about git; you have no tools.
@@ -8,12 +8,15 @@
8 # ▼8 # ▼
9 # question + answers ──► chat model (Qwen3.5-4B) ──► answer9 # question + answers ──► chat model (Qwen3.5-4B) ──► answer
10 #10 #
11+# llama-server on 127.0.0.1:9931 in router mode, serving both models
12+# (this one and agent.decider.yaml's) — see the README, "Run it".
13+#
11 # cd demos/decision-chat14 # cd demos/decision-chat
12 # mm tui agent.yaml # or: mm agent.yaml, or mm -config agent.yaml -p "…"15 # mm tui agent.yaml # or: mm agent.yaml, or mm -config agent.yaml -p "…"
13-provider: llmman16+provider: llamacpp
14-model: hf.co/unsloth/Qwen3.5-4B-GGUF:Q4_K_M17+model: unsloth/Qwen3.5-4B-GGUF:Q4_K_M
15-baseUrl: http://127.0.0.1:17434/v118+baseUrl: http://127.0.0.1:9931/v1
16-fallback: http://host.docker.internal:17434/v119+fallback: http://host.docker.internal:9931/v1
17 20
18 system: |21 system: |
19 You are a git helper. You answer questions about git; you have no tools.22 You are a git helper. You answer questions about git; you have no tools.