Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files- README.md +3 -8
- assets/Loss-reward-KL curve.png +2 -2
- blog.md +3 -7
- server/investigate_ui.py +3 -0
- server/static/investigate_hq.html +5 -17
- server/static/loss-reward-kl-curve.png +0 -0
README.md
CHANGED
|
@@ -123,16 +123,11 @@ The proxy reward uses **continuous components** - partial credit for almost-vali
|
|
| 123 |
|
| 124 |
### Results
|
| 125 |
|
| 126 |
-
|
| 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 |
-
|
| 132 |
-
<!--  -->
|
| 133 |
-
<!--  -->
|
| 134 |
|
| 135 |
-
|
| 136 |
|
| 137 |
## Quick Start
|
| 138 |
|
|
|
|
| 123 |
|
| 124 |
### Results
|
| 125 |
|
| 126 |
+

|
|
|
|
|
|
|
|
|
|
| 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
|
|
Git LFS Details
|
blog.md
CHANGED
|
@@ -74,15 +74,11 @@ A few things that cost real time:
|
|
| 74 |
|
| 75 |
## Results
|
| 76 |
|
| 77 |
-
|
| 78 |
|
|
|
|
| 79 |
|
| 80 |
-
|
| 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 |
+

|
| 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">
|
| 733 |
-
<div class="panel-body">
|
| 734 |
-
<
|
| 735 |
-
|
| 736 |
-
|
| 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
|