[CI] Ignore ruff D209, rejoin the docstrings it split, and silence incompatible-rule warnings (#57212)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Harry Mellor
2026-09-16 10:57:24 -07:00
committed by GitHub
co-authored by Claude Opus 5
parent 1085b64425
commit 651a88c09a
693 changed files with 2088 additions and 4171 deletions
+1 -2
View File
@@ -72,8 +72,7 @@ def _sconv_add_norm(
ROCm uses the portable collective path. The Lamport P2P implementation in
the NVIDIA model relies on CUDA GDC and CUDA-specific symmetric-memory
publication semantics which cannot be linked into a gfx950 HSACO.
"""
publication semantics which cannot be linked into a gfx950 HSACO."""
norm_w = norm.weight if norm is not None else None
eps = norm.variance_epsilon if norm is not None else 0.0
+3 -6
View File
@@ -192,8 +192,7 @@ def inkling_gate_select(
class InklingGate(nn.Module):
"""Sigmoid gate with selection bias, log-sigmoid renorm after top-k, and
global scale (the served checkpoint's only configuration).
"""
global scale (the served checkpoint's only configuration)."""
def __init__(
self,
@@ -247,8 +246,7 @@ class InklingGate(nn.Module):
self, gating_output: torch.Tensor
) -> tuple[torch.Tensor, torch.Tensor]:
"""Full selection: (weights, ids) of [T, K + S]. The first K entries
are the routed top-k; the S trailing entries are the sink gammas.
"""
are the routed top-k; the S trailing entries are the sink gammas."""
return inkling_gate_select(
gating_output,
self.n_total_experts,
@@ -269,8 +267,7 @@ class InklingGate(nn.Module):
def _inkling_moe_ep_size() -> int:
"""EP size the MoERunner layer will run with (mirrors
FusedMoEParallelConfig.make: experts shard over tp * dp * pcp when
expert parallelism is enabled).
"""
expert parallelism is enabled)."""
parallel_config = get_current_vllm_config().parallel_config
if not parallel_config.enable_expert_parallel:
return 1
+3 -6
View File
@@ -166,8 +166,7 @@ class InklingMultiTokenPredictor(nn.Module):
) -> torch.Tensor:
"""Draft-prefill embedding: fused gather + backbone embed_norm, then
the target's tower embeddings scattered in unnormed (the backbone
convention — MM embeds are merged after embed_norm).
"""
convention — MM embeds are merged after embed_norm)."""
norm = self.backbone_embed_norm
embeds = embed_rmsnorm(
input_ids,
@@ -196,8 +195,7 @@ class InklingMultiTokenPredictor(nn.Module):
"""The depth layer's [rmsnorm(hidden) | embed_norm(embed)] input in one
launch: embedding row gather + the backbone embed_norm + the depth
embed_norm chain on one side, hidden_norm on the other, written
straight into the cat buffer.
"""
straight into the cat buffer."""
hidden_w = layer.hidden_norm.weight
embed_w = layer.embed_norm.weight
eps = layer.hidden_norm.variance_epsilon
@@ -329,8 +327,7 @@ class InklingMTP(nn.Module, SupportsMultiModalEmbeddings):
"""Greedy draft tokens via rank-local argmax + tiny (value, index)
reduction — no full-vocab logits all-gather. The muP divisor is a
positive scalar, so the argmax is invariant and the scaling is
skipped entirely.
"""
skipped entirely."""
return self.logits_processor.get_top_tokens(self.lm_head, hidden_states)
def load_weights(self, weights: Iterable[tuple[str, torch.Tensor]]) -> set[str]:
+2 -4
View File
@@ -238,8 +238,7 @@ def embed_rmsnorm(
embedding-table gather.
``chain_weight`` additionally emits ``rmsnorm(out, chain_weight)`` (the
first decoder layer's pre-attention norm) as a second output, still one
launch. Bit-exact vs the unfused module sequence.
"""
launch. Bit-exact vs the unfused module sequence."""
ids = input_ids.view(-1)
(T,) = ids.shape
n = embed_table.shape[1]
@@ -333,8 +332,7 @@ def embed_dual_rmsnorm_cat(
(draft decode steps) or precomputed ``embeds`` ([T, N], the target-merged
multimodal embeddings at draft prefill); ``pre_norm_weight`` chains the
backbone embed_norm in front of the depth embed_norm (bit-exact vs the
unfused sequence). The concat copies collapse into direct writes.
"""
unfused sequence). The concat copies collapse into direct writes."""
T, n = hidden.shape
if embeds is not None:
assert embeds.shape == hidden.shape