Skip to content

Commit

Permalink
Typo: Fix generate signature type hint for attention_backend (#1471)
Browse files Browse the repository at this point in the history
`attention_backend` is a SDPBackend, not a string
  • Loading branch information
Jack-Khuu authored Jan 22, 2025
1 parent b2d8f2a commit 025d412
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torchchat/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ def generate(
sequential_prefill=True,
callback=lambda x: x,
max_seq_length: int,
attention_backend: str = "math",
attention_backend: SDPBackend = torch.nn.attention.SDPBackend.MATH,
seed: Optional[int] = None,
**sampling_kwargs,
) -> torch.Tensor:
Expand Down

0 comments on commit 025d412

Please sign in to comment.