MCPcopy Create free account
hub / github.com/FlashSampling/FlashSampling / verify_correctness_tp2

Function verify_correctness_tp2

src/fused_mm_sampling/testing.py:162–170  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

160 n_calls,
161 desc="Sampling batches",
162 disable=n_calls == 1,
163 ):
164 samples = sampler.sample(
165 weights=inputs.weights,
166 hidden_states=inputs.hidden_states,
167 num_samples=samples_per_call,
168 temperature=temperature,
169 tp=tp,
170 seed=tp.rank * num_samples + call_idx * samples_per_call,
171 )
172 flattened_sample_bins = (samples + sequence_offsets).flatten()
173 empirical_counts += torch.bincount(

Callers

nothing calls this directly

Calls 4

verify_greedy_tp2Function · 0.85
from_worldMethod · 0.80
rank0_printMethod · 0.80

Tested by

no test coverage detected