Instructions to use Den4ikAI/rubert-large-squad with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Den4ikAI/rubert-large-squad with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "question-answering" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # pip install "transformers<5.0.0" from transformers import pipeline pipe = pipeline("question-answering", model="Den4ikAI/rubert-large-squad")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Den4ikAI/rubert-large-squad", device_map="auto") - Notebooks
- Google Colab
- Kaggle
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("Den4ikAI/rubert-large-squad", device_map="auto")Quick Links
обученный rubert от sberbank-ai/ruBert-base.
размер выборки - 4.
Эпохи - 2.
from transformers import pipeline
qa_pipeline = pipeline(
"question-answering",
model="Den4ikAI/rubert-large-squad",
tokenizer="Den4ikAI/rubert-large-squad"
)
predictions = qa_pipeline({
'context': "Пушкин родился 6 июля 1799 года",
'question': "Когда родился Пушкин?"
})
print(predictions)
# output:
#{'score': 0.9613797664642334, 'start': 15, 'end': 31, 'answer': '6 июля 1799 года'}
- Downloads last month
- 19
# Use a pipeline as a high-level helper # Warning: Pipeline type "question-answering" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # pip install "transformers<5.0.0" from transformers import pipeline pipe = pipeline("question-answering", model="Den4ikAI/rubert-large-squad")