MCPcopy Index your code
hub / github.com/FlashSampling/FlashSampling / _allgather_logits

Function _allgather_logits

src/fused_mm_sampling/core.py:77–81  ·  view source on GitHub ↗

All-gather local logits along the vocab dimension to reconstruct [H, V_global].

(
    logits: torch.Tensor,  # [H, V_local]
)

Source from the content-addressed store, hash-verified

75
76
77def _allgather_logits(
78 logits: torch.Tensor, # [H, V_local]
79) -> torch.Tensor:
80 """All-gather local logits along the vocab dimension to reconstruct [H, V_global]."""
81 return all_gather_tensor(logits, gather_dim=1, group=dist.group.WORLD)
82
83
84def apply_top_k_top_p(

Callers 4

sampleFunction · 0.85
greedy_sampleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected