[Mypy] Fix mypy typing for model interfaces and H/I models (#54079)

Signed-off-by: Taneem Ibrahim <taneem.ibrahim@gmail.com>
Co-authored-by: Wentao Ye <44945378+yewentao256@users.noreply.github.com>
This commit is contained in:
Taneem Ibrahim
2026-08-28 16:49:19 -04:00
committed by GitHub
co-authored by Wentao Ye
parent 74850f9f66
commit 21fa2c5a2a
23 changed files with 222 additions and 137 deletions
+2 -2
View File
@@ -248,7 +248,7 @@ class HrmTextDecoderLayer(nn.Module):
self,
config: PretrainedConfig,
layer_idx_in_stack: int,
stack_kind: str,
stack_kind: Literal["L", "H"],
cache_config: CacheConfig | None = None,
quant_config: QuantizationConfig | None = None,
prefix: str = "",
@@ -312,7 +312,7 @@ class HrmTextStack(nn.Module):
def __init__(
self,
config: PretrainedConfig,
stack_kind: str,
stack_kind: Literal["L", "H"],
cache_config: CacheConfig | None = None,
quant_config: QuantizationConfig | None = None,
prefix: str = "",