mirror of
https://github.com/deepseek-ai/DeepInfer.git
synced 2026-10-28 23:07:09 +08:00
With a CP group running one replicated batch (DEEPINFER_NEURON_TP_ATTN, on when cp > 1), each rank keeps its heads' rows of q_b, its groups' slice of wv (or its heads' columns of one group), the matching out_proj columns and its attention-sink entries; _wv_and_o_proj all-reduces the partial outputs over the group (exact: wv and out_proj are linear in the heads; asserts no clamp). Q-a / KV / indexer / compressor stay replicated. Host tiny (8 heads, 2 groups): cp=2 (1 group a rank), cp=4 (2 heads of a group), cp=8 (1 head) all give the golden tokens up to near ties. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| eplb | ||
| input_metadata | ||
| layers | ||
| models | ||
| parallel_utils | ||
| __init__.py | ||
| layer_utils.py | ||
| model_loader.py | ||
| model_metadata_utils.py | ||
| model_output.py | ||
| sampling_inputs.py | ||
| utils.py | ||