Downloads · 30 days
82
9% of all-time downloads
Geraldxm/Qwen2.5-VL-7B-Instruct-eagle3-sgl
Qwen2.5-VL-7B-Instruct-eagle3-sgl is a machine learning model from Geraldxm. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
We trained Qwen2.5-VL-7B/32B/72B-Instruct EAGLE3 draft models on 95K randomly selected samples from the FreedomIntelligence/ALLaVA-4V dataset using SpecForge.
Downloads · 30 days
82
9% of all-time downloads
All-time downloads
945
Public
Parameters
403M
818 MB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors806 MB · 99%
How the weights are stored.
BF16403M · 100%
From the Hugging Face model README
We trained Qwen2.5-VL-7B/32B/72B-Instruct EAGLE3 draft models on 95K randomly selected samples from the FreedomIntelligence/ALLaVA-4V dataset using SpecForge.
Infer with SGLang.
Recommended configuration for H200: 3-4 steps, 10 topk, 64 draft tokens.
python -m sglang.launch_server \
--model-path Qwen/Qwen2.5-VL-7B-Instruct \
--speculative-draft Geraldxm/Qwen2.5-VL-7B-Instruct-eagle3-sgl \
--trust-remote-code \
--chat-template qwen2-vl \
--chunked-prefill-size -1 \
--cuda-graph-max-bs 1 \
--speculative-algo EAGLE3 \
--speculative-num-steps 4 \
--speculative-eagle-topk 10 \
--speculative-num-draft-tokens 64 \
--tp 1 \
--mem-fraction-static 0.7 \
--host 0.0.0.0 \
--port 3000
Benchmark with SpecForge benchmarkers.
cd path/to/SpecForge/benchmarks
python bench_eagle3.py \
--model Qwen/Qwen2.5-VL-7B-Instruct \
--speculative-algorithm EAGLE3 \
--speculative-draft-model-path Geraldxm/Qwen2.5-VL-7B-Instruct-eagle3-sgl \
--cuda-graph-max-bs 1 \
--tp 1 \
--config-list 1,0,0,0 1,4,10,64 \
--mem-fraction-static 0.6 \
--port 30000 \
--dtype bfloat16 \
--benchmark-list "humaneval:50" "mmlu:50:all" "mmstar:100" "math500:50"
Qwen2.5-VL-7B-Instruct: Up to 1.68x speedup on MMStar benchmark (TP=1) <img src="./imgs/Qwen2.5-VL-7B/0_throughput_comparison.png" alt="Qwen2.5-VL-7B Throughput Comparison" width="600">
Qwen2.5-VL-32B-Instruct: Up to 1.52x speedup on MMStar benchmark (TP=4) <img src="./imgs/Qwen2.5-VL-32B/0_throughput_comparison.png" alt="Qwen2.5-VL-32B Throughput Comparison" width="600">
Qwen2.5-VL-72B-Instruct: Up to 2.04x speedup on MMStar benchmark (TP=4) <img src="./imgs/Qwen2.5-VL-72B/0_throughput_comparison.png" alt="Qwen2.5-VL-72B Throughput Comparison" width="600">
We evaluated the models on four datasets representing different task types:
Key Findings:
MMStar: Achieved the best performance gains with accept_length typically reaching ~3.5, sometimes approaching 4.5. This is likely due to the similarity between the training dataset ALLaVA-4V (multimodal tasks) and MMStar's distribution.
HumanEval: Unexpectedly, none of the 7B/32B/72B models showed throughput improvements, and accuracy remained consistently at 0. This appears to be a bug that requires further investigation.
MMLU/Math500: Accept_length remained relatively consistent, typically ranging from 2 to 2.5.
Based on extensive experiments, we recommend the following configuration for H200 GPUs:
It can be observed that larger models (72B) achieve better acceleration. The reason the 32B model has a smaller speedup compared to the 7B model is that it uses TP=4, while the 7B model uses TP=1.
<img src="./imgs/Global_Analysis/global_size_scaling.png" alt="Size Comparison" width="800">We trained the draft model on 4×H200 GPUs following the train qwen2.5-vl eagle3 guide.
The training loss and accuracy curves are shown below:
<img src="./imgs/Global_Analysis/training_curves.png" alt="Training Loss and Accuracy" width="800">When directly using the training scripts from the PR, several issues may arise. Below we outline the problems encountered and their solutions. We plan to submit a new PR to address these issues in the SpecForge repository.
Issue: Data loading stalls at 0% (Deadlock).
Solution: Set export OMP_NUM_THREADS=1 in the launch script to force the underlying library to run in single-threaded mode.
Issues Identified:
.cuda() before FSDP sharding causes each GPU to load the full large model, doubling memory usage during initialization.Solutions:
.cuda() during model loading (keep on CPU)device_id during FSDP initialization to enable streaming sharded loading from CPU to GPUtransformer_auto_wrap_policy to wrap by layer (Decoder Layer)SHARD_GRAD_OP to FULL_SHARD (ZeRO-3)FullStateDictConfig(offload_to_cpu=True, rank0_only=True) to move parameter aggregation from GPU memory to CPU memoryThese solutions are verified to work for 32B/72B models.