SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2411.10606 · NeurIPS · 2024

AmoebaLLM: Constructing Any-Shape Large Language Models for Efficient and Instant Deployment

Yongan Zhang, Yonggan Fu, Zhongzhi Yu, Celine Lin, Dachuan Shi, Junwei Li, Jiayi Qian, Xiangchi Yuan, Roman Yakunin

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 13 functions out of this paper's own repositories and ran 6 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
GATECH-EIC/AmoebaLLM canonical 6 of 13
FunctionStatusWhere it lives
get_config_class_from_processor_class Ran GATECH-EIC/AmoebaLLM/transformers/utils/create_dummy_models.py
code served (permissive licence) · get_code("3d999b95009c7537")
get_processor_types_from_config_class Ran GATECH-EIC/AmoebaLLM/transformers/utils/create_dummy_models.py
code served (permissive licence) · get_code("0c0b81b081919d8e")
get_wikitext2 Ran GATECH-EIC/AmoebaLLM/width_shrink/data.py
code served (permissive licence) · get_code("dee8be97b2cf4692")
hash_args Ran GATECH-EIC/AmoebaLLM/lm-evaluation-harness/lm_eval/api/model.py
code served (permissive licence) · get_code("20a7cc804eb22661")
parse_eval_args Ran GATECH-EIC/AmoebaLLM/lm-evaluation-harness/lm_eval/__main__.py
code served (permissive licence) · get_code("400ea4f64ccce5ef")
request_caching_arg_to_dict Ran GATECH-EIC/AmoebaLLM/lm-evaluation-harness/lm_eval/evaluator.py
code served (permissive licence) · get_code("c44830a7722ff5f7")
batch_split Not yet run GATECH-EIC/AmoebaLLM/eval_func.py
code served (permissive licence) · get_code("3bf1c3c00271897f")
compute_metrics Not yet run GATECH-EIC/AmoebaLLM/eval_func.py
code served (permissive licence) · get_code("89809a6f227449c9")
get_architectures_from_config_class Not yet run GATECH-EIC/AmoebaLLM/transformers/utils/create_dummy_models.py
code served (permissive licence) · get_code("b176efb26f72e507")
get_c4 Not yet run GATECH-EIC/AmoebaLLM/width_shrink/data.py
code served (permissive licence) · get_code("7630a157a3b32ab9")
get_loaders Not yet run GATECH-EIC/AmoebaLLM/width_shrink/data.py
code served (permissive licence) · get_code("16994008353af958")
prepare_calibration_input Not yet run GATECH-EIC/AmoebaLLM/width_shrink/prune.py
code served (permissive licence) · get_code("a5c450766875733e")
prepare_input Not yet run GATECH-EIC/AmoebaLLM/eval_func.py
code served (permissive licence) · get_code("5dc37098fd3e0e07")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Motivated by the transformative capabilities of large language models (LLMs) across various natural language tasks, there has been a growing demand to deploy these models effectively across diverse real-world applications and platforms. However, the challenge of efficiently deploying LLMs has become increasingly pronounced due to the varying application-specific performance requirements and the rapid evolution of computational platforms, which feature diverse resource constraints and deployment flows. These varying requirements necessitate LLMs that can adapt their structures (depth and width) for optimal efficiency across different platforms and application specifications. To address this critical gap, we propose AmoebaLLM, a novel framework designed to enable the instant derivation of LLM subnets of arbitrary shapes, which achieve the accuracyefficiency frontier and can be extracted immediately after a one-time fine-tuning. In this way, AmoebaLLM significantly facilitates rapid deployment tailored to various platforms and applications. Specifically, AmoebaLLM integrates three innovative components: (1) a knowledge-preserving subnet selection strategy that features a dynamic-programming approach for depth shrinking and an importancedriven method for width shrinking; (2) a shape-aware mixture of LoRAs to mitigate gradient conflicts among subnets during fine-tuning; and (3) an in-place distillation scheme with loss-magnitude balancing as the fine-tuning objective. Extensive experiments validate that AmoebaLLM not only sets new standards in LLM adaptability but also successfully delivers subnets that achieve stateof-the-art trade-offs between accuracy and efficiency. Our code is available at https://github.com/GATECH-EIC/AmoebaLLM.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2411.10606")
get_code_for_paper("2411.10606")
have("2411.10606")

Connect an agent — have() is free.