fix typos in the docs directory (#36639)
* chore: fix typos in the docs directory * chore: fix typos in the docs directory * chore: fix typos in the docs directory
This commit is contained in:
@@ -36,7 +36,7 @@ This guide will show you how to customize a models attention mechanism in order
|
||||
|
||||
## Attention class
|
||||
|
||||
[Segment Anything](./model_doc/sam) is an image segmentation model, and it combines the query-key-value (`qkv`) projection in its attention mechanims. To reduce the number of trainable parameters and computational overhead, you can apply LoRA to the `qkv` projection. This requires splitting the `qkv` projection so that you can separately target the `q` and `v` with LoRA.
|
||||
[Segment Anything](./model_doc/sam) is an image segmentation model, and it combines the query-key-value (`qkv`) projection in its attention mechanisms. To reduce the number of trainable parameters and computational overhead, you can apply LoRA to the `qkv` projection. This requires splitting the `qkv` projection so that you can separately target the `q` and `v` with LoRA.
|
||||
|
||||
1. Create a custom attention class, `SamVisionAttentionSplit`, by subclassing the original `SamVisionAttention` class. In the `__init__`, delete the combined `qkv` and create a separate linear layer for `q`, `k` and `v`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user