[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("meta-llama/Llama-2-7b-hf")
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-2-attn-mask.png"/>
</div>
## Notes
- Setting `config.pretraining_tp` to a value besides `1` activates a more accurate but slower computation of the linear layers. This matches the original logits better.