[docs] Attention mask image (#36970)

add image
This commit is contained in:
Steven Liu
2025-03-26 10:11:34 -07:00
committed by GitHub
parent 2b550c47b2
commit 3a8ec8c467
4 changed files with 16 additions and 0 deletions

View File

@@ -116,6 +116,10 @@ visualizer = AttentionMaskVisualizer("huggyllama/llama-7b")
visualizer("Plants create energy through a process known as")
```
<div class="flex justify-center">
<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/llama-attn-mask.png"/>
</div>
## Notes
- The tokenizer is a byte-pair encoding model based on [SentencePiece](https://github.com/google/sentencepiece). During decoding, if the first token is the start of the word (for example, "Banana"), the tokenizer doesn't prepend the prefix space to the string.