MCPcopy Index your code
hub / github.com/AIS-SNU/Smart-Infinity

github.com/AIS-SNU/Smart-Infinity @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
5,613 symbols 17,577 edges 524 files 1,276 documented · 23%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

[HPCA'24] Smart-Infinity: Fast Large Language Model Training using Near-Storage Processing on a Real System

We identify that moving parameter updates to the storage side removes most of the storage traffic. In addition, we propose an efficient data transfer handler structure to address the system integration issues for Smart-Infinity. The handler allows overlapping data transfers with fixed memory consumption by reusing the device buffer. Lastly, we propose accelerator-assisted gradient compression/decompression to enhance the scalability of Smart-Infinity. As a result, Smart-Infinity achieves a significant speedup compared to the baseline.

Motivation

The Large Language Models (LLMs) is mainly driven by the increase in the number of parameters. This has led to substantial memory capacity requirements, necessitating the use of dozens of GPUs just to meet the capacity. One popular solution to this is storage-offloaded training, which uses host memory and storage as an extended memory hierarchy. However, this obviously comes at the cost of storage bandwidth bottleneck because storage devices have orders of magnitude lower bandwidth compared to that of GPU device memories. Our work, Smart-Infinity, addresses the storage bandwidth bottleneck of storage-offloaded LLM training using near-storage processing devices on a real system.


📰 News

  • 🐝 [24/03] Smart-Infinity received Best-paper honorable methioned at HPCA'24.

Content

Codebases

  • DeepSpeedExamples (https://github.com/microsoft/DeepSpeedExamples)

  • DeepSpeed (https://github.com/microsoft/DeepSpeed)

  • Xilinx Vitis Tutorials (https://docs.xilinx.com/v/u/en-US/UG1605-vitis-tutorials)

Setups

Hardware

NVIDIA RTX A100-GPU (40GB) server with 2x 48-core Intel Xeon(R) Gold 6342 CPU and 32*32GB of DDR4 RAM, Samsung SmartSSD.

Operating System

Ubutun 20.04 with Linux kernel 5.4.0-156

Software

CUDA 11.6, PyTorch 1.12.1

Overall Steps

1. See setup

The setup folder contains how to install mandatory libararies and configurations of our work. The setup can be changed when the experimental setup is different.

2. See hls_smartInfinity

Our main contribution is performing parameter update in CSD, so device binary file for FPGA is needed. hls_smartInfinity folder contains how to make binary file for parameter update, the result of the process is single binary file in the designated folder.

3. Run training

After all the setups are prepared, you can get started with run_smartinfinity.sh as a entry file of our work.

Some Tips

We recommend not to use docker because P2P direct communication feature of Xilinx FPGA seems to not properly work in container.

See DeepSpeedExample/example/ds_zero_stage_infinity-nvme.json for important hyperparameters for using SmartInfinity.

Core symbols most depended-on inside this repo

append
called by 590
deepspeed/utils/comms_logging.py
size
called by 447
deepspeed/runtime/data_pipeline/data_sampling/indexed_dataset.py
get_accelerator
called by 334
deepspeed/accelerator/real_accelerator.py
data_ptr
called by 277
deepspeed/ops/csrc/aio/py_lib/deepspeed_aio_thread.cpp
numel
called by 272
deepspeed/runtime/swap_tensor/optimizer_utils.py
append
called by 241
DeepSpeedExample/megatron/deprecated_data_utils/tokenization.py
get_scalar_param
called by 156
deepspeed/runtime/config_utils.py
get_rank
called by 148
deepspeed/comm/torch.py

Shape

Method 3,419
Function 1,570
Class 617
Enum 7

Languages

Python89%
C++11%

Modules by API surface

deepspeed/runtime/engine.py226 symbols
deepspeed/runtime/zero/stage3.py136 symbols
deepspeed/runtime/zero/stage_1_and_2.py122 symbols
DeepSpeedExample/megatron/deprecated_data_utils/tokenization.py96 symbols
deepspeed/runtime/zero/partition_parameters.py91 symbols
deepspeed/runtime/config.py77 symbols
deepspeed/runtime/data_pipeline/data_sampling/indexed_dataset.py76 symbols
DeepSpeedExample/megatron/data/indexed_dataset.py71 symbols
deepspeed/profiling/flops_profiler/profiler.py69 symbols
DeepSpeedExample/megatron/deprecated_data_utils/datasets.py66 symbols
deepspeed/compression/basic_layer.py64 symbols
DeepSpeedExample/megatron/core/parallel_state.py59 symbols

For agents

$ claude mcp add Smart-Infinity \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact