Instructions to use HoshiuZ/LLaVA-NeXT-8B-Unlearned with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HoshiuZ/LLaVA-NeXT-8B-Unlearned with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="HoshiuZ/LLaVA-NeXT-8B-Unlearned") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("HoshiuZ/LLaVA-NeXT-8B-Unlearned") model = AutoModelForMultimodalLM.from_pretrained("HoshiuZ/LLaVA-NeXT-8B-Unlearned", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use HoshiuZ/LLaVA-NeXT-8B-Unlearned with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "HoshiuZ/LLaVA-NeXT-8B-Unlearned" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HoshiuZ/LLaVA-NeXT-8B-Unlearned", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/HoshiuZ/LLaVA-NeXT-8B-Unlearned
- SGLang
How to use HoshiuZ/LLaVA-NeXT-8B-Unlearned 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 "HoshiuZ/LLaVA-NeXT-8B-Unlearned" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HoshiuZ/LLaVA-NeXT-8B-Unlearned", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "HoshiuZ/LLaVA-NeXT-8B-Unlearned" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HoshiuZ/LLaVA-NeXT-8B-Unlearned", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use HoshiuZ/LLaVA-NeXT-8B-Unlearned with Docker Model Runner:
docker model run hf.co/HoshiuZ/LLaVA-NeXT-8B-Unlearned
LLaVA-NeXT-8B-Unlearned β 2026-11-01 base-reference version
This is a complete BF16 LLaVA-NeXT wrapper reconstructed from the pinned full multimodal base and the 2026-11-01 sparse overlay. The public checkpoint includes the language model, vision tower, projector, tokenizer, processor, configuration, and generation settings.
Source and version
- Full multimodal base:
llava-hf/llama3-llava-next-8b-hf - Frozen base revision:
b041c0d0ea0dd0196d147206c210c8d1752fc2da - Wrapper class:
LlavaNextForConditionalGeneration - New sparse overlay SHA-256:
dd9b6bb0c01c2a40437c89c127540e83c7bd6554b1892984e2273ed946ddd1da(822,087,200bytes) - Updated language-model MLP
down_projmatrices: layers 4, 5, 6, 7, 8, 10, and 12. - Overlay and base were combined into a complete checkpoint; applying the overlay at load time is not required.
The previous public repository state remains available at revision 1c1b8d10c7ee3d4b364c1cd0cdd0316605eb5aae and tag hf1-2026-10-31. That version used a different overlay (627e161056ed640837eb007debe17ea225c23c781e5d154971b38a53822592f2). The current main card describes only the 2026-11-01 base-reference version.
Text-only experiment record
The source experiment records WMDP three-domain C = 80.4348%, other245 131/245, and MMLU285 145/285. These are experiment-record values and were not rescored during this publication preparation. An item-level score audit was not independently repeated here. S has not been measured for this version.
Evaluation used text-only inputs. Image inputs and broader multimodal safety were not evaluated for this version.
Loading
import torch
from transformers import AutoProcessor, LlavaNextForConditionalGeneration
repo = "HoshiuZ/LLaVA-NeXT-8B-Unlearned"
processor = AutoProcessor.from_pretrained(repo)
model = LlavaNextForConditionalGeneration.from_pretrained(
repo, torch_dtype=torch.bfloat16, device_map="auto"
)
License and attribution
The selected source model is marked llama3. The Meta Llama 3 Community License Agreement and Acceptable Use Policy apply. This repository does not relicense the model as Apache-2.0 or MIT. See LICENSE, USE_POLICY.md, and Meta's Llama 3 license page.
Research source: HoshiuZ/multimodal-llm-safety. This model card documents the checkpoint version and text-only experiment record; it is not a claim that image or broader multimodal safety has been tested.
- Downloads last month
- 41
Model tree for HoshiuZ/LLaVA-NeXT-8B-Unlearned
Base model
llava-hf/llama3-llava-next-8b-hf