Fix typo in LLaVa documentation (#38618)

* Fix typo in LLaVa documentation

In exactly one section, LlavaImageProcessor was spelt wrongly as LLavaImageProcessor, which throws off copy-pasting the section.

* Fix LlavaImageProcessor url to make it valid (and copypaste-able)

Earlier, the URL contained the entire HF prefix. This commit removes that to ensure that the code block can be copied and run as is.
This commit is contained in:
Monish Singhal 2025-06-06 01:55:07 +05:30 committed by GitHub
parent 5399c1d670
commit c75bf2c36e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -216,12 +216,12 @@ processor.batch_decode(generate_ids, skip_special_tokens=True)
## Note regarding reproducing original implementation
In order to match the logits of the [original implementation](https://github.com/haotian-liu/LLaVA/tree/main), one needs to additionally specify `do_pad=True` when instantiating `LLavaImageProcessor`:
In order to match the logits of the [original implementation](https://github.com/haotian-liu/LLaVA/tree/main), one needs to additionally specify `do_pad=True` when instantiating `LlavaImageProcessor`:
```python
from transformers import LLavaImageProcessor
from transformers import LlavaImageProcessor
image_processor = LLavaImageProcessor.from_pretrained("https://huggingface.co/llava-hf/llava-1.5-7b-hf", do_pad=True)
image_processor = LlavaImageProcessor.from_pretrained("llava-hf/llava-1.5-7b-hf", do_pad=True)
```
### Using Flash Attention 2