step3: fair-50 matrix D+E, lock logic
Browse files- docs/PROGRESS.md +1 -0
- model/scripts/toy_router_test.py +14 -5
docs/PROGRESS.md
CHANGED
|
@@ -35,6 +35,7 @@ Har kaam ke baad yaha entry karo taaki yaad rahe kab kya kiya tha.
|
|
| 35 |
- [x] 2026-09-17: improve approved β toy me Config C (0.05, 50 steps) joda, HF push β Kaggle re-run pending
|
| 36 |
- [x] 2026-09-17: Step 3 Config C Kaggle PASS (max 0.199, sab experts β₯5.5%, loss 4.55 β A/B se best), TEST_REPORT entry, HF push β 0.05 lock approval pending
|
| 37 |
- [x] 2026-09-17: lock DEFERRED (user: best result aane tak lock nahi) β config 0.01 unchanged, Step 3 open, HF push
|
|
|
|
| 38 |
- [x] 2026-09-17: `docs/ROADMAP_SCRATCH.md` banaya (Step 0-10, status: 0-2 done, agla Step 3 toy-Kaggle), HF push
|
| 39 |
- [ ] TODO: toy router-balance test (Kaggle), FINAL tokenizer (500k lines wait), dense baseline
|
| 40 |
|
|
|
|
| 35 |
- [x] 2026-09-17: improve approved β toy me Config C (0.05, 50 steps) joda, HF push β Kaggle re-run pending
|
| 36 |
- [x] 2026-09-17: Step 3 Config C Kaggle PASS (max 0.199, sab experts β₯5.5%, loss 4.55 β A/B se best), TEST_REPORT entry, HF push β 0.05 lock approval pending
|
| 37 |
- [x] 2026-09-17: lock DEFERRED (user: best result aane tak lock nahi) β config 0.01 unchanged, Step 3 open, HF push
|
| 38 |
+
- [x] 2026-09-17: best-path approved β toy me D (0.01/50) + E (0.02/50) jode, fair-50 lock logic, HF push β Kaggle re-run pending
|
| 39 |
- [x] 2026-09-17: `docs/ROADMAP_SCRATCH.md` banaya (Step 0-10, status: 0-2 done, agla Step 3 toy-Kaggle), HF push
|
| 40 |
- [ ] TODO: toy router-balance test (Kaggle), FINAL tokenizer (500k lines wait), dense baseline
|
| 41 |
|
model/scripts/toy_router_test.py
CHANGED
|
@@ -4,7 +4,9 @@ Toy router-balance test β Step 3 (Kaggle, CPU enough, ~5 min)
|
|
| 4 |
A) balance_weight=0.01 (current lock candidate)
|
| 5 |
B) balance_weight=0.02 (stronger balancing)
|
| 6 |
- Har config: train steps on dummy Hinglish lines, phir expert usage report
|
| 7 |
-
- Configs: A) bal 0.01 / 20 steps, B) bal 0.02 / 20 steps
|
|
|
|
|
|
|
| 8 |
- Verdict: max expert share <60% = PASS, warna FAIL (design badlo, aage mat badho)
|
| 9 |
- Report: output ko copy karke docs/TEST_REPORT.md me paste karo
|
| 10 |
|
|
@@ -114,13 +116,20 @@ def main():
|
|
| 114 |
ra = run_config("A", 0.01, tok, blocks, steps=20)
|
| 115 |
rb = run_config("B", 0.02, tok, blocks, steps=20)
|
| 116 |
rc = run_config("C", 0.05, tok, blocks, steps=50)
|
|
|
|
|
|
|
| 117 |
print("\n--- COPY TO TEST_REPORT ---")
|
| 118 |
-
for r in (ra, rb, rc):
|
| 119 |
print(f"- Config {r['tag']} (bal {r['bal_w']}): loss {r['loss_first']}->{r['loss_last']}, "
|
| 120 |
f"max_share {r['max_share']}, usage {r['usage']} => {r['verdict']}")
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 124 |
print(f"locked balance_weight: {locked}")
|
| 125 |
print("--- END ---")
|
| 126 |
|
|
|
|
| 4 |
A) balance_weight=0.01 (current lock candidate)
|
| 5 |
B) balance_weight=0.02 (stronger balancing)
|
| 6 |
- Har config: train steps on dummy Hinglish lines, phir expert usage report
|
| 7 |
+
- Configs: A) bal 0.01 / 20 steps, B) bal 0.02 / 20 steps (history),
|
| 8 |
+
C) bal 0.05 / 50 steps, D) bal 0.01 / 50 steps, E) bal 0.02 / 50 steps
|
| 9 |
+
- Fair lock sirf 50-step group (C/D/E) se β steps ka asar alag ho jayega
|
| 10 |
- Verdict: max expert share <60% = PASS, warna FAIL (design badlo, aage mat badho)
|
| 11 |
- Report: output ko copy karke docs/TEST_REPORT.md me paste karo
|
| 12 |
|
|
|
|
| 116 |
ra = run_config("A", 0.01, tok, blocks, steps=20)
|
| 117 |
rb = run_config("B", 0.02, tok, blocks, steps=20)
|
| 118 |
rc = run_config("C", 0.05, tok, blocks, steps=50)
|
| 119 |
+
rd = run_config("D", 0.01, tok, blocks, steps=50)
|
| 120 |
+
re_ = run_config("E", 0.02, tok, blocks, steps=50)
|
| 121 |
print("\n--- COPY TO TEST_REPORT ---")
|
| 122 |
+
for r in (ra, rb, rc, rd, re_):
|
| 123 |
print(f"- Config {r['tag']} (bal {r['bal_w']}): loss {r['loss_first']}->{r['loss_last']}, "
|
| 124 |
f"max_share {r['max_share']}, usage {r['usage']} => {r['verdict']}")
|
| 125 |
+
# fair lock: sirf 50-step group (C/D/E) compare karo
|
| 126 |
+
fair = [r for r in (rc, rd, re_) if r["verdict"] == "PASS"]
|
| 127 |
+
if fair:
|
| 128 |
+
best = min(fair, key=lambda r: r["max_share"])
|
| 129 |
+
tagmap = {"C": "C (0.05)", "D": "A/D-line (0.01)", "E": "B/E-line (0.02)"}
|
| 130 |
+
locked = tagmap[best["tag"]] + f" β fair-50 best max_share {best['max_share']}"
|
| 131 |
+
else:
|
| 132 |
+
locked = "NONE β design badlo, aage mat badho"
|
| 133 |
print(f"locked balance_weight: {locked}")
|
| 134 |
print("--- END ---")
|
| 135 |
|