Run this model with HF Jobs

Run AsadIsmail/Qwen2.5-VL-7B-Instruct-ternary on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/AsadIsmail/Qwen2.5-VL-7B-Instruct-ternary. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/AsadIsmail/Qwen2.5-VL-7B-Instruct-ternary on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/AsadIsmail/Qwen2.5-VL-7B-Instruct-ternary. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/AsadIsmail/Qwen2.5-VL-7B-Instruct-ternary. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

Qwen2.5-VL-7B-Instruct β€” Ternary Quantized

Ternary-quantized version of Qwen/Qwen2.5-VL-7B-Instruct, produced with ternary-quant.

Qwen2.5-VL is one of the most capable open-weight vision-language models. This ternary-quantized version targets lower memory use while preserving multimodal behavior in a HuggingFace-native, component-aware PTQ workflow.

Quantization details

Metric Value
Scheme tritplane3 (3-plane progressive ternary)
Components quantized text_backbone, multimodal_connector (196 linear layers)
Vision encoder Kept in FP16
Stored size 7341 MB (~7.2 GB)
FP16 size 13051 MB (~12.7 GB)
Compression ratio 1.8x

Usage

from ternary_quant.inference import load_ternary_model

model, processor = load_ternary_model(
    "AsadIsmail/Qwen2.5-VL-7B-Instruct-ternary",
    runtime_mode="metal"  # "cached" for NVIDIA/CPU
)

from PIL import Image
image = Image.open("photo.jpg")
inputs = processor(text="What is shown in this image?", images=image, return_tensors="pt")
inputs = {k: v.to(model.device) for k, v in inputs.items()}
outputs = model.generate(**inputs, max_new_tokens=256)
print(processor.decode(outputs[0], skip_special_tokens=True))

Reproduce

pip install ternary-quant
ternary-quant quantize-broad Qwen/Qwen2.5-VL-7B-Instruct \
    --output ./Qwen2.5-VL-7B-Instruct-ternary \
    --components text_backbone multimodal_connector \
    --scheme tritplane3 --dtype float16 --eval

Part of the ternary-models collection

github.com/Asad-Ismail/ternary-models

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for AsadIsmail/Qwen2.5-VL-7B-Instruct-ternary

Finetuned
(1,301)
this model

Space using AsadIsmail/Qwen2.5-VL-7B-Instruct-ternary 1

Collection including AsadIsmail/Qwen2.5-VL-7B-Instruct-ternary