Skip to content

Commit fc6ba07

Browse files
committed
update
Signed-off-by: Suguna Velury <178320438+sugunav14@users.noreply.github.com>
1 parent 4d1c1ff commit fc6ba07

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

modelopt/torch/utils/network.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -637,15 +637,7 @@ def unpatch_forward_method(module: nn.Module, orig_forward_cache_name: str):
637637

638638

639639
def get_decoder_layers(model: nn.Module, granularity: str = "decoder") -> nn.ModuleList | None:
640-
"""Get the decoder layers from a model for sequential calibration.
641-
642-
Args:
643-
model: The model to extract decoder layers from.
644-
granularity: The type of layers to extract. Currently only "decoder" is supported.
645-
646-
Returns:
647-
A ModuleList of decoder layers, or None if not found.
648-
"""
640+
"""Detect the decoder layers from a model for sequential calibration."""
649641
if granularity != "decoder":
650642
raise ValueError(f"Unsupported granularity: {granularity}. Only 'decoder' is supported.")
651643

0 commit comments

Comments
 (0)