[glm-asr] change defaults dummy audio size#35108
Conversation
|
👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels. Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run You ask your reviewers to trigger select CI tests on top of Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can either: Add If you have any questions, please reach out to us on Slack at https://slack.vllm.ai. 🚀 |
There was a problem hiding this comment.
Code Review
This pull request changes the default dummy audio size for multimodal model tests, likely to accommodate requirements for the glm-asr model. While this fixes the issue for glm-asr, changing the default for all models could potentially cause issues for other models. I've suggested a more targeted change that applies the new audio sizes only when testing glm-asr, keeping the original defaults for other models. This will prevent unintended side effects.
| "image": Image.new("RGB", size=(128, 128)), | ||
| "video": np.zeros((4, 128, 128, 3), dtype=np.uint8), | ||
| "audio": (np.zeros((512,)), 16000), | ||
| "audio": (np.zeros((1024,)), 16000), |
There was a problem hiding this comment.
Based on the PR title, this change is intended for the glm-asr model. To avoid affecting other models, it's better to apply this change conditionally. You can do this inline as suggested, or for better readability, define variables for the audio sizes before this block and use them here and on line 347.
| "audio": (np.zeros((1024,)), 16000), | |
| "audio": (np.zeros((1024 if model_config.hf_config.model_type == "glmasr" else 512,)), 16000), |
| random_video, rng, min_frames=2, max_frames=16, min_wh=128, max_wh=256 | ||
| ), | ||
| "audio": partial(random_audio, rng, min_len=512, max_len=1024, sr=16000), | ||
| "audio": partial(random_audio, rng, min_len=1024, max_len=1536, sr=16000), |
There was a problem hiding this comment.
Similarly, these values should be set conditionally for glm-asr to avoid affecting other models. You can do this inline as suggested, or for better readability, define variables for the audio sizes before the input_to_hit block and use them here.
| "audio": partial(random_audio, rng, min_len=1024, max_len=1536, sr=16000), | |
| "audio": partial(random_audio, rng, min_len=1024 if model_config.hf_config.model_type == "glmasr" else 512, max_len=1536 if model_config.hf_config.model_type == "glmasr" else 1024, sr=16000), |
|
Hi @eustlb, the pre-commit checks have failed. Please run: uv pip install pre-commit
pre-commit install
pre-commit run --all-filesThen, commit the changes and push to your branch. For future commits, Tip Is
|
Signed-off-by: Eustache Le Bihan <eulebihan@gmail.com>
Signed-off-by: Eustache Le Bihan <eulebihan@gmail.com>
Signed-off-by: Eustache Le Bihan <eulebihan@gmail.com>
8d3261b to
8b01cdf
Compare
Signed-off-by: Eustache Le Bihan <eulebihan@gmail.com>
Signed-off-by: Eustache Le Bihan <eulebihan@gmail.com>
Signed-off-by: Eustache Le Bihan <eulebihan@gmail.com>
Purpose
models/multimodal/processing/test_common.py::test_processing_correctness[1.0-32-0.3-zai-org/GLM-ASR-Nano-2512]fails because ofvllm/vllm/model_executor/models/glmasr.py
Lines 913 to 914 in d13ece3
Indeed since merged_factor is 4, we need at least 4 mel-features, which is at 160 hop length 7 * 160 = 1120, ie 70ms at 16000Hz.
Test Plan
Test Result
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.