Understand Distributed Llama Architecture
mainDistributed Llama uses a cluster architecture to accelerate LLM inference via tensor parallelism over Ethernet. The system consists of two node types:
- Root Node: Responsible for loading model weights, forwarding them to workers, and synchronizing the neural network state. The root node also acts as a worker, processing its own slice of the network.
- Worker Node: Processes its own slice of the neural network. Workers do not require model configuration.
Key constraints:
- You must run on $2^n$ nodes (e.g., 1, 2, 4, 8...).
- The maximum number of nodes is limited by the number of KV heads in the model.
- The root node requires more RAM than worker nodes because it manages the model and synchronization.