ainize / klue-bert-base-mrc

huggingface.co
Total runs: 76
24-hour runs: 1
7-day runs: 10
30-day runs: 12
Model's Last Updated: November 16 2021
question-answering

Introduction of klue-bert-base-mrc

Model Details of klue-bert-base-mrc

bert-base for QA

Code: See Ainize Workspace

klue-bert-base-mrc DEMO : Ainize DEMO

klue-bert-base-mrc API : Ainize API

Overview

Language model: klue/bert-base
Language: Korean
Downstream-task: Extractive QA
Training data: KLUE-MRC
Eval data: KLUE-MRC

Usage
In Transformers
from transformers import AutoModelForQuestionAnswering, AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("ainize/klue-bert-base-mrc")
model = AutoModelForQuestionAnswering.from_pretrained("ainize/klue-bert-base-mrc")

context = "your context"
question = "your question"

encodings = tokenizer(context, question, max_length=512, truncation=True,
                      padding="max_length", return_token_type_ids=False)
encodings = {key: torch.tensor([val]) for key, val in encodings.items()}             

input_ids = encodings["input_ids"]
attention_mask = encodings["attention_mask"]

pred = model(input_ids, attention_mask=attention_mask)

start_logits, end_logits = pred.start_logits, pred.end_logits

token_start_index, token_end_index = start_logits.argmax(dim=-1), end_logits.argmax(dim=-1)

pred_ids = input_ids[0][token_start_index: token_end_index + 1]

prediction = tokenizer.decode(pred_ids)
About us

Teachable NLP - Train NLP models with your own text without writing any code
Ainize - Deploy ML project using free gpu

Runs of ainize klue-bert-base-mrc on huggingface.co

76
Total runs
1
24-hour runs
10
3-day runs
10
7-day runs
12
30-day runs

More Information About klue-bert-base-mrc huggingface.co Model

More klue-bert-base-mrc license Visit here:

https://choosealicense.com/licenses/cc-by-sa-4.0

klue-bert-base-mrc huggingface.co

klue-bert-base-mrc huggingface.co is an AI model on huggingface.co that provides klue-bert-base-mrc's model effect (), which can be used instantly with this ainize klue-bert-base-mrc model. huggingface.co supports a free trial of the klue-bert-base-mrc model, and also provides paid use of the klue-bert-base-mrc. Support call klue-bert-base-mrc model through api, including Node.js, Python, http.

klue-bert-base-mrc huggingface.co Url

https://huggingface.co/ainize/klue-bert-base-mrc

ainize klue-bert-base-mrc online free

klue-bert-base-mrc huggingface.co is an online trial and call api platform, which integrates klue-bert-base-mrc's modeling effects, including api services, and provides a free online trial of klue-bert-base-mrc, you can try klue-bert-base-mrc online for free by clicking the link below.

ainize klue-bert-base-mrc online free url in huggingface.co:

https://huggingface.co/ainize/klue-bert-base-mrc

klue-bert-base-mrc install

klue-bert-base-mrc is an open source model from GitHub that offers a free installation service, and any user can find klue-bert-base-mrc on GitHub to install. At the same time, huggingface.co provides the effect of klue-bert-base-mrc install, users can directly use klue-bert-base-mrc installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

klue-bert-base-mrc install url in huggingface.co:

https://huggingface.co/ainize/klue-bert-base-mrc

Url of klue-bert-base-mrc

klue-bert-base-mrc huggingface.co Url

Provider of klue-bert-base-mrc huggingface.co

ainize
ORGANIZATIONS

Other API from ainize

huggingface.co

Total runs: 205
Run Growth: -140
Growth Rate: -68.29%
Updated:June 21 2021
huggingface.co

Total runs: 152
Run Growth: 8
Growth Rate: 5.26%
Updated:June 29 2021