mclass

Extract-then-classify coding preference model. It reads user text, harness messages, and code hunks. It writes typed labels with a percent.

The extractor copies candidate text from the user or from a diff template. The encoder does not invent a preference sentence.

Files

file role
encoder/ MiniLM encoder and tokenizer after LoRA merge
heads.pt kind head and category head
mclass.json labels, temperature, max length, pooling
model.onnx exported graph (kind logits and category logits)
eval.json last measured scores

Download into a local artifacts folder:

hf download thesimonharms/mclass --local-dir artifacts

Use

Install the code from git, then classify:

uv add "mclass @ git+https://git.simonharms.com/thesimonharms/mclass"
echo '{"user":"I want bun"}' | uv run mclass classify --artifacts artifacts

Or from a clone:

git clone https://git.simonharms.com/thesimonharms/mclass.git
cd mclass
uv sync --extra train
hf download thesimonharms/mclass --local-dir artifacts
echo '{"user":"I want bun"}' | uv run mclass classify

HTTP:

uv run mclass serve --port 8091 --artifacts artifacts

POST /v1/classify with { "user": "...", "harness": [], "code": [] }.

Labels

  • preference is true only when kind is durable
  • kind: durable | session | task | correction
  • category: cli | language | architecture | testing | style | tooling | naming | git | docs | other
  • confidence is P(durable) after temperature scaling

Train notes

Mean-pool MiniLM. LoRA rank 8 on the last two layers. Full encoder backward can nan on gfx1151. Heads-only is --lora-r 0 --unfreeze-last 0.

Scores

Last LoRA run (mean pool, last-2 adapters):

slice metric encoder same-data Bayes
test kind acc 1.000 โ€”
test durable F1 1.000 โ€”
user-text durable F1 1.000 0.920
gold (n=65) kind acc 0.985 โ€”
gold preference acc 1.000 โ€”
ood (n=40) kind acc 1.000 โ€”
ood preference acc 1.000 โ€”
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for thesimonharms/mclass