Nits for model docs (#29795)

* Update llava_next.md

* Update seggpt.md
This commit is contained in:
Merve Noyan
2024-04-22 12:41:03 +03:00
committed by GitHub
parent 8c12690cec
commit b20b017949
2 changed files with 3 additions and 3 deletions

View File

@@ -98,7 +98,7 @@ print(processor.decode(output[0], skip_special_tokens=True))
### Quantization using Bitsandbytes ### Quantization using Bitsandbytes
The model can be loaded in 8 or 4 bits, greatly reducing the memory requirements while maintaining the performance of the original model. First make sure to install bitsandbytes, `pip install bitsandbytes`` and make sure to have access to a CUDA compatible GPU device. Simply change the snippet above with: The model can be loaded in 8 or 4 bits, greatly reducing the memory requirements while maintaining the performance of the original model. First make sure to install bitsandbytes, `pip install bitsandbytes` and make sure to have access to a CUDA compatible GPU device. Simply change the snippet above with:
```python ```python
from transformers import LlavaNextForConditionalGeneration, BitsAndBytesConfig from transformers import LlavaNextForConditionalGeneration, BitsAndBytesConfig

View File

@@ -36,7 +36,7 @@ import torch
from datasets import load_dataset from datasets import load_dataset
from transformers import SegGptImageProcessor, SegGptForImageSegmentation from transformers import SegGptImageProcessor, SegGptForImageSegmentation
model_id = "BAAI/seggpt-vit-large" checkpoint = "BAAI/seggpt-vit-large"
image_processor = SegGptImageProcessor.from_pretrained(checkpoint) image_processor = SegGptImageProcessor.from_pretrained(checkpoint)
model = SegGptForImageSegmentation.from_pretrained(checkpoint) model = SegGptForImageSegmentation.from_pretrained(checkpoint)