SmolLM3-3B log triage (GGUF)
A QLoRA fine-tune of HuggingFaceTB/SmolLM3-3B that reads one log line and returns JSON:
{"service": "...", "severity": "INFO|WARNING|ERROR|FATAL", "identifiers": ["..."], "recommended_action": "no_action|investigate|escalate_oncall|check_network"}
It was built for a university project asking: how much task accuracy survives post-training quantisation of a fine-tuned small language model? Code, data splits and every prediction file: https://github.com/shubham-alyan24/log-triage-slm
Files
| File | Level | Size | Bits per weight |
|---|---|---|---|
smollm3-logtriage-f16.gguf | F16 | 6.16 GB | 16.02 |
smollm3-logtriage-q8_0.gguf | Q8_0 | 3.28 GB | 8.52 |
smollm3-logtriage-q5_k_m.gguf | Q5_K_M | 2.21 GB | 5.76 |
smollm3-logtriage-q4_k_m.gguf | Q4_K_M | 1.92 GB | 4.98 |
smollm3-logtriage-q3_k_m.gguf | Q3_K_M | 1.57 GB | 4.09 |
adapter/ holds the LoRA adapter (apply it to the base model with PEFT). The K-quant levels are mixes: some
tensors are kept at higher precision, so e.g. "Q4_K_M" averages about 5.0 bits per weight.
Results (frozen eval set, 329 log lines)
All rows scored the same way: Ollama 0.34.2, raw mode, temperature 0, same prompt, same CPU-only machine. Action macro-F1 and the two rare-class columns are the headline metrics.
| Model | Level | Action acc | Action macro-F1 | Severity | Service | Identifier F1 | check_network found | escalate_oncall found |
|---|---|---|---|---|---|---|---|---|
| Most-common answer | - | 85.7 | 23.1 | 84.5 | 23.1 | - | 0/16 | 0/6 |
| Untuned SmolLM3-3B | Q8_0 | 83.3 | 24.3 | 66.6 | 20.1 | 29.0 | 0/16 | 0/6 |
| Fine-tuned | F16 | 97.0 | 88.2 | 95.7 | 79.9 | 91.9 | 16/16 | 6/6 |
| Fine-tuned | Q8_0 | 97.0 | 88.2 | 95.7 | 79.9 | 92.2 | 16/16 | 6/6 |
| Fine-tuned | Q5_K_M | 97.3 | 89.5 | 95.7 | 79.9 | 92.0 | 16/16 | 6/6 |
| Fine-tuned | Q4_K_M | 96.0 | 80.5 | 95.7 | 79.3 | 91.3 | 16/16 | 3/6 |
| Fine-tuned | Q3_K_M | 93.9 | 77.7 | 93.6 | 80.9 | 89.2 | 16/16 | 4/6 |
- F16, Q8_0 and Q5_K_M perform the same. Q5_K_M is 64% smaller than F16 with no measurable loss (its slightly higher macro-F1 is 1-2 lines - noise).
- Q4_K_M is the first level that loses anything: it finds 3 of 6
escalate_oncalllines. With only 6 such lines this is a warning sign, not proof. - Q3_K_M declines across most metrics; all 10 extra action errors are on BGL lines.
How to use
The model was trained on one exact prompt, built by build_prompt() in src/config.py of the GitHub repo
(SmolLM3 chat format, reasoning off). Send that prompt as a raw completion (do not let the runtime apply
its own chat template), with greedy decoding (temperature 0) and stop at <|im_end|>. No BOS token is added
(llama.cpp's default for this tokenizer), which matches training.
How it was made
- Data: LogHub-2k, HDFS + BGL + OpenStack + Spark (8,000 lines). Split by log template (seed 42), so eval templates marked "unseen" never appear in training. Training set: 1,057 examples after removing duplicates and capping very common no_action patterns.
- Labels:
service= LogHub component,severity= LogHub level,identifiers= alignment with the LogHub event template,recommended_action= labelled per (template, severity) group by gpt-oss-20b (so the action field is distilled from a larger model). - Training: QLoRA (4-bit NF4), LoRA r=16, alpha=32, dropout 0.05 on all linear layers, 3 epochs, lr 2e-4 cosine, effective batch 16, loss on the answer only. The checkpoint was chosen by dev loss only (epoch 1). About 30 minutes on one Kaggle T4.
- Quantisation: llama.cpp commit
b23efaa2ef147f547ee75cbf0c621d61904de80e. F16 and Q8_0 made byconvert_hf_to_gguf.pyfrom the merged bf16 model; Q5_K_M / Q4_K_M / Q3_K_M byllama-quantizefrom the F16 file, without an importance matrix. A Q8_0 made the llama-quantize way is byte-identical to the one here.
Limitations
- Small eval set (329 lines).
escalate_oncallhas only 6 eval lines and 11 distinct training lines, so results on it are anecdotal. Allcheck_networktraining lines come from HDFS. - The eval labels were reviewed by an AI model, not by hand.
serviceis not written in the log text, so it is memorised: 59.7% on unseen templates is the ceiling of this setup.- Only tested on these four LogHub systems. A research artefact, not a production triage system.
sha256
26167db05b6bf22d01871f60d8d9bbd62373f72d8185f35824a589a2759e7ad8 smollm3-logtriage-f16.gguf
8755be93df8f769947eb4eef6596909c7437f5f6b60cfcc5c4ce5988ca37155d smollm3-logtriage-q8_0.gguf
3b8d15a159385dcfb60e8ca1dc735a47631d6e89c19b7a1df5d15c80d8b26f5a smollm3-logtriage-q5_k_m.gguf
9704e60182316359b35bbc49f09b1b8d8e78da4134fb47b68c81e961a4011d56 smollm3-logtriage-q4_k_m.gguf
23fcd2b2c91910018c66c51b3a8286093218de072636b0aac84c865af5d9786a smollm3-logtriage-q3_k_m.gguf