Instructions to use Den4ikAI/rubert-tiny-squad with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Den4ikAI/rubert-tiny-squad with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("question-answering", model="Den4ikAI/rubert-tiny-squad")# Load model directly from transformers import AutoTokenizer, AutoModelForPreTraining tokenizer = AutoTokenizer.from_pretrained("Den4ikAI/rubert-tiny-squad") model = AutoModelForPreTraining.from_pretrained("Den4ikAI/rubert-tiny-squad", device_map="auto") - Notebooks
- Google Colab
- Kaggle
| license: mit | |
| pipeline_tag: question-answering | |
| widget: | |
| - context: "Пушкин родился 6 июля 1799 года" | |
| - text: "Когда родился Пушкин?" | |
| example_title: "test" | |
| обученный rubert от cointegrated/rubert-tiny2. | |
| размер выборки - 4. | |
| Эпохи - 16. | |
| ```python | |
| from transformers import pipeline | |
| qa_pipeline = pipeline( | |
| "question-answering", | |
| model="Den4ikAI/rubert-tiny-squad", | |
| tokenizer="Den4ikAI/rubert-tiny-squad" | |
| ) | |
| predictions = qa_pipeline({ | |
| 'context': "Пушкин родился 6 июля 1799 года", | |
| 'question': "Когда родился Пушкин?" | |
| }) | |
| print(predictions) | |
| # output: | |
| #{'score': 0.9413797664642334, 'start': 15, 'end': 31, 'answer': '6 июля 1799 года'} | |
| ``` |