-
Notifications
You must be signed in to change notification settings - Fork 276
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
fix: align readme with current mteb #1493
base: main
Are you sure you want to change the base?
Conversation
@@ -50,6 +50,8 @@ model_name = "average_word_embeddings_komninos" | |||
# model_name = "sentence-transformers/all-MiniLM-L6-v2" | |||
|
|||
model = SentenceTransformer(model_name) | |||
# or directly from mteb: | |||
model = mteb.get_model(model_name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we just recommend this one always?
and maybe rephrase to:
model = mteb.get_model(model_name) | |
model = mteb.get_model(model_name) # if the model is not implemented in MTEB it will be eq. to SentenceTransformer(model_name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but I'm not sure removing it is the best approach. I can make changes to whatever you think is better
|
||
class CustomModel: | ||
class CustomModel(Wrapper): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does it need to inherit from wrapper? I would instead inherit from the Encoder protocol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MTEB
class will wrap models that do not inherit from the wrapper class.
Lines 366 to 367 in 3ff38ec
if not isinstance(model, Wrapper): | |
model = SentenceTransformerWrapper(model) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, shouldn't it just wrap SentenceTransformers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can be like this. You changed it in mieb
Lines 356 to 357 in fab0b82
if isinstance(model, (SentenceTransformer, CrossEncoder)): | |
model = SentenceTransformerWrapper(model) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm then it will also be merged into v2.0.0 in which case we should probably just update the readme there (I plan to merge it during December)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, for now I think this PR can be merged, and I will update readme in the 2.0 branch
Checklist
make test
.make lint
.The current README is a bit misleading and causing issues for newcomers. See #1490 and #1491 for reference.