Image-Text-to-Text
Transformers
Safetensors
qwen2_5_vl
Generated from Trainer
R1-V
trl
sft
conversational
text-generation-inference
Instructions to use Leeyuyu/Qwen2.5-VL-3B-Instruct-SFT-fundo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Leeyuyu/Qwen2.5-VL-3B-Instruct-SFT-fundo with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Leeyuyu/Qwen2.5-VL-3B-Instruct-SFT-fundo") 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("Leeyuyu/Qwen2.5-VL-3B-Instruct-SFT-fundo") model = AutoModelForMultimodalLM.from_pretrained("Leeyuyu/Qwen2.5-VL-3B-Instruct-SFT-fundo") 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 Leeyuyu/Qwen2.5-VL-3B-Instruct-SFT-fundo with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Leeyuyu/Qwen2.5-VL-3B-Instruct-SFT-fundo" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Leeyuyu/Qwen2.5-VL-3B-Instruct-SFT-fundo", "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/Leeyuyu/Qwen2.5-VL-3B-Instruct-SFT-fundo
- SGLang
How to use Leeyuyu/Qwen2.5-VL-3B-Instruct-SFT-fundo 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 "Leeyuyu/Qwen2.5-VL-3B-Instruct-SFT-fundo" \ --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": "Leeyuyu/Qwen2.5-VL-3B-Instruct-SFT-fundo", "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 "Leeyuyu/Qwen2.5-VL-3B-Instruct-SFT-fundo" \ --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": "Leeyuyu/Qwen2.5-VL-3B-Instruct-SFT-fundo", "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 Leeyuyu/Qwen2.5-VL-3B-Instruct-SFT-fundo with Docker Model Runner:
docker model run hf.co/Leeyuyu/Qwen2.5-VL-3B-Instruct-SFT-fundo
Training in progress, step 100
Browse files- config.json +1 -1
- model-00001-of-00002.safetensors +1 -1
- model-00002-of-00002.safetensors +1 -1
- tokenizer_config.json +0 -1
- training_args.bin +1 -1
config.json
CHANGED
|
@@ -32,7 +32,7 @@
|
|
| 32 |
"tie_word_embeddings": true,
|
| 33 |
"torch_dtype": "bfloat16",
|
| 34 |
"transformers_version": "4.50.0.dev0",
|
| 35 |
-
"use_cache":
|
| 36 |
"use_sliding_window": false,
|
| 37 |
"video_token_id": 151656,
|
| 38 |
"vision_config": {
|
|
|
|
| 32 |
"tie_word_embeddings": true,
|
| 33 |
"torch_dtype": "bfloat16",
|
| 34 |
"transformers_version": "4.50.0.dev0",
|
| 35 |
+
"use_cache": false,
|
| 36 |
"use_sliding_window": false,
|
| 37 |
"video_token_id": 151656,
|
| 38 |
"vision_config": {
|
model-00001-of-00002.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4997750760
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8f61a6e4697e4b72deff21a8ea29c7ba7a99a3ef9fc996cd7feb072468ca1c51
|
| 3 |
size 4997750760
|
model-00002-of-00002.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 3133917248
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d28040653fbce65c2005e736d54081b256aeb04a8d4a9d7b59a390d6014a03ab
|
| 3 |
size 3133917248
|
tokenizer_config.json
CHANGED
|
@@ -202,7 +202,6 @@
|
|
| 202 |
"extra_special_tokens": {},
|
| 203 |
"model_max_length": 131072,
|
| 204 |
"pad_token": "<|endoftext|>",
|
| 205 |
-
"processor_class": "Qwen2_5_VLProcessor",
|
| 206 |
"split_special_tokens": false,
|
| 207 |
"tokenizer_class": "Qwen2Tokenizer",
|
| 208 |
"unk_token": null
|
|
|
|
| 202 |
"extra_special_tokens": {},
|
| 203 |
"model_max_length": 131072,
|
| 204 |
"pad_token": "<|endoftext|>",
|
|
|
|
| 205 |
"split_special_tokens": false,
|
| 206 |
"tokenizer_class": "Qwen2Tokenizer",
|
| 207 |
"unk_token": null
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 7160
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f187c3a014d0addd361d8296e2ad701ec72b74a617ccab611dae737332f1e0e7
|
| 3 |
size 7160
|