OpenBao CLI assistant: Qwen3.5-4B fine-tune (GGUF)
A Qwen3.5-4B fine-tuned to answer questions about the
OpenBao command-line interface (bao), in English and Brazilian
Portuguese. At 2.8 GB it runs locally with llama.cpp (tested on an 8 GB RTX 4060).
Unofficial model, not affiliated with or endorsed by the OpenBao project. It can still invent commands and flags (see Limitations). Check commands against the official documentation before running them.
Files
| File | Size | What it is |
|---|---|---|
openbao-qwen3.5-4b-Q4_K_M.gguf | 2.78 GB | The model: LoRA merged into the base in 16-bit, then quantized to Q4_K_M |
mmproj-BF16.gguf | 0.68 GB | Vision projector of the base model, unchanged. Optional: training was text only |
Quick start (llama.cpp)
llama-server -hf felicepedrof/openbao-qwen3.5-4b-GGUF:Q4_K_M --no-mmproj -ngl 99 -c 8192 --temp 0.2 --repeat-penalty 1.05 --chat-template-kwargs '{"enable_thinking":false}'
Then call the OpenAI-compatible API (default port 8080) with the system prompt below:
from openai import OpenAI
client = OpenAI(base_url="http://localhost:8080/v1", api_key="none")
SYSTEM = ("You are an expert assistant on OpenBao, the open-source secrets management system, "
"and its `bao` command-line interface. Answer accurately and concisely, grounded in the "
"official OpenBao documentation.")
reply = client.chat.completions.create(
model="openbao",
messages=[{"role": "system", "content": SYSTEM},
{"role": "user", "content": "How do I recover a KV v2 secret I deleted by mistake?"}],
temperature=0.2,
)
print(reply.choices[0].message.content)
Settings that matter
-
Thinking off. Every training answer starts with an empty
<think>block, so the model learned to answer without reasoning. The embedded chat template turns thinking on unlessenable_thinkingisfalse; set it in your runtime (llama.cpp:--chat-template-kwargs). -
Use the training system prompt, in the language of the question. Without it, answers get noticeably worse. English: the
SYSTEMstring above. Portuguese:Você é um assistente especialista em OpenBao, o sistema open source de gerenciamento de segredos, e na sua interface de linha de comando `bao`. Responda em português do Brasil, de forma precisa e objetiva, com base na documentação oficial do OpenBao. -
Low temperature (0.1 to 0.3). At 0.7, 29% of answers (on a 30-question sample) used an invented command or flag, against 10% at 0.1.
-
Light repetition penalty (1.05). One answer looped at temperature 0.1 without it.
Only llama.cpp (llama-server) was tested. Other GGUF runtimes should work if they let you
disable thinking.
Training
| Base model | unsloth/Qwen3.5-4B (loaded in 4-bit) |
| Method | QLoRA with Unsloth Studio, completions only (system prompt and question masked) |
| Data | felicepedrof/openbao-cli-instruct v2 (commit c4dee60), config chat: 7,216 train / 134 validation, EN + PT-BR |
| LoRA | rank 32, alpha 32, dropout 0, all linear layers |
| Epochs / steps | 3 / 2,706 (batch 2 × gradient accumulation 4 = 8) |
| Learning rate | 2e-4, linear schedule, 80 warmup steps, AdamW 8-bit, weight decay 0.001 |
| Context length | 2,048 tokens, no packing |
| Seed | 3407 |
| Hardware / time | 1 × RTX 4060 8 GB, 124 min |
| Validation loss | best 0.748 (epoch 1.8), final 0.843 |
The final checkpoint was kept even though validation loss is lowest at epoch 1.8: in an earlier run with the same hyperparameters on dataset v1, the final model generated better answers than the lower-loss checkpoint.
Evaluation
Automatic evaluation on the 134 held-out validation questions (temperature 0.1), with
the same prompts for all models. Invented means the answer uses a bao command, subcommand or
flag that does not exist in the OpenBao CLI source code; it is the main metric. ROUGE-L and
reference coverage are measured against the dataset's reference answers.
| Metric | Qwen3-4B-Instruct-2507 + LoRA (dataset v1) | Qwen3.5-4B + LoRA (dataset v1) | This model (Qwen3.5-4B, dataset v2) |
|---|---|---|---|
| Answers with an invented command/flag, all 134 | 23% | 14% | 10% |
| ... doc-style questions (82) | 6% | 4% | 0% |
| ... open scenarios: how-to, workflow, troubleshooting... (52) | 50% | 31% | 27% |
| ROUGE-L | 0.46 | 0.49 | 0.54 |
| Reference commands used | 72% | 74% | 77% |
| Reference flags used | 54% | 63% | 74% |
| Invented, 30 questions × 3 seeds at temperature 0.7 | 40% | 28% | 29% |
All three are Q4_K_M GGUFs. A Q8_0 export of the v1 model scored the same as its Q4_K_M (14%), so
the quantization is not the bottleneck. Without fine-tuning, the base Qwen3-4B didn't know
OpenBao: in a manual test it answered a bao kv list question about a different product. The base
Qwen3.5-4B was not evaluated.
Limitations
- It still invents in open questions. About 1 in 4 answers to "how do I..." or multi-step
questions it hasn't seen uses something that does not exist. The invented names are plausible:
server configuration options used as
operator initflags (-storage,-raft-path), API operations used as subcommands (token patch,policy patch) and commands such asbao wrap. - False "does not exist". The v2 data includes examples that say a flag or subcommand does not
exist. In the evaluation the model once wrongly said that
bao version-historydoes not exist (in both languages). - Scope. Only the CLI command pages of the documentation, as of OpenBao commit
423b254(2026-11-06). Secrets engines, auth methods, server configuration and the HTTP API are covered only as far as those pages mention them. - Small model. For reliable answers, pair it with retrieval: put the relevant documentation page in the prompt instead of relying on what the model memorized.
License
The model weights are released under Apache-2.0, the license of the base model (Qwen3.5-4B license). The training dataset is MPL-2.0 and derives from the OpenBao documentation (MPL-2.0); see the dataset card for attribution.
Resumo em português
Qwen3.5-4B ajustado (QLoRA, Unsloth) para responder perguntas sobre a CLI do OpenBao (bao) em
português do Brasil e inglês, a partir do dataset
felicepedrof/openbao-cli-instruct
v2. Arquivo GGUF Q4_K_M de 2,78 GB, roda no llama.cpp.
- Como usar: o comando
llama-serveracima, com o prompt de sistema em português (seção Settings that matter), temperatura de 0,1 a 0,3 e thinking desligado (enable_thinking: false). - Resultados: nas 134 perguntas de validação, 10% das respostas usam algum comando ou flag inexistente (0% em perguntas no formato da documentação, 27% em cenários abertos).
- Limitações: ainda inventa nomes plausíveis em perguntas abertas e, numa resposta, disse que o
bao version-historynão existe. Confira os comandos na documentação oficial antes de executá-los. - Modelo não oficial, sem vínculo com o projeto OpenBao.