Instructions to use BeToast/xml_xnli__inclusiveORexclusive__binary_classification__frenchANDenglish with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use BeToast/xml_xnli__inclusiveORexclusive__binary_classification__frenchANDenglish with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("BeToast/xml_xnli__inclusiveORexclusive__binary_classification__frenchANDenglish") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - setfit
How to use BeToast/xml_xnli__inclusiveORexclusive__binary_classification__frenchANDenglish with setfit:
from setfit import SetFitModel model = SetFitModel.from_pretrained("BeToast/xml_xnli__inclusiveORexclusive__binary_classification__frenchANDenglish") - Notebooks
- Google Colab
- Kaggle
/content/model
This model is used for binary classification of racially/culturally exclusive or exclusive sentences in French and English languages.
It is a fine-tuned model of morit/french_xlm_xnli
on this dataset
with SetFit model
This model generalizes exclusivity well which is shown by the ability to detect exclusivity even to fictional races.
All code for entire experiments is in my gitrepo
Usage
Use example Google Collab notebook
Use this model in your own code:
python -m pip install setfit
You can then run predictions with the model:
from setfit import SetFitModel
# Download from Hub and run inference
model = SetFitModel.from_pretrained("/content/model")
# Run inclusive or exclusive binary classification.
predictions = model(["Elves are all snobs", "Elves are known for their high intelligence and wealth"])
predictions
- Downloads last month
- 5