Simple-VL-8B is a vision-language (VL) model trained by integrating the language modeling capabilities of Qwen3-8B with the visual understanding architecture of Qwen2.5-VL-7B-Instruct .
The model is trained under ms-swift framework, the SOP process document can be found here
Base Models :
The Simple-VL-8B model was created through a two-stage fine-tuning process:
- Architecture Modification : The original Qwen2.5-VL-7B-Instruct model's LLM component was replaced with weights from Qwen3-8B. Several key parameters in the configuration were updated to match Qwen3-8B's structure.
- Two-Stage Training :
- Stage 1 : Only the vision-to-language aligner (merger layer) was trained while keeping the ViT and LLM components frozen.
- Stage 2 : All components were unfrozen and jointly fine-tuned to enhance overall performance.
Here we show a code snippet to show you how to use the chat model
from modelscope import Qwen2_5_VLForConditionalGeneration, AutoTokenizer, AutoProcessor
from qwen_vl_utils import process_vision_info
# default: Load the model on the available device(s)
model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
"swift/Simple-VL-8B", torch_dtype="auto", device_map="auto"
)
# default processer
processor = AutoProcessor.from_pretrained("swift/Simple-VL-8B")
messages = [
{
"role": "user",
"content": [
{
"type": "image",
"image": "https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-VL/assets/demo.jpeg",
},
{"type": "text", "text": "Describe this image."},
],
}
]
# Preparation for inference
text = processor.apply_chat_template(
messages, tokenize=False, add_generation_prompt=True
)
image_inputs, video_inputs = process_vision_info(messages)
inputs = processor(
text=[text],
images=image_inputs,
videos=video_inputs,
padding=True,
return_tensors="pt",
)
inputs = inputs.to("cuda")
# Inference: Generation of the output
generated_ids = model.generate(**inputs, max_new_tokens=128)
generated_ids_trimmed = [
out_ids[len(in_ids) :] for in_ids, out_ids in zip(inputs.input_ids, generated_ids)
]
output_text = processor.batch_decode(
generated_ids_trimmed, skip_special_tokens=True, clean_up_tokenization_spaces=False
)
print(output_text)
- Downloads last month
- 3
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
๐
Ask for provider support