Image-Text-to-Text
Transformers
Safetensors
llava_llama
text-generation
llava
multimodal
hallucination-mitigation
tgif
Instructions to use cclinn/TGIF-LLaVA-v1.5-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cclinn/TGIF-LLaVA-v1.5-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="cclinn/TGIF-LLaVA-v1.5-7B")# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("cclinn/TGIF-LLaVA-v1.5-7B", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use cclinn/TGIF-LLaVA-v1.5-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cclinn/TGIF-LLaVA-v1.5-7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cclinn/TGIF-LLaVA-v1.5-7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/cclinn/TGIF-LLaVA-v1.5-7B
- SGLang
How to use cclinn/TGIF-LLaVA-v1.5-7B 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 "cclinn/TGIF-LLaVA-v1.5-7B" \ --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": "cclinn/TGIF-LLaVA-v1.5-7B", "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 "cclinn/TGIF-LLaVA-v1.5-7B" \ --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": "cclinn/TGIF-LLaVA-v1.5-7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use cclinn/TGIF-LLaVA-v1.5-7B with Docker Model Runner:
docker model run hf.co/cclinn/TGIF-LLaVA-v1.5-7B
TGIF-LLaVA-v1.5-7B
Released checkpoint for TGIF: Text-Guided Layer Fusion Mitigates Hallucination in Multimodal LLMs.
This model is a LLaVA-v1.5 7B checkpoint with TGIF text-guided layer fusion enabled through:
{
"mm_projector_type": "layer_selector",
"mm_vision_tower": "openai/clip-vit-large-patch14-336"
}
Usage
Use the official TGIF code:
git clone https://github.com/Linchenchen/TGIF.git
cd TGIF
pip install -e .
Then load the checkpoint with the standard LLaVA loader:
from llava.model.builder import load_pretrained_model
from llava.mm_utils import get_model_name_from_path
model_path = "cclinn/TGIF-LLaVA-v1.5-7B"
model_name = get_model_name_from_path(model_path)
tokenizer, model, image_processor, context_len = load_pretrained_model(
model_path=model_path,
model_base=None,
model_name=model_name,
)
Notes
- This repository contains model weights only. Training and evaluation code is released at https://github.com/Linchenchen/TGIF.
- The model builds on LLaVA and Vicuna/LLaMA-family components; users must comply with the licenses and terms of all base models and datasets.
- Evaluation scripts for POPE, HallusionBench, OCRBench, TextVQA, MMRel, MMBench, ScienceQA, and GQA are documented in the TGIF repository.
Citation
Please cite the TGIF paper if you use this checkpoint. BibTeX metadata will be added after the paper record is finalized.
@article{tgif2026,
title={TGIF: Text-Guided Layer Fusion Mitigates Hallucination in Multimodal LLMs},
year={2026}
}
- Downloads last month
- 10
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support