The widespread adoption of cloud-based proprietary large language models (LLMs) has introduced significant challenges, including operational dependencies, privacy concerns, and the necessity of continuous internet connectivity. In this work, we introduce an LLMOps pipeline, "LlamaDuo", for the seamless migration of knowledge and abilities from service-oriented LLMs to smaller, locally manageable models. This pipeline is crucial for ensuring service continuity in the presence of operational failures, strict privacy policies, or offline requirements. Our LlamaDuo involves fine-tuning a small language model against the service LLM using a synthetic dataset generated by the latter. If the performance of the fine-tuned model falls short of expectations, it is enhanced by further fine-tuning with additional similar data created by the service LLM. This iterative process guarantees that the smaller model can eventually match or even surpass the service LLM's capabilities in specific downstream tasks, offering a practical and scalable solution for managing AI deployments in constrained environments. Extensive experiments with leading edge LLMs are conducted to demonstrate the effectiveness, adaptability, and affordability of LlamaDuo across various downstream tasks. Our pipeline implementation is available at https://github.com/deep-diver/llamaduo.
翻译:基于云的专有大语言模型的广泛采用带来了重大挑战,包括运营依赖性、隐私问题以及持续互联网连接的必要性。本文介绍了一种名为"LlamaDuo"的LLMOps流程,用于将知识及能力从服务导向的大语言模型无缝迁移至更小、可在本地管理的模型。该流程对于确保在运营故障、严格隐私政策或离线需求情况下的服务连续性至关重要。我们的LlamaDuo流程涉及使用服务型大语言模型生成的合成数据集对一个小型语言模型进行微调。若微调后的模型性能未达预期,则通过使用服务型大语言模型创建的额外相似数据进行进一步微调来增强其能力。此迭代过程保证了小型模型最终能够在特定下游任务中匹配甚至超越服务型大语言模型的能力,为在受限环境中管理人工智能部署提供了一个实用且可扩展的解决方案。我们通过对前沿大语言模型进行广泛实验,证明了LlamaDuo在各种下游任务中的有效性、适应性和经济性。我们的流程实现可在https://github.com/deep-diver/llamaduo获取。