setfit
setfit copied to clipboard
Efficient few-shot learning with Sentence Transformers
This pull request add supports as mentioned in the issue #8. - added `SetFitHead`, which inherited from Sentence Transformers' [Dense](https://github.com/UKPLab/sentence-transformers/blob/master/sentence_transformers/models/Dense.py) to make APIs consistent - integrated `SetFitHead` to `SetFitModel` -...
Hi, as far as I can see is that setfit applies LogisticRegression on top of the output of the sentence transformer model. See here: https://github.com/huggingface/setfit/blob/7735e8e3b208edb8dfb549beb16e585453c5f44e/src/setfit/modeling.py#L49-L55 The problem I see is...
Hi, since the sentence transformers support FP16 training (by setting `use_amp=True`) can this also be build in here? Not sure if this is a FR or a question. :-)
Hi, imo because of dry principle this function: https://github.com/huggingface/setfit/blob/7735e8e3b208edb8dfb549beb16e585453c5f44e/src/setfit/modeling.py#L61-L63 should just redirect to predict. Because of dry principle. Like this: ``` def __call__(self, inputs): return self.predict(inputs) ``` I can provide...
PR to solve #129
Add the README to the PyPI page. I have tested this locally by running ``` python setup.py bdist_wheel && python setup.py sdist twine check dist/* ``` as recommended on the...
Add support for zero-shot classification, as discussed in https://github.com/huggingface/setfit/issues/92. I have called the function `add_templated_examples` rather than `add_zero_shot_examples`, because if you are adding to an existing dataset then it isn't...
Can you please add documentation about the `loss_class` selection? There seems to be a new loss class implemented called `SupConLoss`. Maybe you could add some documentation how to select them...
Hi! This small change makes one able to pass additional arguments to `compute()` method called by `trainer.evaluate()`. It's needed to e.g. computing correctly `f1` metric in multilabel mode. Currently this...
I was curious about using SetFit for ordinal Likert scale outcomes (ie IMDB movie reviews). It doesn't seem like an obvious option in the SetFit API. Has anyone tried using...