Image-Text-to-Text
Transformers
Safetensors
English
qts_plus_qwen2_causal_lm
text-generation
multimodal
vision
video
long-video
token-selection
compression
llava-video
qtsplus
conversational
custom_code
Instructions to use AlpachinoNLP/QTSplus-LLaVA-Video-7B-Qwen2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AlpachinoNLP/QTSplus-LLaVA-Video-7B-Qwen2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="AlpachinoNLP/QTSplus-LLaVA-Video-7B-Qwen2", trust_remote_code=True) 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)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("AlpachinoNLP/QTSplus-LLaVA-Video-7B-Qwen2", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use AlpachinoNLP/QTSplus-LLaVA-Video-7B-Qwen2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AlpachinoNLP/QTSplus-LLaVA-Video-7B-Qwen2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AlpachinoNLP/QTSplus-LLaVA-Video-7B-Qwen2", "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/AlpachinoNLP/QTSplus-LLaVA-Video-7B-Qwen2
- SGLang
How to use AlpachinoNLP/QTSplus-LLaVA-Video-7B-Qwen2 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 "AlpachinoNLP/QTSplus-LLaVA-Video-7B-Qwen2" \ --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": "AlpachinoNLP/QTSplus-LLaVA-Video-7B-Qwen2", "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 "AlpachinoNLP/QTSplus-LLaVA-Video-7B-Qwen2" \ --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": "AlpachinoNLP/QTSplus-LLaVA-Video-7B-Qwen2", "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 AlpachinoNLP/QTSplus-LLaVA-Video-7B-Qwen2 with Docker Model Runner:
docker model run hf.co/AlpachinoNLP/QTSplus-LLaVA-Video-7B-Qwen2
Download tokenizer_config.json from AlpachinoNLP/QTSplus-LLaVA-Video-7B-Qwen2: direct link, hf CLI and curl.
- Browser
- Download file 1.24 kB
-
https://huggingface.co/AlpachinoNLP/QTSplus-LLaVA-Video-7B-Qwen2/resolve/main/tokenizer_config.json
- Command line
-
hf download hf://AlpachinoNLP/QTSplus-LLaVA-Video-7B-Qwen2/tokenizer_config.json
-
curl -L -o tokenizer_config.json https://huggingface.co/AlpachinoNLP/QTSplus-LLaVA-Video-7B-Qwen2/resolve/main/tokenizer_config.json
1.24 kB
| { | |
| "add_prefix_space": false, | |
| "added_tokens_decoder": { | |
| "151643": { | |
| "content": "<|endoftext|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "151644": { | |
| "content": "<|im_start|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "151645": { | |
| "content": "<|im_end|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "151646": { | |
| "content": "<image>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| } | |
| }, | |
| "additional_special_tokens": [ | |
| "<|im_start|>", | |
| "<|im_end|>" | |
| ], | |
| "bos_token": null, | |
| "clean_up_tokenization_spaces": false, | |
| "eos_token": "<|im_end|>", | |
| "errors": "replace", | |
| "extra_special_tokens": {}, | |
| "fix_mistral_regex": true, | |
| "model_max_length": 32768, | |
| "pad_token": "<|endoftext|>", | |
| "padding_side": "right", | |
| "processor_class": "LlavaProcessor", | |
| "split_special_tokens": false, | |
| "tokenizer_class": "Qwen2Tokenizer", | |
| "unk_token": null | |
| } | |