Downloads · 30 days
8
7% of all-time downloads
AltronisSG/judgment-qc-gate-gemma-4-e4b-lora
judgment-qc-gate-gemma-4-e4b-lora is a text generation model from AltronisSG. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
v10. This is the Gemma sibling of the Qwen3-4B gate. Same corpus, same evaluation, different base. Both are retrained daily on human-approved corrections. Treat the numbers as evidence, not proof; it is a real interna…
Downloads · 30 days
8
7% of all-time downloads
All-time downloads
112
Public
Repo size
172 MB
Likes
0
Public
Click a slice to open those files.
.safetensors140 MB · 81%
From the Hugging Face model README
v10. This is the Gemma sibling of the Qwen3-4B gate. Same corpus, same evaluation, different base. Both are retrained daily on human-approved corrections. Treat the numbers as evidence, not proof; it is a real internal tool, not a general-purpose reviewer.
This is a LoRA adapter for google/gemma-4-E4B-it that distills one engineer's quality-control judgment into a small local model. Given a one-line description of a work situation, it returns the verdict that operator would give.
IN : [phase: post] Assistant declared a build 'done / passed QC' on the strength
of 'should work' and 'I made the edit', with no run output shown.
OUT: VERDICT: VERIFY | Show the actual run output, not just the claim.
It is a gate, not a chatbot: the intended deployment is inside tooling (pre-send hooks, CI steps, agent harnesses) where drafts of outbound work are judged before they ship.
We maintain a Qwen and a Gemma adapter on the same corpus. The Qwen variant is the one we serve in production because it converts to a single 4.3GB GGUF and runs from llama.cpp as an always-on gate. The Gemma base is multimodal and heavier: its GGUF is about 7.9GB and it has historically scored a touch higher on held-out alignment. Pick by deployment constraint. This repo is the Gemma adapter; a ready-to-run GGUF is at AltronisSG/judgment-qc-gate-gemma-4-e4b-GGUF.
The corpus deliberately teaches how to judge and keeps facts out of the weights. Facts belong in retrieval, where they can be updated without retraining. A judgment model that memorises project details is stale in a month; one that learns "verify before claiming done" is not.
647 examples, each a real situation from months of AI-assisted engineering work paired with the correction the operator actually gave at the time. Every example was individually reviewed and approved by that operator before entering the corpus. Examples are generalised: no names, no figures, no project internals, only the shape of the situation and the standard applied. 570 examples train, 63 are held out for evaluation.
The corpus is deliberately balanced, roughly 40 percent violations (the gate should block) and 60 percent compliant work that merely looks risky (the gate should pass). An earlier corpus was violation-heavy, which taught the model to block too readily; the compliant examples correct that.
Format: closed-schema chat-message JSONL. System gives the gate instruction, user gives the situation, assistant returns VERDICT: <TAG> | <correction> or VERDICT: OK, from a fixed vocabulary of about 14 tags.
Two checks gate every release. Neither is a standard benchmark; both are small and internal.
| Run | Base | Train examples | False-positive probe | Violation probe |
|---|---|---|---|---|
| v2 | Gemma-4-E4B | 105 | - | 10/12 aligned on held-out |
| v10 (current) | Gemma-4-E4B | 570 | 0/30 blocked | 12/12 caught |
The false-positive rate at 0/30 is the payoff of the balanced corpus: the model stopped blocking clean work while still catching every planted violation. The sets are small, so read them as a direction, not a guarantee.
from transformers import AutoModelForImageTextToText, AutoTokenizer
from peft import PeftModel
base = AutoModelForImageTextToText.from_pretrained("google/gemma-4-E4B-it", torch_dtype="bfloat16", device_map="auto")
model = PeftModel.from_pretrained(base, "AltronisSG/judgment-qc-gate-gemma-4-e4b-lora")
tok = AutoTokenizer.from_pretrained("AltronisSG/judgment-qc-gate-gemma-4-e4b-lora")
msgs = [
{"role": "system", "content": "You are the QC gate. Given a work situation, return the verdict."},
{"role": "user", "content": "[phase: post] About to send an answer without re-deriving its numbers."},
]
inp = tok.apply_chat_template(msgs, tokenize=False, add_generation_prompt=True)
out = model.generate(**tok(inp, return_tensors="pt").to(model.device), max_new_tokens=180, do_sample=False)
print(tok.decode(out[0], skip_special_tokens=True))
For local serving, use the GGUF: AltronisSG/judgment-qc-gate-gemma-4-e4b-GGUF (Q8_0, about 7.9GB, single file).
Base model: google/gemma-4-E4B-it by Google. Adapter released under Apache-2.0.
Built by Altronis, private LLMs and governed AI delivery, Singapore. The full build story, including the unified-memory crash and the multimodal LoRA gotcha this variant required, is on the Altronis blog.