File size: 1,014 Bytes
579a814 ee960b9 60fe460 7652df9 2cf9ce2 7652df9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
---
license: apache-2.0
base_model:
- rhymes-ai/Aria-sequential_mlp
pipeline_tag: image-text-to-text
---
# Aria-sequential_mlp-FP8-dynamic
FP8-Dynamic quant from rhymes-ai Aria made with llm-compressor.
Generated with the following code:
```python
from transformers import AutoProcessor, AutoModelForCausalLM
from llmcompressor.modifiers.quantization import QuantizationModifier
from llmcompressor.transformers import SparseAutoModelForCausalLM, oneshot
model_name = "rhymes-ai/Aria-sequential_mlp"
model = SparseAutoModelForCausalLM.from_pretrained(model_name, device_map="auto", torch_dtype="auto", trust_remote_code=True)
processor = AutoProcessor.from_pretrained(model_name, trust_remote_code=True)
recipe = QuantizationModifier(
targets="Linear",
scheme="FP8_DYNAMIC",
ignore=["re:.*lm_head", "re:multi_modal_projector.*", "re:vision_tower.*"],
)
folder = model_name.split("/")[1] + "-FP8-Dynamic"
oneshot(model=model, recipe=recipe, output_dir=folder)
processor.save_pretrained(folder)
``` |