-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
[Model][Frontend] Adding timeseries modality support and Qwen2.5-ChatTS model support #16852
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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 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 🚀 |
This pull request has merge conflicts that must be resolved before it can be |
868f817
to
af856a8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this model to vLLM and expanding the multi-modality code! Some initial comments.
1572d8e
to
d27a6d6
Compare
Please verify your model by following the guide in https://docs.vllm.ai/en/latest/contributing/model/tests.html Also make sure to add this model to the Supported Models page in the docs! |
@DarkLight1337 Thank you. I'll read the guide and see what's required to add the model. |
This pull request has merge conflicts that must be resolved before it can be |
@DarkLight1337 @ywang96 A kind ping about this. Please, could we merge this PR? |
Sorry for the delay, @Isotr0py @jeejeelee are you two able to help? I am quite busy lately. |
Regarding the prefix caching issue, maybe @heheda12345 can help as well? |
@Isotr0py All changes made as you suggested, thank you. Especially for catching the hardcoded float16. |
93577f7
to
9dfe24e
Compare
Because we only cache full blocks that won't be further modified. For example, with block_size 4, if we cache [E] of a request [ABCD,E], and there are two new requests [ABCD, EF] and [ABCD, EG] that reuse [E], they will modify block [E] with different values.
I'm not sure. Maybe you can print the block_ids and the kv_cache tensor of these blocks to see if there is any problem. |
Thank you for the explanation. I'm not sure this matches my observations, though. From my memory, when I was sending the exact same prompt four times, I saw:
So it looked like the tail had been cached, but only after the second try. I did try printing token IDs and vectors, but couldn't see anything obviously wrong - without the full understanding of the underlying caching machinery at least. I'm happy to look again if you could give me a hand with a bit more detailed insight into what exactly to debug. |
@Isotr0py @DarkLight1337 Looks like the tests are passing now, and comments by @Isotr0py have been implemented. Is it possible to merge the PR while we're looking at the caching issue, as it seems to be unrelated to this specific PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry again for the delay! Overall the PR looks good to me!
Please take a look to the failing basic model tests and multimodal tests. And nearly forgotten, can you update the |
Signed-off-by: Alexander Chemeris <[email protected]>
Signed-off-by: Alexander Chemeris <[email protected]>
Head branch was pushed to by a user without write access
Signed-off-by: Alexander Chemeris <[email protected]>
Signed-off-by: Alexander Chemeris <[email protected]>
valid_lengths = mask.sum(dim=1).long() # Shape: (batch_size) | ||
|
||
patch_cnt = (valid_lengths + self.patch_size - | ||
1) // self.patch_size # 向上取整 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1) // self.patch_size # 向上取整 | |
1) // self.patch_size |
@@ -0,0 +1,442 @@ | |||
# SPDX-License-Identifier: Apache-2.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# SPDX-License-Identifier: Apache-2.0 | |
# SPDX-License-Identifier: Apache-2.0 | |
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project |
dummy_inputs=Qwen3TSDummyInputsBuilder, | ||
) | ||
class Qwen3TSForCausalLM(nn.Module, SupportsMultiModal, SupportsPP, | ||
SupportsLoRA): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to add LoRA for multimodal models, you also need to implement get_mm_mapping
. Please refer to get_mm_mapping, or you can remove SupportsLoRA
@@ -0,0 +1,442 @@ | |||
# SPDX-License-Identifier: Apache-2.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# SPDX-License-Identifier: Apache-2.0 | |
# SPDX-License-Identifier: Apache-2.0 | |
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project |
This pull request has two parts:
Please refer to the official ChatTS documentation for details about the model architecture: https://github.com/NetManAIOps/ChatTS/
This code is based on the original ChatTS code, but works with the latest vllm code, and adds support for V1 vLLM engine and OpenAI API serving.
To use the current version of ChatTS requires
--trust-remote-code
and--hf-overrides
in order to load config and processing classes from the ChatTS HF repo, but use the vllm implementation of the model itself.Example script to serve ChatTS via an OpenAI API server with vLLM: