Add pydocstyle to the ruff rules (#52136)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Signed-off-by: Harry Mellor <hej.mellor@gmail.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
804e5377aa
commit
8c1557a79c
@@ -67,6 +67,7 @@ def compute_skip_topk_layers(config: PretrainedConfig) -> set[int]:
|
||||
Raises:
|
||||
ValueError: If ``indexer_types`` has the wrong length or an unknown
|
||||
entry, or if ``index_topk_freq`` is not a positive integer.
|
||||
|
||||
"""
|
||||
if not hasattr(config, "index_topk"):
|
||||
return set()
|
||||
@@ -115,6 +116,7 @@ def is_skip_topk_indexer_weight(weight_name: str, skip_topk_layers: set[int]) ->
|
||||
Returns:
|
||||
True when the weight is an indexer weight of a layer that has no
|
||||
indexer module and therefore must be dropped.
|
||||
|
||||
"""
|
||||
if ".indexer." not in weight_name or not skip_topk_layers:
|
||||
return False
|
||||
@@ -557,6 +559,7 @@ class HYV4MLAAttention(nn.Module):
|
||||
The backend class to bind, or None when no sink-capable backend is
|
||||
available; the caller then loads the sink weight but disables the
|
||||
bias.
|
||||
|
||||
"""
|
||||
head_size = self.kv_lora_rank + self.qk_rope_head_dim
|
||||
dtype = torch.get_default_dtype()
|
||||
|
||||
Reference in New Issue
Block a user