Image-Text-to-Text
Transformers
Safetensors
qwen2_vl
llama-factory
full
Generated from Trainer
conversational
text-generation-inference
Instructions to use Allen8/TVC-72B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Allen8/TVC-72B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Allen8/TVC-72B") 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("Allen8/TVC-72B") model = AutoModelForMultimodalLM.from_pretrained("Allen8/TVC-72B", 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 Allen8/TVC-72B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Allen8/TVC-72B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Allen8/TVC-72B", "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/Allen8/TVC-72B
- SGLang
How to use Allen8/TVC-72B 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 "Allen8/TVC-72B" \ --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": "Allen8/TVC-72B", "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 "Allen8/TVC-72B" \ --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": "Allen8/TVC-72B", "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 Allen8/TVC-72B with Docker Model Runner:
docker model run hf.co/Allen8/TVC-72B
Add image-text-to-text pipeline tag
#1
by nielsr HF Staff - opened
README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
---
|
|
|
|
| 2 |
library_name: transformers
|
| 3 |
license: apache-2.0
|
| 4 |
-
base_model: Qwen/Qwen2-VL-72B-Instruct
|
| 5 |
tags:
|
| 6 |
- llama-factory
|
| 7 |
- full
|
|
@@ -9,6 +9,7 @@ tags:
|
|
| 9 |
model-index:
|
| 10 |
- name: TVC-7B
|
| 11 |
results: []
|
|
|
|
| 12 |
---
|
| 13 |
|
| 14 |
## Model Summary
|
|
@@ -19,7 +20,6 @@ The TVC models are 72B parameter models based on Qwen2-VL-72B-Instruct model wit
|
|
| 19 |
- **Languages:** English, Chinese
|
| 20 |
- **Paper:** https://arxiv.org/abs/2503.13360
|
| 21 |
|
| 22 |
-
|
| 23 |
### Model Architecture
|
| 24 |
|
| 25 |
- **Architecture:** Qwen2-VL-72B-Instruct
|
|
|
|
| 1 |
---
|
| 2 |
+
base_model: Qwen/Qwen2-VL-72B-Instruct
|
| 3 |
library_name: transformers
|
| 4 |
license: apache-2.0
|
|
|
|
| 5 |
tags:
|
| 6 |
- llama-factory
|
| 7 |
- full
|
|
|
|
| 9 |
model-index:
|
| 10 |
- name: TVC-7B
|
| 11 |
results: []
|
| 12 |
+
pipeline_tag: image-text-to-text
|
| 13 |
---
|
| 14 |
|
| 15 |
## Model Summary
|
|
|
|
| 20 |
- **Languages:** English, Chinese
|
| 21 |
- **Paper:** https://arxiv.org/abs/2503.13360
|
| 22 |
|
|
|
|
| 23 |
### Model Architecture
|
| 24 |
|
| 25 |
- **Architecture:** Qwen2-VL-72B-Instruct
|