Question Answering
Transformers
PyTorch
TensorFlow
JAX
Rust
Safetensors
English
roberta
Eval Results (legacy)
Instructions to use deepset/roberta-base-squad2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use deepset/roberta-base-squad2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("question-answering", model="deepset/roberta-base-squad2")# Load model directly from transformers import AutoTokenizer, AutoModelForQuestionAnswering tokenizer = AutoTokenizer.from_pretrained("deepset/roberta-base-squad2") model = AutoModelForQuestionAnswering.from_pretrained("deepset/roberta-base-squad2") - Inference
- Notebooks
- Google Colab
- Kaggle
How to load this model in java?
#15
by AhmadMujtaba200210 - opened
I am trying to make this model API in Java although I know I can create it easily in Python I want to go out of the box some how and want to know if is there any method or package for loading this model in java.
As the current method of loading this model in python is via transformer package in python. Is there any alternative for java?
I haven't used this library before, but I believe this library from HuggingFace might be helpful https://huggingface.co/docs/transformers.js/index
Update: Sorry that's for java script support.