Transformers update fixes
#1
by varun92 - opened
Update modeling-phi4-visionr.py to be compatible across transformers versions
- Account for the changes in image processing (Transformers 5.4.0 moved to TorchVisionBackend for image processing.)
- Account for the removed filter_out_non_signature_kwargs decorator
- Account for introduction of DynamicCache
varun92 changed pull request status to open
Testing :
vllm serve : vllm serve RedHatAI/Phi-4-reasoning-vision-15B --revision refs/pr/1 -tp 2 --trust-remote-code --async-scheduling --enable-chunked-prefill --enable-prefix-caching --limit-mm-per-prompt '{"image": 10}'
eval command : OPENAI_API_KEY=empty python -m lmms_eval --model openai --model_args model_version=RedHatAI/Phi-4-reasoning-vision-15B,base_url=http://localhost:8000/v1 --tasks mmmu_val --batch_size 1 --log_samples --output_path ./results/
transformers==5.5.3
| Tasks |Filter|n-shot| Metric | |Value | |Stderr|
|--------|------|-----:|--------|---|-----:|---|------|
|mmmu_val|none | 0|mmmu_acc|↑ |0.5122|± |N/A |
transformers==4.57.6
| Tasks |Filter|n-shot| Metric | |Value | |Stderr|
|--------|------|-----:|--------|---|-----:|---|------|
|mmmu_val|none | 0|mmmu_acc|↑ |0.5222|± |N/A |