Training-Inference Mismatch - Day 4

Beginners are often focused on what to do, whereas they should focus on how much they do. ― Andrej Karpathy

TL;DR - I recapped what I learned over the past week by active retrieval; without the help of AI.

Training-Inference Mismatch

Reinforcement learning infrastructure has two runtimes, the trainer and the rollout engine. The rollout engine generates trajectories which are used by the trainer to train the policy. In a setup intended to be on-policy, even when both runtimes use the same model parameters, the selected token logprobs conditioned on the same token prefix can still be different due to different execution paths (e.g., reduction order).

Let

We define

Then, we compare the two runtimes under the following preconditions:

A token-level training-inference mismatch problem is observed when:

logπθ(at ∣ ht)≠logμθ(at ∣ ht)log\pi_{\theta}(a_t\ |\ h_t) \neq log\mu_{\theta}(a_t\ |\ h_t)

Pitfalls

Sick for three days, and now I’m back.

I spent some time pondering if excessive cognitive offload to AI could cause distraction, progressive decline in recall, and lack of critical thinking. This is actually based on what I observed in myself over the past month, not a mere speculation. For now, I’m trying to shape my ChatGPT into an examiner in Socratic / adversarial mode, forcing myself to bring back essential skills, including critical thinking, sustained reasoning, repeated retrieval (recall), original writing, and self-explanation combined with Feynman technique. This has been imported into my custom instructions. We’ll see!

All contents above are written without AI.