Skip to content

Commit cea1004

Browse files
lucylqrascani
authored andcommitted
Add support for exit layer (pytorch#18541)
Differential Revision: D96844228 Pull Request resolved: pytorch#18541
1 parent e79a11d commit cea1004

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

extension/llm/export/config/llm_config.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,10 +306,15 @@ class MethodConfig:
306306
Attributes:
307307
method_name: Name of the method to export.
308308
lora_config: Optional LoRA configuration.
309+
export_seq_len: Sequence length of example inputs used during
310+
torch.export tracing. Controls which graph path is captured, e.g.
311+
prefill vs decode, or for YOCO, where all layers run for decode
312+
but not prefill. When unset, uses the model's default input length.
309313
"""
310314

311315
method_name: str
312316
lora_config: Optional[LoraConfig] = None
317+
export_seq_len: Optional[int] = None
313318

314319

315320
@dataclass

0 commit comments

Comments
 (0)