Image-Text-to-Text
Transformers
Safetensors
qwen2_5_vl
Generated from Trainer
conversational
text-generation-inference
Instructions to use jjakgui/qwen2.5-VL-7B-KoV_0.0.2_ep_5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jjakgui/qwen2.5-VL-7B-KoV_0.0.2_ep_5 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="jjakgui/qwen2.5-VL-7B-KoV_0.0.2_ep_5") 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("jjakgui/qwen2.5-VL-7B-KoV_0.0.2_ep_5") model = AutoModelForMultimodalLM.from_pretrained("jjakgui/qwen2.5-VL-7B-KoV_0.0.2_ep_5", 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 jjakgui/qwen2.5-VL-7B-KoV_0.0.2_ep_5 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jjakgui/qwen2.5-VL-7B-KoV_0.0.2_ep_5" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jjakgui/qwen2.5-VL-7B-KoV_0.0.2_ep_5", "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/jjakgui/qwen2.5-VL-7B-KoV_0.0.2_ep_5
- SGLang
How to use jjakgui/qwen2.5-VL-7B-KoV_0.0.2_ep_5 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 "jjakgui/qwen2.5-VL-7B-KoV_0.0.2_ep_5" \ --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": "jjakgui/qwen2.5-VL-7B-KoV_0.0.2_ep_5", "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 "jjakgui/qwen2.5-VL-7B-KoV_0.0.2_ep_5" \ --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": "jjakgui/qwen2.5-VL-7B-KoV_0.0.2_ep_5", "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 jjakgui/qwen2.5-VL-7B-KoV_0.0.2_ep_5 with Docker Model Runner:
docker model run hf.co/jjakgui/qwen2.5-VL-7B-KoV_0.0.2_ep_5
See axolotl config
axolotl version: 0.12.2
# ===== Model =====
base_model: Qwen/Qwen2.5-VL-7B-Instruct
processor_type: AutoProcessor
chat_template: qwen2_vl
# ๋ฉํฐ๋ชจ๋ฌ(๋น์ -์ฑ) ํ์ ํ๋๊ทธ
skip_prepare_dataset: true
remove_unused_columns: false
sample_packing: false
#shuffle_merged_datasets: false
#shuffle_before_merging_datasets: false # (๊ธฐ๋ณธ false์ง๋ง ๋ช
์ ์ถ์ฒ)
ddp_find_unused_parameters: true
# ===== Data =====
datasets:
- path: vlm_data_2025101_1/qwen2.5-VL-7B-KoV_0.0.2.jsonl
type: chat_template
field_messages: messages
split: null
val_set_size: 0.0
dataset_prepared_path:
# ===== Output / Logging =====
output_dir: ./outputs/qwen2.5-VL-7B-KoV_0.0.2.jsonl
logging_steps: 1
# wandb ์ฐ๋(์ํ๋ฉด ๋ณ๊ฒฝ/์ฃผ์)
wandb_entity: minkyun1
wandb_project: kisti_vlm_axo
wandb_name: qwen2.5-VL-7B-KoV_0.0.2.jsonl
# ===== LoRA / Quantization =====
#adapter: lora
# LLaVA์์ ์ธ์ด๋ชจ๋ธ ์ชฝ ํ๋ก์ ์
์๋ง LoRA(์์ ๊ธฐ๋ณธ๊ฐ)
#lora_r: 256
#lora_alpha: 512
#lora_dropout: 0.05
#lora_target_modules: "model.language_model.layers.[\\d]+.(mlp|cross_attn|self_attn).(up|down|gate|q|k|v|o)_proj"
# ๋ฉ๋ชจ๋ฆฌ ์ฌ์ ์ถฉ๋ถํ์ง๋ง, ์์์ 4bit ๋ก ์์ ์ ์ผ๋ก
load_in_4bit: false
load_in_8bit: false
bf16: true
tf32: true
gradient_checkpointing: true
gradient_checkpointing_kwargs:
use_reentrant: false
flash_attention: true
eager_attention:
# ===== Optim & Train =====
optimizer: adamw_torch_fused
learning_rate: 4e-5
lr_scheduler: cosine
warmup_ratio: 0.05
weight_decay: 0.01
max_grad_norm: 1.0
seed: 42
sequence_len: 8192
pad_to_sequence_len: false
excess_length_strategy: drop
# GPU๋น ๋ง์ดํฌ๋ก ๋ฐฐ์น/๋์ โ ์ ํจ ๋ฐฐ์น = 1 * 8 * 2GPU = 16
micro_batch_size: 1
gradient_accumulation_steps: 16
num_epochs: 5
evals_per_epoch: 1
saves_per_epoch: 1
# save_first_step: true
# ===== Multi-GPU: DeepSpeed (์ถ์ฒ) =====
# deepspeed ํ๋ฆฌ์
์ ๋ฐ์์ ์ฌ์ฉ:
# axolotl fetch deepspeed_configs
# 2รA100 80GB + 7B์๋ zero2๊ฐ ๋น ๋ฅด๊ณ ์์ ์
deepspeed: ds_zero2.json
# ===== ๋๋ฒ๊ทธ/์ฌํ์ฑ(์ ํ) =====
# ๋ฐ์ดํฐ ์ ์ฒ๋ฆฌ ๋ฉํฐํ๋ก์ธ์ค๊ฐ ๋ฌธ์ ์๊ธฐ๋ฉด 1๋ก ๋ฎ์ถฐ์ ์์ธ ํ์
# dataset_processes: 1
# ===== [๋์] FSDP2 ์ค์ (DeepSpeed ๋์ ์ฐ๊ณ ์ถ์ ๋) =====
# fsdp_version: 2
# fsdp_config:
# offload_params: false
# cpu_ram_efficient_loading: true
# auto_wrap_policy: TRANSFORMER_BASED_WRAP
# transformer_layer_cls_to_wrap: LlamaDecoderLayer
# state_dict_type: FULL_STATE_DICT
# reshard_after_forward: true
outputs/qwen2.5-VL-7B-KoV_0.0.2.jsonl
This model is a fine-tuned version of Qwen/Qwen2.5-VL-7B-Instruct on the vlm_data_2025101_1/qwen2.5-VL-7B-KoV_0.0.2.jsonl dataset.
Model description
More information needed
Intended uses & limitations
More information needed
Training and evaluation data
More information needed
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 4e-05
- train_batch_size: 1
- eval_batch_size: 1
- seed: 42
- distributed_type: multi-GPU
- num_devices: 8
- gradient_accumulation_steps: 16
- total_train_batch_size: 128
- total_eval_batch_size: 8
- optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: cosine
- lr_scheduler_warmup_steps: 195
- training_steps: 3907
Training results
Framework versions
- Transformers 4.55.2
- Pytorch 2.6.0+cu124
- Datasets 4.0.0
- Tokenizers 0.21.4
- Downloads last month
- 4
Model tree for jjakgui/qwen2.5-VL-7B-KoV_0.0.2_ep_5
Base model
Qwen/Qwen2.5-VL-7B-Instruct