feat: Add ColBERT late interaction model support#33686
feat: Add ColBERT late interaction model support#33686noooop merged 8 commits intovllm-project:mainfrom
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 introduces support for ColBERT late interaction models, a valuable addition to vLLM's capabilities. The implementation is well-structured, spanning model configuration, entrypoints for both online and offline inference, and the model definition itself. The inclusion of comprehensive online and offline tests is commendable, ensuring the correctness and robustness of the new feature. My primary feedback concerns code duplication in the MaxSim scoring logic, which appears in both llm.py and serving.py. Consolidating this into a shared utility function would enhance the code's maintainability. Overall, this is a strong and well-executed contribution.
|
Hi @ieBoytsov, 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
|
|
Awesome work Ilya 🤗🤗 |
e4db81a to
8cc0a36
Compare
|
Hi @ieBoytsov, 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
|
8cc0a36 to
c6c49ba
Compare
|
Hi @ieBoytsov, 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
|
|
Awesome work!
|
|
Documentation preview: https://vllm--33686.org.readthedocs.build/en/33686/ |
|
Hi @noooop thanks for your comments, made a separate commit with docs, examples and minor fixes! |
|
Hi @ieBoytsov, 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: Ilya Boytsov <ilyaboytsov1805@gmail.com>
96587fd to
9b1743a
Compare
Co-authored-by: Cyrus Leung <cyrus.tl.leung@gmail.com> Signed-off-by: Ilya Boytsov <boytsovpanamera@mail.ru>
|
waiting #33794 for fix main fail. |
|
I see issues in the CI. Working on it :) |
Signed-off-by: Ilya Boytsov <ilyaboytsov1805@gmail.com>
Head branch was pushed to by a user without write access
| "ColBERTModel": _HfExamplesInfo( | ||
| "answerdotai/answerai-colbert-small-v1", | ||
| ), | ||
| "HF_ColBERT": _HfExamplesInfo("answerdotai/answerai-colbert-small-v1"), |
There was a problem hiding this comment.
I left only HF_ColBERT naming in the registry because it is from the original model https://huggingface.co/colbert-ir/colbertv2.0 and is also used in another model that we use in tests https://huggingface.co/answerdotai/answerai-colbert-small-v1
|
Hi @noooop I’ve pushed a small fix, could you please re-enable auto-merge or merge when you have a moment? Thanks in advance :) |
Signed-off-by: Ilya Boytsov <ilyaboytsov1805@gmail.com> Signed-off-by: Ilya Boytsov <boytsovpanamera@mail.ru> Co-authored-by: Cyrus Leung <cyrus.tl.leung@gmail.com> Co-authored-by: wang.yuqi <yuqi.wang@daocloud.io> Signed-off-by: felix01.yu <felix01.yu@vipshop.com>
Signed-off-by: Ilya Boytsov <ilyaboytsov1805@gmail.com> Signed-off-by: Ilya Boytsov <boytsovpanamera@mail.ru> Co-authored-by: Cyrus Leung <cyrus.tl.leung@gmail.com> Co-authored-by: wang.yuqi <yuqi.wang@daocloud.io>
Signed-off-by: Ilya Boytsov <ilyaboytsov1805@gmail.com> Signed-off-by: Ilya Boytsov <boytsovpanamera@mail.ru> Co-authored-by: Cyrus Leung <cyrus.tl.leung@gmail.com> Co-authored-by: wang.yuqi <yuqi.wang@daocloud.io>
Signed-off-by: Ilya Boytsov <ilyaboytsov1805@gmail.com> Signed-off-by: Ilya Boytsov <boytsovpanamera@mail.ru> Co-authored-by: Cyrus Leung <cyrus.tl.leung@gmail.com> Co-authored-by: wang.yuqi <yuqi.wang@daocloud.io>
Purpose
Add support for ColBERT late interaction models in vLLM. ColBERT is a retrieval model that uses per-token embeddings with MaxSim scoring, offering a balance between the accuracy of cross-encoders and the efficiency of bi-encoders.
Resolves #13827
Test Plan
Offline tests (embedding correctness, MaxSim scoring, HF comparison)
Online tests (rerank, score, pooling endpoints)
Test Result
All tests passed. Tests include:
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.