+86-075528689192

Calculate the number of AI Transceiver using the LLaMa 65B model training example

Calculate the number of AI Transceiver using the LLaMa 65B model training example


Most articles on the Internet calculate the number of optical modules based on the network architecture planned by the equipment manufacturer. Today, Dachengpeng Communications uses the LLaMa65B model training example to calculate the number of optical modules and explain how to calculate the optical modules corresponding to the network architecture required by the AI training model. The training model in this article is LLaMa 65B, and the GPU used is A100, with 2048 modules.

Computing power calculation:

① The calculation formula for the computing power supply of a single GPU is: Single GPU computing power supply (A) = number of GPU cores * single core main frequency * single cycle floating point computing capability. (This parameter is generally given directly by the GPU manufacturer)

② The calculation formula for the computing power requirement of a single model is: Single model computing power requirement (C) = 6 * number of model parameters * number of tokens in the training data.

③Estimate training time: T=C/(X*A). X is the number of GPUs.

Combined with our case:

① The computing power supply of a single GPU A100: In BF16 floating point format (training accuracy, which can be selected), the computing power is 312TFLOPS. That is, the computing power supply of a single GPU (A) = 312 TFLOPS = 312*10^12FLOPS

In practical applications, training efficiency should be considered: the actual utilization rate of A100 is about 50%, and based on this, the computing power of a single A100 is calculated as A=312*10^12FLOPS *0.5=156*10^12FLOPS

② Using the LLaMa 65B model as an example to estimate the computing power demand

The computing power requirement of the 65B model is: C=6*65B*1.4T=6*65*10^9*1.4*10^12=546*10^21

③Estimate training time: Set the number of GPUs to 2048, T=C/(2048*A) =546*10^21/(2048*156*10^12)=1708984.375 seconds≈20 days.

Network Planning:

① Network architecture calculation:

IB networking usually adopts non-blocking network design, the key is to use Fat-Tree network architecture. The bandwidth of the switch downstream and upstream is designed with 1:1 non-convergence, that is, if the downstream has 32 400Gbps ports, then the upstream also has 32 400Gbps ports.

The most important difference between a two-layer fat tree and a three-layer fat tree is the size of the GPU cards they can accommodate. In the figure below, N represents the size of the GPU card, and P represents the number of ports on a single switch. For example, for a switch with 64 ports, the number of GPU cards that can be accommodated by a two-layer fat tree architecture is 2048 cards, and the number of GPU cards that can be accommodated by a three-layer fat tree architecture is 65,535 cards.

At present, combined with the calculation of the computing power in the first part, we use the LLaMa 65B model and the A100 GPU for calculation. The training time is 20 days and the number of GPUs is 2048. Then, a two-layer Fat-Tree network structure can meet the needs.

② Network card and optical module calculation:

A single A100 GPU supports PCIExpress 4.0, with a maximum transmission bandwidth of 32GB/s = 256Gb/s. If a single server has two GPUs, a 400G IB network card (CX-7) can be selected for transmission.

Therefore, the number of GPU cards: the number of 400G network cards = 2:1.

In this case, there are 2048 GPUs and 1024 network cards. The planning here should be based on the network card data. NVDIA MQM9700 series switches are used, and each switch has a total of 64 400G ports. The network convergence ratio is 1:1.

1. Number of switches: Use 1024÷32=32 to calculate the number of leaf switches; 32÷2=16 to calculate the number of leaf switches, a total of 48.

2. If all 400G optical modules are used for interconnection: 48*64+1024=4096

3. If the 400G optical modules used for switch interconnection are 32x32+64*16=2048, because each pair uses 2 MPO cables, the number of cables is 2048; the 400G AOC used for switch and network card interconnection is 1024.


Prodcuts                       Solutions                   Serviece                     Support                     Company
Moving Data Into The Future, Faster
News & Articles

Product Manual

User Manual

MSA Protocol

White Paper


Competitiveness

Certificates

AI DataCenter

5G Fronthaul

Metro-Area

Immersion Liquid Cooling
Welcome to subscribe!
Email
*
Submit