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

Can't search with k over 128 #130

Closed
ABCbum opened this issue Feb 11, 2024 · 2 comments · Fixed by #131
Closed

Can't search with k over 128 #130

ABCbum opened this issue Feb 11, 2024 · 2 comments · Fixed by #131

Comments

@ABCbum
Copy link
Contributor

ABCbum commented Feb 11, 2024

Hi, I encountered an issue when searching with k > 128, it always returns a maximum of 128 results. Is this a known limitation or is there any configuration should pay attention to?

Some information:

  • The dataset has 800 docs.
  • Model: colbert-ir/colbertv2.0
  • Code:
from ragatouille import RAGPretrainedModel

# Indexing
RAG = RAGPretrainedModel.from_pretrained("colbert-ir/colbertv2.0")
index_path = RAG.index(index_name="my_index", collection=docs, document_ids=doc_ids)

# Retrieving
RAG = RAGPretrainedModel.from_index('.ragatouille/colbert/indexes/my_index')
results = RAG.search(query, k=200)
print(len(results))
# -> 128

Please let me know if you need more information. Thanks a lot for the help!

@okhat
Copy link
Collaborator

okhat commented Feb 11, 2024

need to use a larger value for ncells cc: @bclavie

@bclavie
Copy link
Owner

bclavie commented Feb 11, 2024

Well spotted, both ncells and ndocs weren't very well set up for larger k values. Will be fixed in #131 and (upcoming) associated release 0.0.6c2

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 a pull request may close this issue.

3 participants