Instructions to use ForeverBlue/LLaVA-1.5-7B-GRACE-W4G128 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ForeverBlue/LLaVA-1.5-7B-GRACE-W4G128 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="ForeverBlue/LLaVA-1.5-7B-GRACE-W4G128")# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("ForeverBlue/LLaVA-1.5-7B-GRACE-W4G128", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ForeverBlue/LLaVA-1.5-7B-GRACE-W4G128 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ForeverBlue/LLaVA-1.5-7B-GRACE-W4G128" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ForeverBlue/LLaVA-1.5-7B-GRACE-W4G128", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ForeverBlue/LLaVA-1.5-7B-GRACE-W4G128
- SGLang
How to use ForeverBlue/LLaVA-1.5-7B-GRACE-W4G128 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "ForeverBlue/LLaVA-1.5-7B-GRACE-W4G128" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ForeverBlue/LLaVA-1.5-7B-GRACE-W4G128", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "ForeverBlue/LLaVA-1.5-7B-GRACE-W4G128" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ForeverBlue/LLaVA-1.5-7B-GRACE-W4G128", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ForeverBlue/LLaVA-1.5-7B-GRACE-W4G128 with Docker Model Runner:
docker model run hf.co/ForeverBlue/LLaVA-1.5-7B-GRACE-W4G128
LLaVA-1.5-7B-GRACE-W4G128
This repository contains a GRACE-trained LLaVA-1.5-7B checkpoint with quantization-aware training (QAT), W4G128 group-wise INT4 quantization, and learned scales.
This model is associated with our ICML 2026 paper:
Gated Relational Alignment via Confidence-based Distillation for Efficient VLMs
Yanlong Chen, Amirhossein Habibian, Luca Benini, Yawei Li
Accepted to the International Conference on Machine Learning (ICML 2026)
- Paper: https://arxiv.org/abs/2601.22709
- DOI: https://doi.org/10.48550/arXiv.2601.22709
- Code: https://github.com/ForeverBlue816/GRACE
Model Details
- Base model: liuhaotian/llava-v1.5-7b
- Model family: LLaVA-1.5
- Method: GRACE
- Quantization: W4G128 group-wise INT4 QAT
- Scale setting: learned scales
- Repository: ForeverBlue/LLaVA-1.5-7B-GRACE-W4G128
Files
This repository includes the merged model checkpoint and GRACE-specific quantized weights:
model-00001-of-00003.safetensorsmodel-00002-of-00003.safetensorsmodel-00003-of-00003.safetensorsmodel.safetensors.index.jsonqat_quantized_weights.binconfig.jsongeneration_config.jsontokenizer.modeltokenizer_config.jsonspecial_tokens_map.json
Intended Use
This model is intended for research on efficient vision-language models, quantization-aware training, and multimodal model compression.
Potential use cases include:
- evaluating INT4 quantized vision-language models;
- studying quantization-aware training for multimodal models;
- reproducing or extending GRACE-style efficient VLM experiments;
- comparing quantized LLaVA-1.5 variants under multimodal benchmarks.
Loading
Please use a LLaVA-compatible inference environment together with the GRACE quantization-aware loading code.
from transformers import AutoTokenizer, AutoModelForCausalLM
repo_id = "ForeverBlue/LLaVA-1.5-7B-GRACE-W4G128"
tokenizer = AutoTokenizer.from_pretrained(repo_id, use_fast=False)
model = AutoModelForCausalLM.from_pretrained(
repo_id,
trust_remote_code=True,
device_map="auto"
)
Important Notes
This checkpoint includes QAT-specific quantized weights in qat_quantized_weights.bin. Depending on the inference codebase, additional GRACE-specific quantization-aware loading logic may be required.
The standard from_pretrained call may load the model configuration and checkpoint files, but fully reproducing the intended INT4 QAT behavior may require the GRACE repository:
https://github.com/ForeverBlue816/GRACE
Limitations
- This model is released for research purposes.
- The quantized checkpoint may require custom loading logic for QAT-specific weights.
- Performance may vary depending on the evaluation codebase, preprocessing, generation parameters, and multimodal benchmark implementation.
- Users should follow the license and usage restrictions of the original LLaVA-1.5 base model.
Citation
If you use this model, please cite:
@article{chen2026gated,
title={Gated Relational Alignment via Confidence-based Distillation for Efficient VLMs},
author={Chen, Yanlong and Habibian, Amirhossein and Benini, Luca and Li, Yawei},
journal={arXiv preprint arXiv:2601.22709},
year={2026}
}
- Downloads last month
- 81
Model tree for ForeverBlue/LLaVA-1.5-7B-GRACE-W4G128
Base model
liuhaotian/llava-v1.5-7b