Instructions to use dkubeio/DKube-instruct-v2-0.5B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use dkubeio/DKube-instruct-v2-0.5B with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-0.5B-Instruct") model = PeftModel.from_pretrained(base_model, "dkubeio/DKube-instruct-v2-0.5B") - Notebooks
- Google Colab
- Kaggle
DKube-instruct-v2-0.5B
A LoRA adapter on Qwen/Qwen2.5-0.5B-Instruct for Kubernetes troubleshooting. Given an
error (ImagePullBackOff, CrashLoopBackOff, exit codes, scheduling, storage, networking, RBAC, certificates and more),
it answers in four parts: Cause, Diagnose (commands), Fix (commands or YAML), Verify.
Training continued from t4tarzan/DKube-instruct (v1) with the same r=16 / ฮฑ=32 LoRA, so it keeps v1's lineage.
Prototype โ verify before you run anything. This model reliably produces the right shape of answer, and it gets some common failures right. It also states wrong root causes and wrong fixes with full confidence (see Known failures below). Treat every command and YAML as a suggestion to review, never as something to apply to a cluster unchecked.
Training
- Data: 1270 train / 69 held-out chat examples. 2 epochs, learning rate 0.0001, LoRA r=16 / ฮฑ=32 on all attention and MLP projections. Loss is on assistant tokens only; bf16 on an NVIDIA GB10 (DGX Spark).
- How the examples were made: Kubernetes troubleshooting sources covering 47 error classes were collected and
chunked, and a local teacher model (mostly
gpt-oss:20b, someQwen3-8B) wrote 1โ3 grounded examples per chunk. Every example was checked (realkubectlsubcommands, parseable YAML, no near-duplicates) and each error class was capped at 5% of the set.
| Source | License | Use |
|---|---|---|
| kubernetes.io debug and task docs (English) | CC BY 4.0 | grounding for generated examples |
| Stack Overflow / Server Fault Q&A | CC BY-SA 4.0 | grounding for generated examples |
| Scoutflo SRE Playbooks (K8s) | MIT | grounding for generated examples |
| kubernetes/* GitHub issue threads | GitHub ToS | grounding only, paraphrased |
| Vendor troubleshooting guides | proprietary | grounding only, paraphrased โ no text copied |
jalpan04/devops-sft-dataset (Kubernetes questions only) |
Apache-2.0 | direct rows |
spacezenmasterr/k8s-sft-cmd-en |
MIT | direct rows |
v1's AnveshGummala/k8s-troubleshooting-customdsv3 is not used: its license is undeclared. Research-paper Q&A rows
that v1's source mixed into its "Kubernetes" rows were removed.
Evaluation
Two measures, run on 2026-09-25 with the same code for every model:
- Rubric โ: over 40 canonical scenarios, the share of required root-cause and fix keywords each answer contains. It is coarse. It rewards naming the right things, not being right, so read it next to Known failures.
- Loss โ: loss on held-out assistant tokens, both on new-style examples and on v1-style rows.
| model | rubric โ | loss, new data โ | loss, v1-style โ |
|---|---|---|---|
| Qwen2.5-0.5B-Instruct (no adapter) | 0.487 | 1.581 | 2.082 |
| t4tarzan/DKube-instruct (v1, 0.5B) | 0.367 | 1.689 | 1.664 |
| DKube-instruct-v2-0.5B (this model) | 0.562 | 1.173 | 1.593 |
| Qwen2.5-1.5B-Instruct (no adapter) | 0.608 | 1.332 | 2.072 |
| DKube-instruct-v2-1.5B | 0.642 | 0.944 | 1.610 |
| Qwen2.5-7B-Instruct (no adapter) | 0.825 | 1.435 | 3.069 |
| DKube-instruct-v2-7B | 0.821 | 0.757 | 1.393 |
Known failures
Read from this model's own answers to the canonical scenarios:
- Exit code 137: does not identify it as SIGKILL / OOMKilled; blames "startup failures, missing dependencies".
- ImagePullBackOff with 401 Unauthorized: looks for tokens in
kube-systemand the kubeconfig instead of adocker-registrysecret referenced inimagePullSecrets. - RBAC Forbidden: says to create a Role, but checks permissions with
kubectl get svcand looks for API-server errors in the kubelet log. - It scores zero on the exit codes 126 / 127 / 139 / 143 and exec format error, DNS resolution, stuck Terminating
pods and namespaces, and
localhost:8080 refused. It can invent commands and resource types (e.g.kubectl get envvar). - Scored well: CreateContainerConfigError (ConfigMap / Secret), node affinity, PVC pending, FailedMount, Evicted, liveness / readiness probes, ProgressDeadlineExceeded, x509 errors, ResourceQuota, Docker Hub rate limits.
Usage
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base = "Qwen/Qwen2.5-0.5B-Instruct"
tok = AutoTokenizer.from_pretrained(base)
model = AutoModelForCausalLM.from_pretrained(base, torch_dtype="auto")
model = PeftModel.from_pretrained(model, "dkubeio/DKube-instruct-v2-0.5B")
msgs = [
{"role": "system", "content": "You are DKube-instruct, a Kubernetes troubleshooting assistant. Diagnose the root cause, give exact kubectl commands or YAML fixes, and say how to verify."},
{"role": "user", "content": "Pod is CrashLoopBackOff with exit code 137. How do I fix it?"},
]
ids = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt")
print(tok.decode(model.generate(ids, max_new_tokens=400)[0][ids.shape[1]:], skip_special_tokens=True))
The system prompt above is the one the model was trained with; answers are best with it.
License
The adapter is released under Apache-2.0. Use of the base model follows its own license (Qwen/Qwen2.5-0.5B-Instruct: Apache-2.0).
- Downloads last month
- 16