[Model Runner V2] Enable batch-sharded sampling for GPT-OSS (#61257)

Co-authored-by: OpenAI Codex <codex@openai.com>
This commit is contained in:
Taimys
2026-10-14 10:11:11 -07:00
committed by GitHub
co-authored by OpenAI Codex
parent 89cab55086
commit 2c74fd1873
2 changed files with 118 additions and 37 deletions
+3
View File
@@ -1440,6 +1440,9 @@ class GptOssForCausalLM(
logits = self.logits_processor(self.lm_head, hidden_states)
return logits
def compute_logits_local(self, hidden_states: torch.Tensor) -> torch.Tensor:
return self.logits_processor(self.lm_head, hidden_states, skip_gather=True)
def load_weights(self, weights: Iterable[tuple[str, torch.Tensor]]) -> set[str]:
loader = AutoWeightsLoader(self)
return loader.load_weights(weights, mapper=self.hf_to_vllm_mapper)