Downloads · 30 days
23
11% of all-time downloads
leon-se/Idefics3-8B-Llama3-FP8-Dynamic
Idefics3-8B-Llama3-FP8-Dynamic is a machine learning model from leon-se. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Downloads · 30 days
23
11% of all-time downloads
All-time downloads
211
Public
Parameters
8.5B
10 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors9.9 GB · 100%
How the weights are stored.
F8_E4M37B · 82%
From the Hugging Face model README
vllm serve leon-se/Idefics3-8B-Llama3-FP8-Dynamic --trust-remote-code
from transformers import AutoProcessor, AutoModelForVision2Seq
from llmcompressor.modifiers.quantization import QuantizationModifier
from llmcompressor.transformers import oneshot
model_name = "HuggingfaceM4/Idefics3-8B-Llama3"
processor = AutoProcessor.from_pretrained(model_name)
model = AutoModelForVision2Seq.from_pretrained(model_name, device_map="cuda", torch_dtype="auto", trust_remote_code=True)
recipe = QuantizationModifier(
targets="Linear",
scheme="FP8_DYNAMIC",
ignore=["re:.*lm_head", "re:model.vision_model.*", "re:model.connector.*"],
)
SAVE_DIR = model_name.split("/")[1] + "-FP8-Dynamic"
oneshot(model=model, recipe=recipe, output_dir=SAVE_DIR)
processor.save_pretrained(SAVE_DIR)