[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:
co-authored by
Claude Opus 5
parent
1085b64425
commit
651a88c09a
@@ -28,8 +28,7 @@ def _should_share(eagle: nn.Module, flag: str, draft, target) -> bool:
|
||||
|
||||
def get_target_lm_head(target_model: nn.Module, target_language_model: nn.Module):
|
||||
"""The target's lm_head — from get_language_model() for
|
||||
*ForConditionalGeneration targets, else the top-level module.
|
||||
"""
|
||||
*ForConditionalGeneration targets, else the top-level module."""
|
||||
return getattr(target_language_model, "lm_head", None) or getattr(
|
||||
target_model, "lm_head", None
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user