arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2601.08412cs.AI
收藏

混合指导的蒸馏用于边缘-无人机控制代码生成

Hybrid Distillation with CoT Guidance for Edge-Drone Control Code Generation

University of Technology of Troyes(特鲁瓦工业大学);North China Electric Power University(华北电力大学);Beihang University(北京航空航天大学)

Yizhan Feng, Hichem Snoussi, Yuhang Wang, Jing Teng, Abel Cherouat, Tian Wang

AI总结:

本文提出混合指导的蒸馏方法,通过知识蒸馏、思维链指导和监督微调,提升UAV多SDK控制任务的代码生成效率与准确性。

摘要:

随着大型语言模型在代码生成任务中展现出显著潜力,其在资源受限的无人驾驶航空器(UAV)上的应用已成为重要的研究方向。然而,大型模型的高资源消耗与UAV平台对实时、轻量级的要求之间存在明显矛盾。本文提出了一种综合方法,结合知识蒸馏、思维链指导和监督微调,用于UAV多SDK控制任务,旨在高效地将复杂的推理和代码生成能力转移到较小的模型上。首先,构建了一个涵盖各种主流UAV SDKs的高质量数据集,包含指令-代码-推理链,并结合反事实负样本进行数据增强,引导模型从指令解析到代码生成的端到端逻辑学习。其次,利用DeepSeek-Coder-V2-Lite经过QLoRA量化作为教师模型,基于混合黑盒和白盒蒸馏策略,生成高质量的思维链软标签。这些软标签与使用硬标签的加权交叉熵损失结合,将复杂的推理能力转移到较小的学生模型上。最后,通过针对UAV控制场景优化的提示调优工程,提高了模型在SDK类型识别和函数调用匹配等核心任务上的性能。实验结果表明,蒸馏后的轻量模型在保持高代码生成准确性的同时,实现了部署和推理效率的显著提升,有效证明了我们的方法在实现精确且轻量级智能控制方面的可行性和优越性。

英文摘要:

With large language models demonstrating significant potential in code generation tasks, their application to onboard control of resource-constrained Unmanned Aerial Vehicles has emerged as an important research direction. However, a notable contradiction exists between the high resource consumption of large models and the real-time, lightweight requirements of UAV platforms. This paper proposes an integrated approach that combines knowledge distillation, chain-of-thought guidance, and supervised fine-tuning for UAV multi-SDK control tasks, aiming to efficiently transfer complex reasoning and code generation capabilities to smaller models. Firstly, a high-quality dataset covering various mainstream UAV SDKs is constructed, featuring instruction-code-reasoning chains, and incorporates counterfactual negative samples for data augmentation, guiding the model to learn the end-to-end logic from instruction parsing to code generation. Secondly, leveraging DeepSeek-Coder-V2-Lite quantized via QLoRA as the teacher model, and based on a hybrid black-box and white-box distillation strategy, high-quality chain-of-thought soft labels are generated. These are combined with a weighted cross-entropy loss using hard labels to transfer complex reasoning capabilities to the smaller student model. Finally, through prompt tuning engineering optimized for the UAV control scenario, the model performance on core tasks such as SDK type recognition and function call matching is enhanced. Experimental results indicate that the distilled lightweight model maintains high code generation accuracy while achieving significant improvements in deployment and inference efficiency, effectively demonstrating the feasibility and superiority of our approach in achieving precise and lightweight intelligent control for UAVs

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑