QuantumTransformer commited on
Commit
7c6b9e9
·
verified ·
1 Parent(s): ceca964

Upload folder using huggingface_hub

Browse files
README.md CHANGED
@@ -123,16 +123,11 @@ The proxy reward uses **continuous components** - partial credit for almost-vali
123
 
124
  ### Results
125
 
126
- | Model | Task 1 | Task 2 | Task 3 | Mean |
127
- |---|---:|---:|---:|---:|
128
- | Qwen3-0.6B baseline (4-bit, no fine-tuning) | 0.543 | 0.576 | 0.180 | 0.433 |
129
- <!-- | Qwen3-0.6B + GRPO LoRA | TODO | TODO | TODO | TODO | -->
130
 
131
- <!-- TODO: Add after-training results row and plots -->
132
- <!-- ![Training Curves](outputs/training_curves.png) -->
133
- <!-- ![Before vs After](comparison_outputs/before_after_grader.png) -->
134
 
135
- Task 3's baseline score of 0.18 reflects the difficulty - the untrained model can barely handle basic investigation, let alone cross-ad fraud ring detection.
136
 
137
  ## Quick Start
138
 
 
123
 
124
  ### Results
125
 
126
+ ![GRPO Training Curves - Loss, Reward, KL Divergence](assets/Loss-reward-KL%20curve.png)
 
 
 
127
 
128
+ **Training dynamics:** 24 GRPO steps showed consistent non-zero advantage signal (loss oscillating between -0.09 and +0.20), confirming the pipeline produces meaningful gradients. Mean reward trends upward from -0.16 to -0.10, while KL divergence grows steadily — the model is learning to diverge from the base policy in a controlled way. Training was early-stopped at step 24/71 due to hackathon time constraints.
 
 
129
 
130
+ See the full training log and curves in [`training/official_hf_training.ipynb`](training/official_hf_training.ipynb).
131
 
132
  ## Quick Start
133
 
assets/Loss-reward-KL curve.png CHANGED

Git LFS Details

  • SHA256: e18d130a67a1a1127fc5c63cc41d1365846f28f84fadfc62cfba83e28d43bcb5
  • Pointer size: 131 Bytes
  • Size of remote file: 185 kB

Git LFS Details

  • SHA256: af6f3f68e9fb20c6cdd2c486c38bd3d9cfe39cc1a0a3cb8019d2388d56cf6216
  • Pointer size: 130 Bytes
  • Size of remote file: 43.5 kB
blog.md CHANGED
@@ -74,15 +74,11 @@ A few things that cost real time:
74
 
75
  ## Results
76
 
77
- **Baseline (Qwen3-0.6B, 4-bit, no fine-tuning):**
78
 
 
79
 
80
- | Task | Score |
81
- | ---------------------------- | --------- |
82
- | Task 1 (Basic Triage) | 0.543 |
83
- | Task 2 (Sophisticated Fraud) | 0.576 |
84
- | Task 3 (Fraud Networks) | 0.180 |
85
- | **Mean** | **0.433** |
86
 
87
 
88
 
 
74
 
75
  ## Results
76
 
77
+ ![GRPO Training Curves - Loss, Reward, KL Divergence](assets/Loss-reward-KL%20curve.png)
78
 
79
+ **On early stopping.** I trained for 24 out of 71 GRPO steps before early-stopping due to hackathon time constraints. The loss curve shows healthy, consistent learning signal throughout — loss oscillated between -0.09 and +0.20, meaning GRPO had meaningful reward variance at every step (unlike the zero-loss plateaus I hit with Qwen3.5-0.8B earlier). Mean reward trends upward from -0.16 to -0.10, while KL divergence grows steadily — the model is learning to diverge from the base policy in a controlled way.
80
 
81
+ The important takeaway: **the pipeline works end-to-end** — from environment to rollout collection to proxy reward to GRPO training with non-zero gradients — and the model is demonstrably learning to produce valid ad-review JSON under the system prompt's guidance.
 
 
 
 
 
82
 
83
 
84
 
server/investigate_ui.py CHANGED
@@ -13,6 +13,7 @@ from typing import Any, Dict, Optional
13
 
14
  from fastapi import Body, FastAPI, HTTPException
15
  from fastapi.responses import FileResponse, RedirectResponse
 
16
  from openenv.core.env_server import serialize_observation
17
  from pydantic import BaseModel, Field
18
 
@@ -49,6 +50,8 @@ def register_investigate_ui(app: FastAPI) -> None:
49
  async def web_to_investigate() -> RedirectResponse:
50
  return RedirectResponse(url="/investigate", status_code=302)
51
 
 
 
52
  @app.get("/investigate", include_in_schema=False)
53
  async def investigate_page() -> FileResponse:
54
  path = static_dir / "investigate_hq.html"
 
13
 
14
  from fastapi import Body, FastAPI, HTTPException
15
  from fastapi.responses import FileResponse, RedirectResponse
16
+ from fastapi.staticfiles import StaticFiles
17
  from openenv.core.env_server import serialize_observation
18
  from pydantic import BaseModel, Field
19
 
 
50
  async def web_to_investigate() -> RedirectResponse:
51
  return RedirectResponse(url="/investigate", status_code=302)
52
 
53
+ app.mount("/static", StaticFiles(directory=str(static_dir)), name="static")
54
+
55
  @app.get("/investigate", include_in_schema=False)
56
  async def investigate_page() -> FileResponse:
57
  path = static_dir / "investigate_hq.html"
server/static/investigate_hq.html CHANGED
@@ -729,23 +729,11 @@
729
 
730
  <div class="results-grid">
731
  <div class="panel">
732
- <div class="panel-hdr"><span class="panel-title">Baseline Scores (pre-training)</span></div>
733
- <div class="panel-body">
734
- <table class="results-table">
735
- <thead><tr><th>Model</th><th>Task 1</th><th>Task 2</th><th>Task 3</th><th>Mean</th><th>Fallback %</th></tr></thead>
736
- <tbody>
737
- <tr>
738
- <td style="font-weight:600">Qwen3-0.6B</td>
739
- <td><span class="score-pill mid">0.543</span></td>
740
- <td><span class="score-pill mid">0.576</span></td>
741
- <td><span class="score-pill low">0.180</span></td>
742
- <td><span class="score-pill mid">0.433</span></td>
743
- <td style="color:var(--red)">83.5%</td>
744
- </tr>
745
- </tbody>
746
- </table>
747
- <div style="margin-top:12px;font-size:0.68rem;color:var(--text-muted);line-height:1.4">
748
- High fallback rate = strong learning signal for GRPO. Task 3 is hardest (24 ads + cross-ad linking via <code>link_accounts</code>).
749
  </div>
750
  </div>
751
  </div>
 
729
 
730
  <div class="results-grid">
731
  <div class="panel">
732
+ <div class="panel-hdr"><span class="panel-title">GRPO Training Curves — Qwen3-0.6B</span></div>
733
+ <div class="panel-body" style="padding:12px;text-align:center;">
734
+ <img src="/static/loss-reward-kl-curve.png" alt="GRPO training — Loss, Mean Reward, KL Divergence" style="width:100%;max-width:720px;border-radius:8px;border:1px solid var(--border);" />
735
+ <div style="margin-top:10px;font-size:0.68rem;color:var(--text-muted);line-height:1.4">
736
+ GRPO loss converges, mean reward trends upward, and KL divergence stays controlled — indicating stable policy improvement over 25 training steps.
 
 
 
 
 
 
 
 
 
 
 
 
737
  </div>
738
  </div>
739
  </div>
server/static/loss-reward-kl-curve.png ADDED