🛟 Updated.
40a9cf1 parent: 0c90008 modified
demos/decision-chat/README.en.md +14 -4 | @@ -2,7 +2,7 @@ | ||
| 2 | 2 | |
| 3 | 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 | 7 |  |
| 8 | 8 | |
| @@ -25,13 +25,21 @@ upset: no (0.03) | ||
| 25 | 25 | |
| 26 | 26 | ## 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 | 30 | ```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 | |
| 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 | 43 | Then, from this directory: |
| 36 | 44 | |
| 37 | 45 | ```bash |
| @@ -54,6 +62,8 @@ Some ideas with the same three files: the language to answer in (choice), a ques | ||
| 54 | 62 | |
| 55 | 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 | 67 | The decider on four questions: |
| 58 | 68 | |
| 59 | 69 | | 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 |  | 7 |  |
| 8 | 8 | ||
| @@ -25,13 +25,21 @@ upset: no (0.03) | |||
| 25 | 25 | ||
| 26 | ## Run it | 26 | ## 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 | ```bash | 30 | ```bash |
| 31 | -llmman pull hf.co/LiquidAI/d1-3B-GGUF:Q4_K_M | 31 | +cat > models.ini <<'EOF' |
| 32 | -llmman pull hf.co/unsloth/Qwen3.5-4B-GGUF:Q4_K_M | 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 | ||
| 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 | ```bash | 45 | ```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 @@ | ||
| 2 | 2 | |
| 3 | 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 | 7 |  |
| 8 | 8 | |
| @@ -25,13 +25,21 @@ upset: no (0.03) | ||
| 25 | 25 | |
| 26 | 26 | ## 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 | 30 | ```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 | |
| 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 | 43 | Puis, depuis ce dossier : |
| 36 | 44 | |
| 37 | 45 | ```bash |
| @@ -54,6 +62,8 @@ Quelques idées avec les trois mêmes fichiers : la langue de la réponse (choic | ||
| 54 | 62 | |
| 55 | 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 | 67 | Le décideur sur quatre questions : |
| 58 | 68 | |
| 59 | 69 | | 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 |  | 7 |  |
| 8 | 8 | ||
| @@ -25,13 +25,21 @@ upset: no (0.03) | |||
| 25 | 25 | ||
| 26 | ## La lancer | 26 | ## 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 | ```bash | 30 | ```bash |
| 31 | -llmman pull hf.co/LiquidAI/d1-3B-GGUF:Q4_K_M | 31 | +cat > models.ini <<'EOF' |
| 32 | -llmman pull hf.co/unsloth/Qwen3.5-4B-GGUF:Q4_K_M | 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 | ||
| 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 | ```bash | 45 | ```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 @@ | ||
| 8 | 8 | # chat model, whatever its name and type. Then say in agent.yaml's `system` |
| 9 | 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_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 | |
| 16 | 17 | |
| 17 | 18 | decision: |
| 18 | 19 | # The first call loads the model (2 to 13 s); a warm one takes 0.2–0.5 s. |
| 20 | + display: true | |
| 19 | 21 | timeout: 60s |
| 20 | 22 | questions: |
| 21 | 23 | 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_M | 11 | +# Served by the same llama-server as agent.yaml, in router mode (README: |
| 12 | -provider: llmman | 12 | +# "Run it"): its /v1/systemone route answers the decision questions. |
| 13 | -model: hf.co/LiquidAI/d1-3B-GGUF:Q4_K_M | 13 | +provider: llamacpp |
| 14 | -baseUrl: http://127.0.0.1:17434/v1 | 14 | +model: LiquidAI/d1-3B-GGUF:Q4_K_M |
| 15 | -fallback: http://host.docker.internal:17434/v1 | 15 | +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: 60s | 21 | timeout: 60s |
| 20 | questions: | 22 | questions: |
| 21 | level: | 23 | level: |
modified
demos/decision-chat/agent.yaml +7 -4 | @@ -8,12 +8,15 @@ | ||
| 8 | 8 | # ▼ |
| 9 | 9 | # 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 | 14 | # cd demos/decision-chat |
| 12 | 15 | # 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 | |
| 17 | 20 | |
| 18 | 21 | system: | |
| 19 | 22 | 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) ──► answer | 9 | # 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-chat | 14 | # 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: llmman | 16 | +provider: llamacpp |
| 14 | -model: hf.co/unsloth/Qwen3.5-4B-GGUF:Q4_K_M | 17 | +model: unsloth/Qwen3.5-4B-GGUF:Q4_K_M |
| 15 | -baseUrl: http://127.0.0.1:17434/v1 | 18 | +baseUrl: http://127.0.0.1:9931/v1 |
| 16 | -fallback: http://host.docker.internal:17434/v1 | 19 | +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. |