DiskSage-0.5B

Superseded by DiskSage-0.8B. That model uses richer evidence and was validated on 318 real items with 318 correct decisions. This repository is kept for reproducibility. In a live trial on a real machine this model produced no deletion candidates and some unsupported explanations.

Table of Contents

  1. Model Summary
  2. How to use
  3. Prompt format
  4. Files
  5. Evaluation
  6. Training
  7. Limitations
  8. License
  9. Citation

Model Summary

DiskSage-0.5B reviews one Linux storage item from numbered, read-only observations and returns JSON with a decision (keep, investigate or candidate), a short reason, cited evidence IDs and missing checks. It is a LoRA fine-tune of Qwen2.5-0.5B-Instruct, merged and quantized to Q4_K_M GGUF. A candidate is a proposal for human approval, never permission to delete.

Decision Meaning
keep Evidence of a retention reason, active use, unique data, installed runtime, source state, credentials, a backup or a protected mount.
candidate Evidence of reproducibility or a verified redundant copy, no retention need and no active references.
investigate Anything else; checks names what is missing.

Key features

  • Small: 379 MiB file, about 561 MiB peak RAM, about 3.2 s per item on a 4-core ARM CPU.
  • Constrained output: JSON schema branches force empty checks for keep/candidate and at least one for investigate.

How to use

With llama.cpp revision 620d2225 (release v0.7.0):

llama-server --model DiskSage-0.5B-Q4_K_M.gguf \
  --host 127.0.0.1 --port 8080 --ctx-size 2048 --parallel 1 \
  --threads 4 --threads-batch 4 --batch-size 32 --ubatch-size 32 \
  --n-gpu-layers 0 --no-webui --no-warmup --no-repack

In another terminal, run this example from the downloaded directory:

import json
import urllib.request
from pathlib import Path

server = "http://127.0.0.1:8080"

def post(endpoint, payload):
    request = urllib.request.Request(
        server + endpoint,
        data=json.dumps(payload).encode(),
        headers={"Content-Type": "application/json"},
    )
    with urllib.request.urlopen(request, timeout=120) as response:
        return json.load(response)

tokens = post("/tokenize", {
    "content": Path("example-prompt.txt").read_text(),
    "add_special": False,
    "parse_special": True,
})["tokens"]
if len(tokens) + 192 > 2048:
    raise ValueError("Evidence exceeds the context budget; do not truncate it.")
response = post("/completion", {
    "prompt": tokens,
    "json_schema": json.loads(Path("example-schema.json").read_text()),
    "temperature": 0,
    "seed": 20261023,
    "n_predict": 192,
    "cache_prompt": False,
    "stream": False,
})
if response["stop_type"] == "limit" or response.get("truncated"):
    raise ValueError("Incomplete response; do not accept a recommendation.")
print(json.dumps(json.loads(response["content"]), indent=2))

For new evidence, replace __CLEANER_PACKET__ in prompt-template.txt with compact JSON containing item, allocated_bytes and observations (each with id and text). Escape < as \u003c, update the citation enums in the schema to the packet's IDs, validate the complete answer in your application, and never execute generated text.

Prompt format

ChatML. prompt-template.txt holds the exact rendered prompt:

<|im_start|>system
{system_prompt}<|im_end|>
<|im_start|>user
{"item": "...", "allocated_bytes": 123, "observations": [{"id": "e1", "text": "..."}]}<|im_end|>
<|im_start|>assistant

Files

Filename Description
DiskSage-0.5B-Q4_K_M.gguf Merged weights, Q4_K_M, 398 MB. SHA-256 c182ec79โ€ฆe4b
system-prompt.txt, prompt-template.txt Training system prompt and rendered template
example-evidence.json, example-schema.json, example-prompt.txt One example input, its schema and full prompt
evaluation.json, evaluation-cases.jsonl Metrics and the 60 acceptance cases
provenance.json Base revision, hyperparameters, dataset hashes
SHA256SUMS, LICENSE, NOTICE Checksums, Apache-2.0 license, modification notice

Evaluation

60 synthetic acceptance cases in 20 counterfactual families, frozen before training. Same prompt, quantizer, runtime and greedy decoding for both models.

Metric Base Qwen2.5-0.5B Q4 DiskSage-0.5B Q4
Correct decisions 18/60 60/60
Valid responses 56/60 60/60
Wrong deletion proposals 0 0
Expected checks found 28/40 24/40
Expected citation found 42/60 56/60

All cases were written by the same author as the training data, so this measures task adaptation, not real-world accuracy. A later live trial on 40 real paths and 12 Docker objects gave 20 keep, 32 investigate and no candidates. It also exposed unsupported explanations and one keep answer whose reason called the item disposable.

Training

  • Base: Qwen/Qwen2.5-0.5B-Instruct, revision 7ae557604adf67be50417f59c2c2f167def9a775
  • Method: BF16 LoRA, rank 32, alpha 64, dropout 0.05, attention and MLP projections; merged
  • Schedule: 3 epochs (288 steps), learning rate 1.5e-4 cosine; checkpoint at step 96 selected by validation loss
  • Data: 3,048 synthetic examples from 127 hand-written scenario templates
  • Hardware: 1ร— NVIDIA H100 on Modal; Transformers 4.57.6, PEFT 0.18.1
  • Quantization: llama.cpp 620d2225, Q4_K_M

Limitations

  • Superseded; prefer DiskSage-0.8B.
  • Small, correlated, author-written training and test sets.
  • Omits useful checks and can invent details in explanations.
  • Never sees file contents; review the evidence before acting.

License

Apache-2.0, inherited from Qwen2.5-0.5B-Instruct. See NOTICE for modifications.

Citation

@misc{disksage2026,
  title  = {DiskSage: small local models for reviewing Linux storage},
  author = {Microck},
  year   = {2026},
  url    = {https://huggingface.co/Microck/DiskSage-0.8B-GGUF}
}
Downloads last month
178
GGUF
Model size
0.5B params
Architecture
qwen2
Hardware compatibility
Log In to add your hardware

4-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for Microck/DiskSage-0.5B-GGUF

Finetuned
(1102)
this model

Evaluation results

  • Decision accuracy on DiskSage 0.5B acceptance set, 60 cases
    self-reported
    100.000
  • Expected check recall on DiskSage 0.5B acceptance set, 60 cases
    self-reported
    60.000
  • Expected citation found on DiskSage 0.5B acceptance set, 60 cases
    self-reported
    93.300