Downloads · 30 days
0
thesimonharms/mclass
mclass is a text classification model from thesimonharms. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as mit.
Extract-then-classify coding preference model. It reads user text, harness messages, and code hunks. It writes typed labels with a percent.
Downloads · 30 days
0
Access
Public
Updated Sep 21, 2026
Repo size
184 MB
Likes
0
Public
Click a slice to open those files.
.onnx91.6 MB · 50%
From the Hugging Face model README
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.
| 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
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": [] }.
preference is true only when kind is durablekind: durable | session | task | correctioncategory: cli | language | architecture | testing | style | tooling | naming | git | docs | otherconfidence is P(durable) after temperature scalingMean-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.
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 | — |