Papers › LlamaDuo: LLMOps Pipeline for Seamless Migration from Service LLMs to Small-Scale Local LLMs

LlamaDuo: LLMOps Pipeline for Seamless Migration from Service LLMs to Small-Scale Local LLMs

24 Aug 2024arXiv:2408.13467archive 2025-07-28

Chansung Park, Juyong Jiang, Fan Wang, Sayak Paul, Jing Tang

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 automatically improved through additional fine-tuning using extra similar data generated by the service LLM. This multi-turn 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.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2408.13467")

Code

Syntology Ran 10 of 14 code samples harvested from 1 repository linked to this paper; 4 have no recorded run. Of those that ran: 10 ran with no contract checked.

By repository: official repository: 14 samples from 1 repository, 10 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

deep-diver/llamaduo officialmentioned in paperApache-2.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

14 samples harvested; 10 ran; 0 honoured the contract we drafted; 4 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

10ran
4unverified

Licence: 0 of the 14 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from deep-diver/llamaduo. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

call_service_llm deep-diver/llamaduo/src/gen/utils.py official repository ran Apache-2.0 (permissive) · 46b3bd49851e747b · report
cleanup_ds deep-diver/llamaduo/dataset_merge.py official repository ran Apache-2.0 (permissive) · 5b051bbcaa7714d9 · report
collage_as_dataset deep-diver/llamaduo/src/pipeline/synth_data_gen.py official repository ran Apache-2.0 (permissive) · 0ab58512e22ed49f · report
craft_prompt deep-diver/llamaduo/src/gen/async_generate_data_gemini.py official repository ran fingerprinted Apache-2.0 (permissive) · 966485e1f476ef37 · report
find_json_snippet deep-diver/llamaduo/src/gen/collate_as_datasets.py official repository ran Apache-2.0 (permissive) · 67e2dea755355a23 · report
format_response deep-diver/llamaduo/src/gen/collate_as_datasets.py official repository ran fingerprinted Apache-2.0 (permissive) · 5b706a41d8a78def · report
generate_async deep-diver/llamaduo/src/gen/gemini.py official repository ran Apache-2.0 (permissive) · 1067596b265450c1 · report
generate_text deep-diver/llamaduo/src/gen/async_generate_data_gemini.py official repository ran Apache-2.0 (permissive) · a1849d123c6ba549 · report
is_push_to_hf_hub_enabled deep-diver/llamaduo/utils.py official repository ran Apache-2.0 (permissive) · 5a05b366cd7e1ed8 · report
load_all_json_files deep-diver/llamaduo/src/gen/collate_as_datasets.py official repository ran fingerprinted Apache-2.0 (permissive) · a27454db22d18423 · report
gen_local_lm_responses deep-diver/llamaduo/src/pipeline/batch_inference.py official repository unverified Apache-2.0 (permissive) · f533d60c6a9bbd90 · report
gen_model_outputs deep-diver/llamaduo/src/gen/local_lm.py official repository unverified Apache-2.0 (permissive) · 433721422ea96a6b · report
get_model deep-diver/llamaduo/src/gen/local_lm.py official repository unverified Apache-2.0 (permissive) · 12e77bbcdff15306 · report
update_args deep-diver/llamaduo/utils.py official repository unverified Apache-2.0 (permissive) · d09622f684fbfbc1 · report

Tasks

Language ModelingLanguage ModellingSmall Language Model

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections