Run this model with HF Jobs
Run epatyukova/roberta-polymer-extractive-QA on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/epatyukova/roberta-polymer-extractive-QA. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/epatyukova/roberta-polymer-extractive-QA on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use epatyukova/roberta-polymer-extractive-QA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use epatyukova/roberta-polymer-extractive-QA 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="epatyukova/roberta-polymer-extractive-QA")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForQuestionAnswering tokenizer = AutoTokenizer.from_pretrained("epatyukova/roberta-polymer-extractive-QA") model = AutoModelForQuestionAnswering.from_pretrained("epatyukova/roberta-polymer-extractive-QA", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Model Trained Using AutoTrain
- Problem type: Extractive Question Answering
Validation
epatyukova/roberta-polymer-extractive-QA
EM: 79.74% F1: 81.27%
base-model: deepset/roberta-base-squad2
EM: 65.55% F1: 79.06%
Usage
from transformers import AutoTokenizer, AutoModelForQuestionAnswering
from transformers import pipeline
model_name = "epatyukova/roberta-polymer-extractive-QA "
model = AutoModelForQuestionAnswering.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)
qa = pipeline(
"question-answering",
model=model,
tokenizer=tokenizer,
device="mps" # or -1 for CPU
)
question, context = "What polymerisation method was used for synthesis?", "The polyester was synthesized using polycondensation in the melt from the mixture of monomers quinoline-2,4- dicarboxylic acid and 1,2-Propanediol."
test={'question': question,'context': context}
qa(test)
- Downloads last month
- 90