Leon
commited on
Update README.md
Browse files
README.md
CHANGED
|
@@ -4,10 +4,11 @@ base_model:
|
|
| 4 |
- rhymes-ai/Aria-sequential_mlp
|
| 5 |
- rhymes-ai/Aria
|
| 6 |
pipeline_tag: image-text-to-text
|
|
|
|
| 7 |
---
|
| 8 |
# Aria-sequential_mlp-FP8-dynamic
|
| 9 |
-
FP8-Dynamic quantization from [Aria-sequential_mlp](https://huggingface.co/rhymes-ai/Aria-sequential_mlp) made with [llm-compressor](https://github.com/vllm-project/llm-compressor), requires about
|
| 10 |
-
###
|
| 11 |
```
|
| 12 |
pip install transformers==4.45.0 accelerate==0.34.1 sentencepiece==0.2.0 torchvision requests torch Pillow compressed-tensors
|
| 13 |
pip install flash-attn --no-build-isolation
|
|
@@ -24,7 +25,7 @@ torch.cuda.set_device(0)
|
|
| 24 |
|
| 25 |
model_id_or_path = "thwin27/Aria-sequential_mlp-bnb_FP8-dynamic"
|
| 26 |
|
| 27 |
-
model = AutoModelForCausalLM.from_pretrained(model_id_or_path, torch_dtype=torch.bfloat16, trust_remote_code=True)
|
| 28 |
processor = AutoProcessor.from_pretrained(model_id_or_path, trust_remote_code=True)
|
| 29 |
|
| 30 |
image_path = "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png"
|
|
|
|
| 4 |
- rhymes-ai/Aria-sequential_mlp
|
| 5 |
- rhymes-ai/Aria
|
| 6 |
pipeline_tag: image-text-to-text
|
| 7 |
+
library_name: transformers
|
| 8 |
---
|
| 9 |
# Aria-sequential_mlp-FP8-dynamic
|
| 10 |
+
FP8-Dynamic quantization from [Aria-sequential_mlp](https://huggingface.co/rhymes-ai/Aria-sequential_mlp) made with [llm-compressor](https://github.com/vllm-project/llm-compressor), requires about 24.8 GB of VRAM.
|
| 11 |
+
### Installationcompressed-tensors
|
| 12 |
```
|
| 13 |
pip install transformers==4.45.0 accelerate==0.34.1 sentencepiece==0.2.0 torchvision requests torch Pillow compressed-tensors
|
| 14 |
pip install flash-attn --no-build-isolation
|
|
|
|
| 25 |
|
| 26 |
model_id_or_path = "thwin27/Aria-sequential_mlp-bnb_FP8-dynamic"
|
| 27 |
|
| 28 |
+
model = AutoModelForCausalLM.from_pretrained(model_id_or_path, device_map="auto", torch_dtype=torch.bfloat16, trust_remote_code=True)
|
| 29 |
processor = AutoProcessor.from_pretrained(model_id_or_path, trust_remote_code=True)
|
| 30 |
|
| 31 |
image_path = "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png"
|