Downloads · 30 days
3
18% of all-time downloads
HamzaSaraswat/hardcap-qwen3.6-27b-lora
hardcap-qwen3.6-27b-lora is a machine learning model from HamzaSaraswat. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft. The card lists the license as apache-2.0.
A LoRA adapter turning unsloth/Qwen3.6-27B into a specialist on the NBA's 2023 Collective Bargaining Agreement: trade legality, the first and second aprons, exceptions, the stretch provision, and roster construction.
Downloads · 30 days
3
18% of all-time downloads
All-time downloads
17
Public
Repo size
658 MB
Likes
0
Public
Click a slice to open those files.
.safetensors638 MB · 97%
From the Hugging Face model README
A LoRA adapter turning unsloth/Qwen3.6-27B into a specialist on the NBA's 2023
Collective Bargaining Agreement: trade legality, the first and second aprons, exceptions,
the stretch provision, and roster construction.
Trained on an NVIDIA DGX Spark. Source, dataset generator, and evaluation harness: https://github.com/Hamza-Saraswat/hardcap
Rules are stable until at least 2029; salary figures change daily. So the rules go in the weights and the numbers stay in the prompt — you paste a current cap sheet and the model reasons over what it is handed. About an eighth of the training data uses invented future thresholds where answering from memory is wrong by construction, specifically to train the "read, don't recall" reflex.
499 held-out questions, graded programmatically against a deterministic CBA calculator (temperature 0, thinking disabled):
| Measure | Base Qwen3.6-27B | This adapter |
|---|---|---|
| Verdict accuracy (legal / illegal) | 58.0% | 78.0% |
| Arithmetic (every required figure exact) | 53.5% | 54.3% |
| Grounding (no invented figures) | 3.8% | 31.7% |
| Staleness probes (pasted figures must win) | 3.4% | 32.2% |
Strong on rule application — exception eligibility 97.8% verdicts / 100% arithmetic; buyout market, draft penalties, and exception surveys at or near 100%. Weak on long chained arithmetic (multi-bracket tax bills), the familiar limit of doing multi-step multiplication in-weights; the fix is tool use, not more training.
6,240 examples, none of them written freehand by a language model. A deterministic engine computes each answer and records every step; a narrator writes the prose; a verifier rejects any output containing a figure the engine never computed. Players are invented — attaching fabricated salaries to real people would teach false facts, which is the exact failure this design avoids.
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base = AutoModelForCausalLM.from_pretrained("unsloth/Qwen3.6-27B", dtype="bfloat16", device_map="auto")
model = PeftModel.from_pretrained(base, "HamzaSaraswat/hardcap-qwen3.6-27b-lora")
tokenizer = AutoTokenizer.from_pretrained("HamzaSaraswat/hardcap-qwen3.6-27b-lora")
Or serve it with vLLM, which hot-swaps adapters without reloading the base:
vllm serve unsloth/Qwen3.6-27B --enable-lora \
--lora-modules capologist=HamzaSaraswat/hardcap-qwen3.6-27b-lora --max-lora-rank 32
Use the system prompt from the repository (datagen/prompts.py) — the behavior described
there is what the model was trained against.
LoRA r=32, alpha=64, BF16, on q/k/v/o and gate/up/down projections. 2 epochs, lr 1e-4 cosine, effective batch 16, sequence length 8192, ~8.5h on one DGX Spark (GB10).
Loss is masked to response tokens only. An earlier run without that masking scored 26% on verdicts — worse than the base model — because most of the gradient went into reproducing an identical system prompt and predicting random cap-sheet salaries. That one flag was worth 52 points.