The paper introduces a novel approach called Large Language Model Distilling Medication Recommendation (LEADER) to enhance medication recommendation systems using large language models (LLMs). The main challenges addressed are the lack of semantic understanding in existing models and the difficulty in handling first-time patients without prescription history. LEADER employs prompt templates to enable LLMs to understand and recommend medications effectively. To address the out-of-corpus issue, a new output layer and refined tuning loss function are introduced. Additionally, a feature-level knowledge distillation technique is developed to transfer the LLM's capabilities to a more compact model, reducing inference costs. Extensive experiments on the MIMIC-III and MIMIC-IV datasets demonstrate that LEADER outperforms current baselines in both effectiveness and efficiency. The proposed method shows superior semantic understanding and single-visit recommendation capabilities, making it a promising solution for intelligent healthcare systems.The paper introduces a novel approach called Large Language Model Distilling Medication Recommendation (LEADER) to enhance medication recommendation systems using large language models (LLMs). The main challenges addressed are the lack of semantic understanding in existing models and the difficulty in handling first-time patients without prescription history. LEADER employs prompt templates to enable LLMs to understand and recommend medications effectively. To address the out-of-corpus issue, a new output layer and refined tuning loss function are introduced. Additionally, a feature-level knowledge distillation technique is developed to transfer the LLM's capabilities to a more compact model, reducing inference costs. Extensive experiments on the MIMIC-III and MIMIC-IV datasets demonstrate that LEADER outperforms current baselines in both effectiveness and efficiency. The proposed method shows superior semantic understanding and single-visit recommendation capabilities, making it a promising solution for intelligent healthcare systems.