05. Data Model & Storage¶
Artifact flow¶
graph TD
classDef default fill:#1e293b,stroke:#38bdf8,stroke-width:2px,color:#f8fafc
classDef highlight fill:#065f46,stroke:#34d399,stroke-width:2px,color:#f0fdf4
P["data/sft/prompts.jsonl"] --> R["data/raw/{name}/traces.jsonl"]
R --> C["data/compressed/{name}/traces.jsonl"]
C --> V["data/validated/{name}/traces.jsonl"]
V --> T["data/train.jsonl + valid.jsonl"]:::highlight
T --> A["adapters/{name}/{timestamp}/"]:::highlight
A --> E["results/{name}/gsm8k*.json"]
E --> Rep["report/ committed plots + REPORT.md"]
linkStyle default stroke:#64748b,stroke-width:2px
Schemas (logical)¶
| Artifact | Typical fields |
|---|---|
| Prompt | id, source, prompt, choices, ground_truth |
| Trace | prompt id, thinking, answer, correctness metadata |
| SFT row | {"text": "..."} chat-formatted string |
| Adapter run | safetensors, metrics.json, loss plot |
| Eval JSON | per-example predictions + aggregate metrics |
What is committed vs external¶
| In git | Gitignored / HF |
|---|---|
report/ plots, metrics, REPORT.md |
data/, adapters/, results/, data-and-models/ |
| Scripts + configs | Large weights and full JSONL |
HF dataset/model repo: hari31416/qwen-grug-finetune via sync_hf.py.
Sources and eval¶
Train mix: StrategyQA, LogiQA, BoolQ, ANLI, PIQA, ReClor (sizes in config.yaml).
Leakage control: block GSM8K test (and ARC in sampler) with fuzzy Jaccard matching (sample_sft_prompts.py).
Eval in code: GSM8K only.
Interview Q&A¶
Q: Where is the database?
A: There isn't one — the experiment is file-backed JSONL plus adapter directories, with HF as the distribution store.