Skip to content

Conversation

@jairad26
Copy link
Contributor

@jairad26 jairad26 commented Oct 28, 2025

Description of changes

Summarize the changes made by this PR.

  • Improvements & Bug fixes
    • This PR adds colbert embedding functions to python clients. Since chroma accepts 1 embedding per document, the embedding function applies muvera to transform the multivec results from colbert to 1 embedding per document/query
  • New functionality
    • ...

Test plan

How are these changes tested?

  • [ x] Tests pass locally with pytest for python, yarn test for js, cargo test for rust

Migration plan

Are there any migrations, or any forwards/backwards compatibility changes needed in order to make sure this change deploys reliably?

Observability plan

What is the plan to instrument and monitor this change?

Documentation Changes

Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the docs section?

@github-actions
Copy link

Reviewer Checklist

Please leverage this checklist to ensure your code review is thorough before approving

Testing, Bugs, Errors, Logs, Documentation

  • Can you think of any use case in which the code does not behave as intended? Have they been tested?
  • Can you think of any inputs or external events that could break the code? Is user input validated and safe? Have they been tested?
  • If appropriate, are there adequate property based tests?
  • If appropriate, are there adequate unit tests?
  • Should any logging, debugging, tracing information be added or removed?
  • Are error messages user-friendly?
  • Have all documentation changes needed been made?
  • Have all non-obvious changes been commented?

System Compatibility

  • Are there any potential impacts on other parts of the system or backward compatibility?
  • Does this change intersect with any items on our roadmap, and if so, is there a plan for fitting them together?

Quality

  • Is this code of a unexpectedly high quality (Readability, Modularity, Intuitiveness)

Copy link
Contributor Author

jairad26 commented Oct 28, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@jairad26 jairad26 changed the base branch from jai/nomic-ef to graphite-base/5744 October 28, 2025 01:05
@jairad26 jairad26 changed the base branch from graphite-base/5744 to main October 28, 2025 01:06
@jairad26 jairad26 changed the title [ENH] Add muvera support [ENH] Add muvera and colBERT support to python client Oct 28, 2025
@jairad26 jairad26 marked this pull request as ready for review October 28, 2025 01:11
@propel-code-bot
Copy link
Contributor

propel-code-bot bot commented Oct 28, 2025

Add muvera fixed-dimensional encoding + ColBERT support to Python client

This PR introduces MuVERA-based fixed-dimensional encoding (FDE) to convert ColBERT multivector outputs into single-vector embeddings consumable by Chroma. A full NumPy implementation (chromadb/utils/muvera.py, ~700 LOC) is added, along with a new PylateColBERTEmbeddingFunction and optional multivector → FDE path for the existing JinaEmbeddingFunction. Support files (JSON schema, __init__.py, tests) are updated so the new EF is discoverable and validated.

Key Changes

• New file chromadb/utils/muvera.py implementing MuVERA FDE generation for both documents and queries, plus batch and helper utilities
• New embedding function PylateColBERTEmbeddingFunction wrapping pylate ColBERT models; uses create_fdes() to collapse multivectors
• Extended JinaEmbeddingFunction with return_multivector handling and FDE conversion via create_fdes()
• Schema file schemas/embedding_functions/pylate_colbert.json for config validation
• Registry updates in chromadb/utils/embedding_functions/__init__.py and test adjustments to include the new EF

Affected Areas

chromadb/utils/muvera.py
chromadb/utils/embedding_functions/*
• Embedding-function registry and tests
• JSON schema validation layer

This summary was automatically generated by @propel-code-bot

return "cosine"

def supported_spaces(self) -> List[Space]:
return ["cosine", "l2", "ip"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does it actually support all of these?

return "cosine"

def supported_spaces(self) -> List[Space]:
return ["cosine", "l2", "ip"]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

check if l2 actually works with muvera

Copy link
Contributor Author

@jairad26 jairad26 left a comment

Choose a reason for hiding this comment

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

does it auto-normalize? double check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants