Skip to content

Commit 1ebfb3e

Browse files
Sid Mohanclaude
andcommitted
Add local training runner and record v1 full training results
Local training infrastructure: - scripts/run_training.py: CLI training runner with auto-precision selection (BF16 → FP32 fallback), preflight checks, structured logging, and status.json for programmatic monitoring - configs/rtx3090.yaml: RTX 3090 config (batch 8 × 4 accum = 32 eff) - .gitignore: add output/ directory v1 full training results (A100, BF16, 10 epochs, 135K train examples): Overall F1: 0.904 | Precision: 0.907 | Recall: 0.902 Tier 1 recall: 0.722 (target 0.98) FAIL Tier 2 recall: 0.934 (target 0.95) FAIL Tier 3 recall: 0.919 (target 0.90) PASS Tier 4 recall: 0.866 (target 0.85) PASS Best checkpoint at epoch 5 (F1=0.903). Epochs 6-7 regressed due to backbone LR drift (train loss spiked 2.96 → 5.81). load_best_model_at_end correctly restored epoch 5. Top types: biometric 0.996, url 0.994, email 0.991, ip_address 0.988 Weak types: pin, passport_number, tax_id, bank_account (rare, <0.70 F1) WandB: https://wandb.ai/datafog/huggingface/runs/pj8furkq Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent c43788b commit 1ebfb3e

3 files changed

Lines changed: 516 additions & 0 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Thumbs.db
2828
*.onnx
2929
*.safetensors
3030
wandb/
31+
output/
3132
outputs/
3233
checkpoints/
3334
runs/

pii-ner-v1/configs/rtx3090.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
model:
2+
backbone: microsoft/deberta-v3-xsmall
3+
char_embed_dim: 50
4+
char_vocab_size: 256
5+
char_cnn_filters: [50, 50, 50]
6+
char_cnn_widths: [3, 4, 5]
7+
max_char_len: 20
8+
dropout: 0.1
9+
10+
data:
11+
max_seq_len: 256
12+
val_ratio: 0.1
13+
test_ratio: 0.1
14+
seed: 42
15+
16+
training:
17+
epochs: 10
18+
batch_size: 8
19+
gradient_accumulation_steps: 4 # effective batch = 32
20+
lr_backbone: 2.0e-5
21+
lr_head: 1.0e-3
22+
warmup_ratio: 0.1
23+
weight_decay: 0.01
24+
eval_strategy: epoch
25+
save_strategy: epoch
26+
metric_for_best_model: overall_f1
27+
logging_steps: 50
28+
dataloader_num_workers: 4
29+
save_total_limit: 3
30+
output_dir: output
31+
run_name: pii-ner-v1-rtx3090
32+
33+
wandb:
34+
enabled: true
35+
project: datafog-pii-ner

0 commit comments

Comments
 (0)