Skip to content

Commit 7072dd6

Browse files
authored
Typo: Fix generate signature type hint for attention_backend
`attention_backend` is a SDPBackend, not a string
1 parent b2d8f2a commit 7072dd6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torchchat/generate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@ def generate(
685685
sequential_prefill=True,
686686
callback=lambda x: x,
687687
max_seq_length: int,
688-
attention_backend: str = "math",
688+
attention_backend: SDPBackend = torch.nn.attention.SDPBackend.MATH,
689689
seed: Optional[int] = None,
690690
**sampling_kwargs,
691691
) -> torch.Tensor:

0 commit comments

Comments
 (0)