Skip to content
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

Add Colbert MLX #1866

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Add Colbert MLX #1866

wants to merge 7 commits into from

Conversation

ToluClassics
Copy link
Member

Could probably do with some redesign but here's a first pass at integrating MLX into Pyserini with ColBERT.

The tests and test outputs are similar to the same tests for the PyTorch hugging face implementation

@ToluClassics
Copy link
Member Author

Side Note: We have some duplicated code e.g.

class TctColBertQueryEncoder(QueryEncoder):

and

class TctColBertQueryEncoder(QueryEncoder):

Is there a particular reason we are keeping both?

@lintool
Copy link
Member

lintool commented Apr 21, 2024

@jacklin64 @justram can either of you take a look at this?

@ToluClassics
Copy link
Member Author

ToluClassics commented Apr 24, 2024

Bump on this @jacklin64 @justram .

Evaluating with this

python -m pyserini.search.faiss  \
    --index msmarco-v1-passage.tct_colbert.hnsw \
    --topics msmarco-passage-dev-subset \
    --encoder castorini/tct_colbert-msmarco \ 
    --encoder-class mlx_tct_colbert \
    --output runs/run.msmarco-passage.tct_colbert.hnsw.tsv \
    --output-format msmarco \
    --use_mlx 
Results:
#####################
MRR @10: 0.3344904943830437
QueriesRanked: 6980

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.

2 participants