Skip to content

Add Colbert MLX#1866

Open
ToluClassics wants to merge 7 commits intocastorini:masterfrom
ToluClassics:master
Open

Add Colbert MLX#1866
ToluClassics wants to merge 7 commits intocastorini:masterfrom
ToluClassics:master

Conversation

@ToluClassics
Copy link
Copy Markdown
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
Copy Markdown
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?

@ToluClassics ToluClassics requested a review from lintool April 19, 2024 01:24
@lintool lintool requested review from jacklin64 and justram April 21, 2024 13:09
@lintool
Copy link
Copy Markdown
Member

lintool commented Apr 21, 2024

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

@ToluClassics
Copy link
Copy Markdown
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