Problem
trainer.py:674-677 rewrites the entire JSON training log on every step. With 1000 steps, the file grows continuously and the O(N) full rewrite becomes slow.
Proposed Fix
Switch to JSONL (one JSON line per entry, append-only) which is O(1) per write and easier to process with streaming tools.