Effective LLM Knowledge Learning via Model Generalization