Image-Text-to-Text
Transformers
Safetensors
PEFT
English
qwen2-vl
lora
image-captioning
vietnamese
accessibility
textbook
Instructions to use hoangphann/LoRA-Qwen2-VL-2B-Instruct-captioning with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hoangphann/LoRA-Qwen2-VL-2B-Instruct-captioning with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="hoangphann/LoRA-Qwen2-VL-2B-Instruct-captioning")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("hoangphann/LoRA-Qwen2-VL-2B-Instruct-captioning", device_map="auto") - PEFT
How to use hoangphann/LoRA-Qwen2-VL-2B-Instruct-captioning with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use hoangphann/LoRA-Qwen2-VL-2B-Instruct-captioning with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "hoangphann/LoRA-Qwen2-VL-2B-Instruct-captioning" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hoangphann/LoRA-Qwen2-VL-2B-Instruct-captioning", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/hoangphann/LoRA-Qwen2-VL-2B-Instruct-captioning
- SGLang
How to use hoangphann/LoRA-Qwen2-VL-2B-Instruct-captioning 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 "hoangphann/LoRA-Qwen2-VL-2B-Instruct-captioning" \ --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": "hoangphann/LoRA-Qwen2-VL-2B-Instruct-captioning", "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 "hoangphann/LoRA-Qwen2-VL-2B-Instruct-captioning" \ --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": "hoangphann/LoRA-Qwen2-VL-2B-Instruct-captioning", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use hoangphann/LoRA-Qwen2-VL-2B-Instruct-captioning with Docker Model Runner:
docker model run hf.co/hoangphann/LoRA-Qwen2-VL-2B-Instruct-captioning
Download run_config.json from hoangphann/LoRA-Qwen2-VL-2B-Instruct-captioning: direct link, hf CLI and curl.
- Browser
- Download file 943 Bytes
-
https://huggingface.co/hoangphann/LoRA-Qwen2-VL-2B-Instruct-captioning/resolve/main/run_config.json
- Command line
-
hf download hf://hoangphann/LoRA-Qwen2-VL-2B-Instruct-captioning/run_config.json
-
curl -L -o run_config.json https://huggingface.co/hoangphann/LoRA-Qwen2-VL-2B-Instruct-captioning/resolve/main/run_config.json
943 Bytes
| { | |
| "created_at": "2026-01-03 01:00:58", | |
| "preset": "A", | |
| "dataset_id": "bbdontcry/vietnamese-image-captioning", | |
| "model_id": "Qwen/Qwen2-VL-2B-Instruct", | |
| "quantization": null, | |
| "min_pixels": 200704, | |
| "max_pixels": 802816, | |
| "system_message": "Bạn là một Vision-Language Model hỗ trợ người khiếm thị bằng cách tạo mô tả ảnh bằng tiếng Việt cho trang sách giáo khoa. Chỉ mô tả những gì thấy trong ảnh, không suy đoán.Khi OCR, trích toàn bộ chữ nhìn thấy, theo thứ tự trên xuống dưới, trái sang phải", | |
| "prompt_detail": "Hãy thuyết minh chi tiết trang SGK trong ảnh theo luồng đọc từ trên xuống dưới. Khi gặp chữ trong ảnh, hãy đưa vào đúng ngữ cảnh và trích nguyên văn trong ngoặc kép. Không suy luận.", | |
| "gen": { | |
| "max_new_tokens_detail": 256, | |
| "temperature": 0.2, | |
| "top_p": 0.9, | |
| "do_sample": false | |
| } | |
| } |