Views
No views yet
1from transformers import AutoModelForCausalLM, AutoTokenizer
2import torch
3
4model = AutoModelForCausalLM.from_pretrained(
5 "YellowLabsStudio/goodglinda-7b-verifier",
6 torch_dtype=torch.bfloat16,
7 device_map="auto"
8)
9tokenizer = AutoTokenizer.from_pretrained("YellowLabsStudio/goodglinda-7b-verifier")
10
11# Verify a solution
12task = "Write a function to validate email addresses"
13candidate = "def validate(email): return '@' in email"
14prompt = f"Task: {task}\nCandidate: {candidate}\nVerdict:"
15
16inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
17outputs = model.generate(**inputs, max_new_tokens=100, temperature=0.3)
18result = tokenizer.decode(outputs[0], skip_special_tokens=True)
19print(result)
20
21## Performance
22
23I tested on 2,000 injected error samples (1,000 buggy, 1,000 clean) because I could not afford multiple training runs for confidence intervals. Results from the single 72-hour run:
24
25| Benchmark | Error Detection | False Positive Rate |
26|-----------------|----------------|---------------------|
27| HumanEval+MBPP | 76% | 9% |
28| GSM8K+MATH | 78% | 8% |
29
30Majority voting baseline hit 34%. My flat baseline (no hierarchical heads) reached 68%. The 11-13 point improvement comes from the tiered architecture, not just fine-tuning.
31
32Late one night at hour 68, I watched the loss curve descend like a fever breaking. The arbitration head finally started converging.
33
34## Hardware Reality
35
36**Minimum:** 8GB VRAM (RTX 4060, RTX 3070)
37**Recommended:** 16GB for Tier 3 beam search without CPU offloading
38**My Setup:** Intel i7-12700, 64GB DDR5-4800, RTX 4060 (8GB) + RTX 5070 Ti (16GB)
39
40The asymmetric VRAM caused headaches. DeepSpeed partitioned the optimizer states across both cards, but the 4060's memory ceiling forced aggressive CPU offloading. I wasted two days trying pipeline parallelism before switching to ZeRO-2.
41
42## Limitations
43
44This is a single training run. No seed averaging, no cross-validation. The numbers could vary ±3-5 percentage points if I retrained. I distilled all 50,000 samples from DeepSeek-V2, so the model mimics its teacher's biases. The thresholds (0.9 for Tier 1 exit, 0.3 for Tier 2 trigger) are hand-tuned on 500 validation samples, not learned.
45
46Quantization artifacts from 4-bit NF4 training likely degrade fine-grained discrimination compared to FP16. I cannot verify this without a 24GB GPU for full-precision comparison.
47
48Details on the full methodology will appear in an upcoming publication. For now, see the training code repository for configs and logs.
49
50## Links
51
52* **Training Code & Configs:** [goodglinda-training-code](https://huggingface.co/YellowLabsStudio/goodglinda-training-code)
53* **Dataset:** [goodglinda-training-data](https://huggingface.co/datasets/YellowLabsStudio/goodglinda-training-data)
54* **Live Demo:** [goodglinda-7b-eval](https://huggingface.co/spaces/YellowLabsStudio/goodglinda-7b-eval)
55
56## License
57
58Apache 2.0. Commercial use permitted with attribution.