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

Pool_factor not changing embedding number #365

Open
John42506176Linux opened this issue Sep 12, 2024 Discussed in #363 · 2 comments
Open

Pool_factor not changing embedding number #365

John42506176Linux opened this issue Sep 12, 2024 Discussed in #363 · 2 comments

Comments

@John42506176Linux
Copy link

Discussed in #363

Originally posted by John42506176Linux September 7, 2024
Hi, Colbert community :),

I'm currently testing out Colbert, and I was curious how I could test multiple degrees of token pooling similar to this https://www.answer.ai/posts/colbert-pooling.html. Currently, when changing pool_factor I haven't seen any changes in the number of embeddings.

Here is the code being used.

Version: 0.2.20

from colbert.modeling.checkpoint import Checkpoint
from colbert.infra import ColBERTConfig

answer_ai = Checkpoint("answerdotai/answerai-colbert-small-v1", colbert_config=ColBERTConfig())

vectors = answer_ai.docFromText(documents,bsize=2, pool_factor=3, showprogress=True)[0]

@jbellis
Copy link
Contributor

jbellis commented Sep 22, 2024

pooling only executes on the keep_dims="flatten" path of docFromText. Related: #366

@jessiejuachon
Copy link
Collaborator

pooling only executes on the keep_dims="flatten" path of docFromText. Related: #366

I tried setting pool_factor=2, keep_dims='flatten', and bsize=1 just so it would enter path, but tensor.shape is the same.

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

No branches or pull requests

3 participants