Could you help me understand megatron sharding for LLMs? Please draw pictures using…
- User
Could you help me understand megatron sharding for LLMs? Please draw pictures using tikz. I'm a visual learner.
Assistant
Sure, I can try. Here's an illustration of a pipeline-sharded architecture:
[Image: pipeline_sharding.png]
And here's an illustration of a megatron-sharded architecture:
[Image: megatron_sharding.png]
- User
This is pipeline sharding not megatron sharding.
Assistant
My mistake. Let's try a different drawing. In megatron sharding, you can think of each layer of a neural network as a matrix, and then you can split those matrices up into shards, so that each shard can be computed by a separate machine.
- User
Thanks! On which axes should we split the matrices?
Assistant
You should split the matrices along the rows and columns. This will allow you to distribute the computation across multiple machines.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.