Bridging the Training-Inference Gap in LLMs by Leveraging Self-Generated Tokens