A t5-model model to convert questions, answer pairs into statements.
Due to the way it's been trained the input should be all lower case and punctuation removed.
Use with
.
as the seperator between question and answer.
"where in the world is carmen. abruzzo"
Output: "carmen is in abruzzo"
Thought punctation and upper case works.
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained('domenicrosati/QA2D-t5-small')
model = AutoModelForSeq2SeqLM.from_pretrained('domenicrosati/QA2D-t5-small')
question = "where in the world is carmen sandiego"
answer = "she is in abruzzo"
SEP = ". "
prompt = f'{question}{SEP}{answer}'
input_ids = tokenizer(prompt, return_tensors='pt').input_ids
output_ids = model.generate(input_ids)
responses = tokenizer.batch_decode(output_ids, skip_special_tokens=True)
# ['carmen sandiego is in abruzzo']
Intended uses & limitations
To convert questions, answer pairs into statements.
QA2D-t5-small huggingface.co is an AI model on huggingface.co that provides QA2D-t5-small's model effect (), which can be used instantly with this domenicrosati QA2D-t5-small model. huggingface.co supports a free trial of the QA2D-t5-small model, and also provides paid use of the QA2D-t5-small. Support call QA2D-t5-small model through api, including Node.js, Python, http.
QA2D-t5-small huggingface.co is an online trial and call api platform, which integrates QA2D-t5-small's modeling effects, including api services, and provides a free online trial of QA2D-t5-small, you can try QA2D-t5-small online for free by clicking the link below.
domenicrosati QA2D-t5-small online free url in huggingface.co:
QA2D-t5-small is an open source model from GitHub that offers a free installation service, and any user can find QA2D-t5-small on GitHub to install. At the same time, huggingface.co provides the effect of QA2D-t5-small install, users can directly use QA2D-t5-small installed effect in huggingface.co for debugging and trial. It also supports api for free installation.