Instructions to use Den4ikAI/rubert_large_squad_2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Den4ikAI/rubert_large_squad_2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("question-answering", model="Den4ikAI/rubert_large_squad_2")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Den4ikAI/rubert_large_squad_2", dtype="auto") - Notebooks
- Google Colab
- Kaggle
File size: 792 Bytes
327bb9f 05c8a6b 327bb9f ba0a0c4 70a8bcb ba0a0c4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | ---
license: mit
pipeline_tag: question-answering
widget:
- context: "Пушкин родился 6 июля 1799 года"
- text: "Когда родился Пушкин?"
example_title: "test"
---
обученный rubert от sberbank-ai/ruBert-base.
размер выборки - 4.
Эпохи - 4.
```python
from transformers import pipeline
qa_pipeline = pipeline(
"question-answering",
model="Den4ikAI/rubert_large_squad_2",
tokenizer="Den4ikAI/rubert_large_squad_2"
)
predictions = qa_pipeline({
'context': "Пушкин родился 6 июля 1799 года",
'question': "Когда родился Пушкин?"
})
print(predictions)
# output:
#{'score': 0.8013797664642334, 'start': 15, 'end': 31, 'answer': '6 июля 1799 года'}
``` |