Training は data から ML model に pattern を学ばせる process(parameter を調整する)で、inference は trained model を使って new data に prediction を行うことです。別々の phase であり、characteristics と cost が異なります。
Training vs inference
text
TRAINING → model を教える LEARNING phase:
→ lots of DATA を与え、model が parameters を調整して pattern を学ぶ
→ computationally EXPENSIVE (data, compute, time が大きい)
→ 一度、または update のため periodic に行う
→ trained MODEL を作る
INFERENCE → trained model を使う PREDICTION phase:
→ trained model に NEW input を与え、output (prediction/generation) を得る
→ training より CHEAPER/faster (single forward pass)
→ MANY times 実行される (model を使うたび)
→ train once (expensive), infer many times (cheaper, in production)
実務上の意味
text
→ TRAINING → research/development。big datasets, GPUs/TPUs, time が必要
→ INFERENCE → production use。latency, cost, scale を optimize
→ LLM API を使う → pre-trained model で INFERENCE している (自分で train していない)
→ scale では inference cost/latency が重要。training は大きな one-time investment
