[AuxOutput] Add block-keyed storage for routed-expert outputs (#45635)
Signed-off-by: aoshen02 <aoshen@inferact.ai> Signed-off-by: Nick Hill <nickhill123@gmail.com> Co-authored-by: aoshen02 <aoshen@inferact.ai> Co-authored-by: OpenAI Codex <codex@openai.com> Co-authored-by: Roger Wang <hey@rogerw.io> Co-authored-by: Nick Hill <nickhill123@gmail.com> Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
co-authored by
aoshen02
OpenAI Codex
Roger Wang
Nick Hill
Codex
parent
0aee727ff6
commit
0b7f11a1ee
@@ -617,8 +617,6 @@ def gather_sampler_output(
|
||||
device=device,
|
||||
)
|
||||
if local_output is not None:
|
||||
assert local_output.num_sampled is not None
|
||||
assert local_output.num_rejected is not None
|
||||
assert not gather_num_nans or local_output.num_nans is not None
|
||||
num_src_cols = min(
|
||||
local_output.sampled_token_ids.shape[1], max_num_logits_per_req
|
||||
|
||||
@@ -17,8 +17,8 @@ class SamplerOutput:
|
||||
sampled_token_ids: torch.Tensor
|
||||
logprobs_tensors: LogprobsTensors | None
|
||||
num_nans: torch.Tensor | None
|
||||
num_sampled: torch.Tensor | None
|
||||
num_rejected: torch.Tensor | None = None
|
||||
num_sampled: torch.Tensor
|
||||
num_rejected: torch.Tensor
|
||||
sampling_mask_tensors: SamplingMaskTensors | None = None
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user