stanfordnlp/imdb
Viewer • Updated • 100k • 234k • 374
How to use germla/satoken with sentence-transformers:
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("germla/satoken")
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]How to use germla/satoken with setfit:
from setfit import SetFitModel
model = SetFitModel.from_pretrained("germla/satoken")This is a SetFit model trained on multilingual datasets (mentioned below) for Sentiment classification.
The model has been trained using an efficient few-shot learning technique that involves:
It is utilized by Germla for it's feedback analysis tool. (specifically the Sentiment analysis feature)
For other models (specific language-basis) check here
To use this model for inference, first install the SetFit library:
python -m pip install setfit
You can then run inference as follows:
from setfit import SetFitModel
# Download from Hub and run inference
model = SetFitModel.from_pretrained("germla/satoken")
# Run inference
preds = model(["i loved the spiderman movie!", "pineapple on pizza is the worst 🤮"])
We made sure to have a balanced dataset. The model was trained on only 35% (50% for chinese) of the train split of all datasets.
The training procedure took 6hours on the NVIDIA T4 GPU.
from sentence_transformers import SentenceTransformer model = SentenceTransformer("germla/satoken") 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]