Package smile.llm.parallel
package smile.llm.parallel
Tensor / pipeline / data-parallel primitives for LLM inference.
Phase 1 provides in-process tensor parallelism (TensorParallelGroup,
column/row-parallel linears). Pipeline axes on ParallelConfig /
ParallelState are reserved for multi-node PP.
-
ClassDescriptionMegatron-style column-parallel linear: shards
out_featuresacross TP ranks.Maps logical mesh coordinates to CUDA devices (phase 1) or process ranks (phase 2 multi-node).Process-mesh configuration for tensor / pipeline / data parallelism.Per-rank view of aParallelConfigmesh.Megatron-style row-parallel linear: shardsin_featuresacross TP ranks.Single-process tensor-parallel group: oneParallelStateand CUDA device per TP rank, plus NCCL (or peer-copy fallback) collectives.Local shard sizes for a dense decoder under tensor parallelism.Slices full (unsharded) HuggingFace / Meta weights into the local TP shard.