knowledgator / comprehend_it-multilingual-t5-base

huggingface.co
Total runs: 98
24-hour runs: 0
7-day runs: -14
30-day runs: -14
Model's Last Updated: January 27 2024
zero-shot-classification

Introduction of comprehend_it-multilingual-t5-base

Model Details of comprehend_it-multilingual-t5-base

comprehend-it-multilang-base

This is an encoder-decoder model based on mT5-base that was trained on multi-language natural language inference datasets as well as on multiple text classification datasets.

The model demonstrates a better contextual understanding of text and verbalized label because both inputs are encoded by different parts of a model - encoder and decoder respectively.

The zero-shot classifier supports nearly 100 languages and can work in both directions, meaning that labels and text can belong to different languages.

Install the neccessary libraries before using it

Because of the different model architecture, we can't use transformers' "zero-shot-classification" pipeline. For that, we developed a special library called LiqFit . If you haven't install sentencepiece library you need to install it as well to use T5 tokenizers.

pip install liqfit sentencepiece
With the LiqFit pipeline

The model can be loaded with the zero-shot-classification pipeline like so:

from liqfit.pipeline import ZeroShotClassificationPipeline
from liqfit.models import T5ForZeroShotClassification
from transformers import T5Tokenizer

model = T5ForZeroShotClassification.from_pretrained('knowledgator/comprehend_it-multilingual-t5-base')
tokenizer = T5Tokenizer.from_pretrained('knowledgator/comprehend_it-multilingual-t5-base')
classifier = ZeroShotClassificationPipeline(model=model, tokenizer=tokenizer,
                                                      hypothesis_template = '{}', encoder_decoder = True)

You can then use this pipeline to classify sequences into any of the class names you specify.

sequence_to_classify = "one day I will see the world"
candidate_labels = ['travel', 'cooking', 'dancing']
classifier(sequence_to_classify, candidate_labels, multi_label=False)
{'sequence': 'one day I will see the world',
 'labels': ['travel', 'cooking', 'dancing'],
 'scores': [0.7350383996963501, 0.1484801471233368, 0.1164814680814743]}

Amoung Enlish you can use the model for many other languages, such as Ukrainian:

sequence_to_classify = "Одного дня я побачу цей світ."
candidate_labels = ['подорож', 'кулінарія', 'танці']
classifier(sequence_to_classify, candidate_labels, multi_label=False)
{'sequence': 'Одного дня я побачу цей світ.',
 'labels': ['подорож', 'кулінарія', 'танці'],
 'scores': [0.6393420696258545, 0.2657214105129242, 0.09493650496006012]}

The model works even if labels and text are different languages:

sequence_to_classify = "Одного дня я побачу цей світ"
candidate_labels = ['travel', 'cooking', 'dancing']
classifier(sequence_to_classify, candidate_labels, multi_label=False)
{'sequence': 'Одного дня я побачу цей світ',
 'labels': ['travel', 'cooking', 'dancing'],
 'scores': [0.7676175236701965, 0.15484870970249176, 0.07753374427556992]}
Benchmarking

Below, you can see the F1 score on several text classification datasets. All tested models were not fine-tuned on those datasets and were tested in a zero-shot setting.

Model IMDB AG_NEWS Emotions
Bart-large-mnli (407 M) 0.89 0.6887 0.3765
Deberta-base-v3 (184 M) 0.85 0.6455 0.5095
Comprehendo (184M) 0.90 0.7982 0.5660
Comprehendo-multi-lang (390M) 0.88 0.8372 -
SetFit BAAI/bge-small-en-v1.5 (33.4M) 0.86 0.5636 0.5754
Future reading

Check our blogpost - "The new milestone in zero-shot capabilities (it’s not Generative AI)." , where we highlighted possible use-cases of the model and why next-token prediction is not the only way to achive amazing zero-shot capabilites. While most of the AI industry is focused on generative AI and decoder-based models, we are committed to developing encoder-based models. We aim to achieve the same level of generalization for such models as their decoder brothers. Encoders have several wonderful properties, such as bidirectional attention, and they are the best choice for many information extraction tasks in terms of efficiency and controllability.

Feedback

We value your input! Share your feedback and suggestions to help us improve our models. Fill out the feedback form

Join Our Discord

Connect with our community on Discord for news, support, and discussion about our models. Join Discord

Runs of knowledgator comprehend_it-multilingual-t5-base on huggingface.co

98
Total runs
0
24-hour runs
7
3-day runs
-14
7-day runs
-14
30-day runs

More Information About comprehend_it-multilingual-t5-base huggingface.co Model

More comprehend_it-multilingual-t5-base license Visit here:

https://choosealicense.com/licenses/apache-2.0

comprehend_it-multilingual-t5-base huggingface.co

comprehend_it-multilingual-t5-base huggingface.co is an AI model on huggingface.co that provides comprehend_it-multilingual-t5-base's model effect (), which can be used instantly with this knowledgator comprehend_it-multilingual-t5-base model. huggingface.co supports a free trial of the comprehend_it-multilingual-t5-base model, and also provides paid use of the comprehend_it-multilingual-t5-base. Support call comprehend_it-multilingual-t5-base model through api, including Node.js, Python, http.

comprehend_it-multilingual-t5-base huggingface.co Url

https://huggingface.co/knowledgator/comprehend_it-multilingual-t5-base

knowledgator comprehend_it-multilingual-t5-base online free

comprehend_it-multilingual-t5-base huggingface.co is an online trial and call api platform, which integrates comprehend_it-multilingual-t5-base's modeling effects, including api services, and provides a free online trial of comprehend_it-multilingual-t5-base, you can try comprehend_it-multilingual-t5-base online for free by clicking the link below.

knowledgator comprehend_it-multilingual-t5-base online free url in huggingface.co:

https://huggingface.co/knowledgator/comprehend_it-multilingual-t5-base

comprehend_it-multilingual-t5-base install

comprehend_it-multilingual-t5-base is an open source model from GitHub that offers a free installation service, and any user can find comprehend_it-multilingual-t5-base on GitHub to install. At the same time, huggingface.co provides the effect of comprehend_it-multilingual-t5-base install, users can directly use comprehend_it-multilingual-t5-base installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

comprehend_it-multilingual-t5-base install url in huggingface.co:

https://huggingface.co/knowledgator/comprehend_it-multilingual-t5-base

Url of comprehend_it-multilingual-t5-base

comprehend_it-multilingual-t5-base huggingface.co Url

Provider of comprehend_it-multilingual-t5-base huggingface.co

knowledgator
ORGANIZATIONS

Other API from knowledgator