Introduction of japanese-roberta-question-answering
Model Details of japanese-roberta-question-answering
RoBERTa base Japanese - JaQuAD
Description
A Japanese Question Answering model fine-tuned on
JaQuAD
.
Please refer
RoBERTa base Japanese
for details about the pre-training model.
The codes for the fine-tuning are available
on this notebook
Usage
from transformers import AutoModelForQuestionAnswering, AutoTokenizer
question = 'アレクサンダー・グラハム・ベルは、どこで生まれたの?'
context = 'アレクサンダー・グラハム・ベルは、スコットランド生まれの科学者、発明家、工学者である。世界初の>実用的電話の発明で知られている。'
model = AutoModelForQuestionAnswering.from_pretrained(
'ybelkada/japanese-roberta-question-answering')
tokenizer = AutoTokenizer.from_pretrained(
'ybelkada/japanese-roberta-question-answering')
inputs = tokenizer(
question, context, add_special_tokens=True, return_tensors="pt")
input_ids = inputs["input_ids"].tolist()[0]
outputs = model(**inputs)
answer_start_scores = outputs.start_logits
answer_end_scores = outputs.end_logits
# Get the most likely beginning of answer with the argmax of the score.
answer_start = torch.argmax(answer_start_scores)
# Get the most likely end of answer with the argmax of the score.# 1 is added to `answer_end` because the index pointed by score is inclusive.
answer_end = torch.argmax(answer_end_scores) + 1
answer = tokenizer.convert_tokens_to_string(
tokenizer.convert_ids_to_tokens(input_ids[answer_start:answer_end]))
# answer = 'スコットランド'
License
The fine-tuned model is licensed under the
CC BY-SA 3.0
license.
Miscellaneous
The Q&A widget does not work on that model. Tried also with
Pipeline
and I was able to reproduce the error, needs a further investigation
Runs of ybelkada japanese-roberta-question-answering on huggingface.co
173
Total runs
1
24-hour runs
-12
3-day runs
8
7-day runs
12
30-day runs
More Information About japanese-roberta-question-answering huggingface.co Model
More japanese-roberta-question-answering license Visit here:
japanese-roberta-question-answering huggingface.co is an AI model on huggingface.co that provides japanese-roberta-question-answering's model effect (), which can be used instantly with this ybelkada japanese-roberta-question-answering model. huggingface.co supports a free trial of the japanese-roberta-question-answering model, and also provides paid use of the japanese-roberta-question-answering. Support call japanese-roberta-question-answering model through api, including Node.js, Python, http.
japanese-roberta-question-answering huggingface.co is an online trial and call api platform, which integrates japanese-roberta-question-answering's modeling effects, including api services, and provides a free online trial of japanese-roberta-question-answering, you can try japanese-roberta-question-answering online for free by clicking the link below.
ybelkada japanese-roberta-question-answering online free url in huggingface.co:
japanese-roberta-question-answering is an open source model from GitHub that offers a free installation service, and any user can find japanese-roberta-question-answering on GitHub to install. At the same time, huggingface.co provides the effect of japanese-roberta-question-answering install, users can directly use japanese-roberta-question-answering installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
japanese-roberta-question-answering install url in huggingface.co: