Speed up docs build (#44635)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
Harry Mellor
2026-06-05 14:51:44 +00:00
committed by GitHub
parent c66b19800b
commit a80af24356
32 changed files with 234 additions and 159 deletions
+15 -12
View File
@@ -1878,9 +1878,8 @@ class GPUModelRunner(
SpecDecodeMetadata | None,
]:
"""
:return: tuple[
logits_indices, spec_decode_metadata,
]
Returns:
tuple[logits_indices, spec_decode_metadata]
"""
total_num_scheduled_tokens = scheduler_output.total_num_scheduled_tokens
assert total_num_scheduled_tokens > 0
@@ -2205,7 +2204,8 @@ class GPUModelRunner(
slot_mappings: dict[int, torch.Tensor] | None = None,
) -> tuple[PerLayerAttnMetadata, CommonAttentionMetadata | None]:
"""
:return: tuple[attn_metadata, spec_decode_common_attn_metadata]
Returns:
tuple[attn_metadata, spec_decode_common_attn_metadata]
"""
# Attention metadata is not needed for attention free models
if len(self.kv_cache_config.kv_cache_groups) == 0:
@@ -2503,9 +2503,11 @@ class GPUModelRunner(
num_common_prefix_blocks: list[int],
) -> list[list[int]] | None:
"""
:return: Optional[cascade_attn_prefix_lens]
cascade_attn_prefix_lens is 2D: ``[kv_cache_group_id][attn_group_idx]``,
None if we should not use cascade attention
Returns:
Optional[cascade_attn_prefix_lens]
cascade_attn_prefix_lens is 2D:
``[kv_cache_group_id][attn_group_idx]``,
None if we should not use cascade attention
"""
use_cascade_attn = False
@@ -5324,11 +5326,12 @@ class GPUModelRunner(
"""
Reload weights from a weights iterator or from disk
:param weights_iterator: weights to load into model
:param weights_path: path to load weights from if weights_iterator is not
provided. Use path of original model if neither is provided.
:param is_checkpoint_format: set to False if weights have already been processed
into kernel format (repacking, renaming, etc.)
Args:
weights_iterator: weights to load into model
weights_path: path to load weights from if weights_iterator is not
provided. Use path of original model if neither is provided.
is_checkpoint_format: set to False if weights have already been
processed into kernel format (repacking, renaming, etc.)
"""
# TODO(@kylesayrs): generalize to all runners and loaders
# argument validation