spb/forge-studio Public
The Instruments of LLM training — a native macOS cockpit for Forge. Train language models from scratch on Apple Silicon without a terminal.
Swift 95.7%
Shell 4.3%
1// Author: Simon-Pierre Boucher — contact@spboucher.ai2//3// One row of log.csv (RESEARCH.md §3). valLoss is nil when the CSV holds4// the -1 sentinel; elapsedS is nil for pre-elapsed_s runs (6-column header).5import Foundation67struct MetricPoint: Equatable, Sendable {8 var step: Int9 var trainLoss: Double10 var lr: Double11 var gradNorm: Double12 var tokensPerSec: Double13 var valLoss: Double?14 var elapsedS: Double?1516 var tokensSeen: (Int) -> Int { { tokensPerStep in (step + 1) * tokensPerStep } }17 var perplexity: Double { exp(trainLoss) }18}19