Instructions to use Kyomin/unlearning_target with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Kyomin/unlearning_target with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Kyomin/unlearning_target") 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)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("Kyomin/unlearning_target") model = AutoModelForMultimodalLM.from_pretrained("Kyomin/unlearning_target", 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=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Kyomin/unlearning_target with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Kyomin/unlearning_target" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Kyomin/unlearning_target", "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/Kyomin/unlearning_target
- SGLang
How to use Kyomin/unlearning_target 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 "Kyomin/unlearning_target" \ --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": "Kyomin/unlearning_target", "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 "Kyomin/unlearning_target" \ --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": "Kyomin/unlearning_target", "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 Kyomin/unlearning_target with Docker Model Runner:
docker model run hf.co/Kyomin/unlearning_target
LLaVA-1.5-7B fine-tuned on MLLMU-Bench (unlearning target)
A LLaVA-1.5-7B model fine-tuned on the MLLMU-Bench profile data. It is meant to be used as the target model for multimodal machine-unlearning experiments: it has memorised the benchmark's synthetic profiles, so an unlearning method can be asked to remove a subset of them and be measured on what it forgets and what it retains.
This is an independently trained model, not a copy of the benchmark authors' checkpoint. It was retrained because the reference fine-tuning recipe supervised the wrong tokens (see Training).
Usage
import torch
from transformers import LlavaForConditionalGeneration, AutoProcessor
model = LlavaForConditionalGeneration.from_pretrained(
"์ฌ๊ธฐ์_๋ณธ์ธ_์ฌ์ฉ์๋ช
/unlearning_target", torch_dtype=torch.float16, device_map="auto"
)
processor = AutoProcessor.from_pretrained("์ฌ๊ธฐ์_๋ณธ์ธ_์ฌ์ฉ์๋ช
/unlearning_target")
The processor and tokenizer are bundled, so no separate --model_id is needed. They are the
ones from llava-hf/llava-1.5-7b-hf; the token vocabulary (32002 = 32000 base + <image> at
32000 + <pad> at 32001) matches this model's embedding matrix exactly. Note that the bundled
tokenizer keeps the upstream default padding_side="left", which is what you want for batched
generation; set processor.tokenizer.padding_side = "right" before any further training, as
the MLLMU-Bench fine-tuning and unlearning code does.
Training
| Base model | llava-hf/llava-1.5-7b-hf |
| Data | MLLMU-Bench ft_Data (500 fictitious profiles, 8,204 QA pairs) |
| Method | LoRA r=32, alpha=32, vision tower also trained, adapters merged into the base weights |
| Schedule | 4 epochs, lr 2e-5, batch size 4, no gradient accumulation, max_length 384 |
| Precision | fp16 (merged) |
| Final training loss | 0.328 |
Two corrections to the reference recipe:
- Prompt masking. The original collator put the loss on the whole sequence, including the 576
expanded
<image>tokens and theUSER: ... ASSISTANT:scaffolding. Measured on this data, 595 of 610 supervised tokens per example were outside the answer. Loss is now computed on the answer tokens only. - EOS supervision. The original recipe never trained an end-of-sequence token, so the model did not learn to stop. An EOS token is now appended to each answer.
Evaluation
MLLMU-Bench generation evaluation, forget ratio 5, seed 42 (higher on the forget set means more memorisation, which is what an unlearning target should show).
| Split | Metric (Image_Textual) | This model | Benchmark authors' checkpoint |
|---|---|---|---|
| Forget | ROUGE-1 Recall | 0.5913 | 0.5663 |
| Forget | BLEU | 0.2697 | 0.2422 |
| Test | ROUGE-1 Recall | 0.3141 | 0.2676 |
| Test | BLEU | 0.0954 | 0.0693 |
Intended use and limitations
Research on multimodal machine unlearning and privacy evaluation. The training data consists of synthetic profiles of fictitious people created for MLLMU-Bench; the model is not a source of information about real individuals, and nothing it generates about a named person should be treated as factual. It inherits the limitations and biases of LLaVA-1.5, Vicuna-1.5 and Llama 2. Following the intent of its ancestors (Vicuna is released for research on large language models and chatbots), treat this checkpoint as research-use.
License and attribution
Licensed under the Llama 2 Community License Agreement, inherited through
llava-hf/llava-1.5-7b-hf โ lmsys/vicuna-7b-v1.5 โ Meta Llama 2 7B. A copy of the agreement is
in LICENSE and the required attribution is in NOTICE; use is also subject
to Meta's Acceptable Use Policy. The license's
700-million-monthly-active-users clause and its restriction on using the materials to improve
other large language models apply to this model as they do to the base.
The training data comes from MLLMU-Bench, which declares no license of its own. Please cite it:
@inproceedings{liu2025mllmubench,
title = {Protecting Privacy in Multimodal Large Language Models with MLLMU-Bench},
author = {Liu, Zheyuan and Dou, Guangyao and Jia, Mengzhao and Tan, Zhaoxuan and
Zeng, Qingkai and Yuan, Yongle and Jiang, Meng},
booktitle = {NAACL},
year = {2025}
}
- Downloads last month
- 20
Model tree for Kyomin/unlearning_target
Base model
llava-hf/llava-1.5-7b-hf