Views
No views yet
vLLM serving and Transformers.pip install vllm1from vllm import LLM, SamplingParams
2
3model_id = "Vishva007/Qwen3-VL-8B-Instruct-W4A16-AutoRound-AWQ"
4
5llm = LLM(
6 model=model_id,
7 quantization="awq",
8 trust_remote_code=True,
9 max_model_len=4096
10)
11
12# ... (Standard vLLM inference code)pip install autoawq transformers1from transformers import Qwen2VLForConditionalGeneration, AutoProcessor
2import torch
3
4model_id = "Vishva007/Qwen3-VL-8B-Instruct-W4A16-AutoRound-AWQ"
5
6# Load with Flash Attention 2 for best performance
7model = Qwen2VLForConditionalGeneration.from_pretrained(
8 model_id,
9 torch_dtype=torch.float16,
10 device_map="auto",
11 attn_implementation="flash_attention_2"
12)
13processor = AutoProcessor.from_pretrained(model_id)
14
15# Inference Example
16messages = [
17 {
18 "role": "user",
19 "content": [
20 {"type": "image", "image": "https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-VL/assets/demo.jpeg"},
21 {"type": "text", "text": "What does this image show?"},
22 ],
23 }
24]
25
26text = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
27image_inputs, video_inputs = process_vision_info(messages)
28inputs = processor(
29 text=[text],
30 images=image_inputs,
31 videos=video_inputs,
32 padding=True,
33 return_tensors="pt",
34).to("cuda")
35
36generated_ids = model.generate(**inputs, max_new_tokens=128)
37print(processor.batch_decode(generated_ids, skip_special_tokens=True))🎁 Need GPU compute? Sign up via RunPod and get $5–$500 in free credits when you add your first $10.
| Template | CUDA Version | Docker Image | Template ID | Deploy |
|---|---|---|---|---|
| PyTorch 2.13 (CUDA 12.6) | 12.6 | vishva123/cuda-12.6-pytorch-2.13-runpod | gmlupxnxfk | |
| PyTorch 2.13 (CUDA 13.0) | 13.0 | vishva123/cuda-13.0-pytorch-2.13-runpod | y3j8xvk4f4 | |
| PyTorch 2.13 (CUDA 13.2) | 13.2 | vishva123/cuda-13.2-pytorch-2.13-runpod | vigpissn5w |
| Template | CUDA Version | Docker Image | Template ID | Deploy |
|---|---|---|---|---|
| PyTorch 2.12 (CUDA 12.6) | 12.6 | vishva123/cuda-12.6-pytorch-2.12-runpod | ctmz86zmf0 | |
| PyTorch 2.12 (CUDA 13.0) | 13.0 | vishva123/cuda-13.0-pytorch-2.12-runpod | qjko5yiwzi | |
| PyTorch 2.12 (CUDA 13.2) | 13.2 | vishva123/cuda-13.2-pytorch-2.12-runpod | ifg6xmye0f |
1@misc{qwen3technicalreport,
2 title={Qwen3 Technical Report},
3 author={Qwen Team},
4 year={2025}
5}