SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2310.16355 · 2023

RedCoast: A Lightweight Tool to Automate Distributed Training of LLMs on Any GPU/TPUs

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 17 functions out of this paper's own repositories and ran 12 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
tanyuqian/redco canonical 12 of 17
FunctionStatusWhere it lives
add_idxes Ran tanyuqian/redco/redco/predictors/utils.py
code served (permissive licence) · get_code("7f7471520b9c1e90")
collate_fn_wrapper Ran tanyuqian/redco/redco/predictors/utils.py
code served (permissive licence) · get_code("ea2c12ce7fd1ec53")
get_data_batches Ran tanyuqian/redco/redco/deployers/data_utils.py
code served (permissive licence) · get_code("12b3e76802e87387")
get_dataloader Ran tanyuqian/redco/redco/deployers/data_utils.py
code served (permissive licence) · get_code("d0f722215b22ccd3")
get_dtype Ran tanyuqian/redco/redco/deployers/ckpt_utils.py
code served (permissive licence) · get_code("10a72bd31f42a074")
get_host_examples Ran tanyuqian/redco/redco/deployers/data_utils.py
code served (permissive licence) · get_code("957b81e4437fbde6")
get_logger Ran tanyuqian/redco/redco/deployers/log_utils.py
code served (permissive licence) · get_code("1879d59e1c180941")
get_lr_schedule_fn Ran tanyuqian/redco/redco/deployers/opt_utils.py
code served (permissive licence) · get_code("2688afb7a47925ea")
load_params_shape Ran tanyuqian/redco/redco/deployers/ckpt_utils.py
code served (permissive licence) · get_code("2e474ceda07a5811")
pred_fn_wrapper Ran tanyuqian/redco/redco/predictors/utils.py
code served (permissive licence) · get_code("546098c0795323a5")
save_outputs Ran tanyuqian/redco/redco/deployers/log_utils.py
code served (permissive licence) · get_code("f66310247f3da124")
set_partitions Ran tanyuqian/redco/redco/deployers/partition_utils.py
code served (permissive licence) · get_code("0e68538ba4cd72e2")
default_train_step Not yet run tanyuqian/redco/redco/trainers/utils.py
code served (permissive licence) · get_code("89d887e9e94260f0")
eval_step Not yet run tanyuqian/redco/redco/trainers/utils.py
code served (permissive licence) · get_code("4925175b59c41e2d")
get_mesh Not yet run tanyuqian/redco/redco/deployers/partition_utils.py
code served (permissive licence) · get_code("9d2ee7610dbfcffd")
get_params_spec Not yet run tanyuqian/redco/redco/deployers/partition_utils.py
code served (permissive licence) · get_code("90b07cf07631b623")
load_ckpt Not yet run tanyuqian/redco/redco/deployers/ckpt_utils.py
code served (permissive licence) · get_code("dd029e53ad532a38")

Repositories linked to this paper

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

Abstract

The recent progress of AI can be largely attributed to large language models (LLMs). However, their escalating memory requirements introduce challenges for machine learning (ML) researchers and engineers. Addressing this requires developers to partition a large model to distribute it across multiple GPUs or TPUs. This necessitates considerable coding and intricate configuration efforts with existing model parallel tools, such as Megatron-LM, DeepSpeed, and Alpa. These tools require users' expertise in machine learning systems (MLSys), creating a bottleneck in LLM development, particularly for developers without MLSys background. In this work, we present RedCoast (Redco), a lightweight and user-friendly tool crafted to automate distributed training and inference for LLMs, as well as to simplify ML pipeline development. The design of Redco emphasizes two key aspects. Firstly, to automate model parallelism, our study identifies two straightforward rules to generate tensor parallel strategies for any given LLM. Integrating these rules into Redco facilitates effortless distributed LLM training and inference, eliminating the need of additional coding or complex configurations. We demonstrate the effectiveness by applying Redco on a set of LLM architectures, such as GPT-J, LLaMA, T5, and OPT, up to the size of 66B. Secondly, we propose a mechanism that allows for the customization of diverse ML pipelines through the definition of merely three functions, avoiding redundant and formulaic code like multi-host related processing. This mechanism proves adaptable across a spectrum of ML algorithms, from foundational language modeling to complex algorithms like meta-learning and reinforcement learning. As a result, Redco implementations exhibit significantly fewer lines of code compared to their official counterparts.

For agents

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

get_harvested_code_for_paper("2310.16355")
get_code_for_paper("2310.16355")
have("2310.16355")

Connect an agent — have() is free.