Skip to content

feat: Add ColBERT late interaction model support#33686

Merged
noooop merged 8 commits intovllm-project:mainfrom
ieBoytsov:add-colbert-support
Feb 5, 2026
Merged

feat: Add ColBERT late interaction model support#33686
noooop merged 8 commits intovllm-project:mainfrom
ieBoytsov:add-colbert-support

Conversation

@ieBoytsov
Copy link
Copy Markdown
Contributor

@ieBoytsov ieBoytsov commented Feb 3, 2026

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)

  • pytest tests/models/language/pooling/test_colbert.py -v

Online tests (rerank, score, pooling endpoints)

  • pytest tests/entrypoints/pooling/score/test_online_colbert.py -v

Test Result

All tests passed. Tests include:

  • Comparison with embeddings from original HuggingFace model
  • Relevance ordering validation
  • MaxSim scoring correctness (1:1, 1:N, N:N configurations)
  • Various other cases for both offline and online scoring

Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.
  • (Optional) Release notes update. If your change is user facing, please update the release notes draft in the Google Doc.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 3, 2026

👋 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 fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors.

You ask your reviewers to trigger select CI tests on top of fastcheck CI.

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 ready label to the PR or enable auto-merge.

If you have any questions, please reach out to us on Slack at https://slack.vllm.ai.

🚀

@mergify mergify bot added frontend new-model Requests to new models labels Feb 3, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@mergify
Copy link
Copy Markdown

mergify bot commented Feb 3, 2026

Hi @ieBoytsov, the pre-commit checks have failed. Please run:

uv pip install pre-commit
pre-commit install
pre-commit run --all-files

Then, commit the changes and push to your branch.

For future commits, pre-commit will run automatically on changed files before each commit.

Tip

Is mypy or markdownlint failing?
mypy and markdownlint are run differently in CI. If the failure is related to either of these checks, please use the following commands to run them locally:
# For mypy (substitute "3.10" with the failing version if needed)
pre-commit run --hook-stage manual mypy-3.10
# For markdownlint
pre-commit run --hook-stage manual markdownlint

@tugot17
Copy link
Copy Markdown
Contributor

tugot17 commented Feb 3, 2026

Awesome work Ilya 🤗🤗

@ieBoytsov ieBoytsov force-pushed the add-colbert-support branch from e4db81a to 8cc0a36 Compare February 3, 2026 12:45
@mergify
Copy link
Copy Markdown

mergify bot commented Feb 3, 2026

Hi @ieBoytsov, the pre-commit checks have failed. Please run:

uv pip install pre-commit
pre-commit install
pre-commit run --all-files

Then, commit the changes and push to your branch.

For future commits, pre-commit will run automatically on changed files before each commit.

Tip

Is mypy or markdownlint failing?
mypy and markdownlint are run differently in CI. If the failure is related to either of these checks, please use the following commands to run them locally:
# For mypy (substitute "3.10" with the failing version if needed)
pre-commit run --hook-stage manual mypy-3.10
# For markdownlint
pre-commit run --hook-stage manual markdownlint

@ieBoytsov ieBoytsov force-pushed the add-colbert-support branch from 8cc0a36 to c6c49ba Compare February 3, 2026 12:57
@mergify
Copy link
Copy Markdown

mergify bot commented Feb 3, 2026

Hi @ieBoytsov, the pre-commit checks have failed. Please run:

uv pip install pre-commit
pre-commit install
pre-commit run --all-files

Then, commit the changes and push to your branch.

For future commits, pre-commit will run automatically on changed files before each commit.

Tip

Is mypy or markdownlint failing?
mypy and markdownlint are run differently in CI. If the failure is related to either of these checks, please use the following commands to run them locally:
# For mypy (substitute "3.10" with the failing version if needed)
pre-commit run --hook-stage manual mypy-3.10
# For markdownlint
pre-commit run --hook-stage manual markdownlint

@noooop
Copy link
Copy Markdown
Collaborator

noooop commented Feb 3, 2026

Awesome work!

@mergify
Copy link
Copy Markdown

mergify bot commented Feb 3, 2026

Documentation preview: https://vllm--33686.org.readthedocs.build/en/33686/

@mergify mergify bot added the documentation Improvements or additions to documentation label Feb 3, 2026
@ieBoytsov
Copy link
Copy Markdown
Contributor Author

Hi @noooop thanks for your comments, made a separate commit with docs, examples and minor fixes!

@mergify
Copy link
Copy Markdown

mergify bot commented Feb 4, 2026

Hi @ieBoytsov, the pre-commit checks have failed. Please run:

uv pip install pre-commit
pre-commit install
pre-commit run --all-files

Then, commit the changes and push to your branch.

For future commits, pre-commit will run automatically on changed files before each commit.

Tip

Is mypy or markdownlint failing?
mypy and markdownlint are run differently in CI. If the failure is related to either of these checks, please use the following commands to run them locally:
# For mypy (substitute "3.10" with the failing version if needed)
pre-commit run --hook-stage manual mypy-3.10
# For markdownlint
pre-commit run --hook-stage manual markdownlint

Signed-off-by: Ilya Boytsov <ilyaboytsov1805@gmail.com>
@ieBoytsov ieBoytsov force-pushed the add-colbert-support branch from 96587fd to 9b1743a Compare February 4, 2026 13:57
Co-authored-by: Cyrus Leung <cyrus.tl.leung@gmail.com>
Signed-off-by: Ilya Boytsov <boytsovpanamera@mail.ru>
@noooop noooop added ready ONLY add when PR is ready to merge/full CI is needed and removed ready ONLY add when PR is ready to merge/full CI is needed labels Feb 4, 2026
@noooop
Copy link
Copy Markdown
Collaborator

noooop commented Feb 4, 2026

waiting #33794 for fix main fail.

@noooop noooop enabled auto-merge (squash) February 4, 2026 15:56
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Feb 4, 2026
@ieBoytsov
Copy link
Copy Markdown
Contributor Author

I see issues in the CI. Working on it :)

Signed-off-by: Ilya Boytsov <ilyaboytsov1805@gmail.com>
auto-merge was automatically disabled February 4, 2026 17:23

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"),
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@ieBoytsov
Copy link
Copy Markdown
Contributor Author

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 :)

@noooop noooop merged commit 439afa4 into vllm-project:main Feb 5, 2026
52 checks passed
gameofdimension pushed a commit to gameofdimension/vllm that referenced this pull request Feb 5, 2026
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>
ItzDEXX pushed a commit to ItzDEXX/vllm that referenced this pull request Feb 19, 2026
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>
tunglinwood pushed a commit to tunglinwood/vllm that referenced this pull request Mar 4, 2026
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>
liuchenbing2026 pushed a commit to liuchenbing2026/vllm that referenced this pull request Apr 4, 2026
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation frontend new-model Requests to new models ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Support for ColBERT (Late-Interaction Retrieval) in vLLM

4 participants