Skip to content

Commit

Permalink
add tip
Browse files Browse the repository at this point in the history
  • Loading branch information
gante committed May 29, 2024
1 parent c95c07a commit ee9a498
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/source/en/llm_optims.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@ text
</hfoption>
</hfoptions>

> [!TIP]
> Regardless of the strategy used with `torch.compile`, through `forward` or [`~GenerationMixin.generate`], you can avoid shape-related recompilations if you left-pad your LLM inputs to a limited set of values. The [`pad_to_multiple_of` tokenizer flag](https://huggingface.co/docs/transformers/main_classes/tokenizer#transformers.PreTrainedTokenizer.__call__.pad_to_multiple_of) is your friend!
## Speculative decoding

> [!TIP]
Expand Down

0 comments on commit ee9a498

Please sign in to comment.