{"type":"rich","author_url":"https://blog.hatena.ne.jp/HTN20190109/","version":"1.0","blog_url":"https://htn20190109.hatenablog.com/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhtn20190109.hatenablog.com%2Fentry%2F2026%2F12%2F06%2F162715\" title=\" BertForQuestionAnswering - HTN20190109\u306e\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","height":"190","published":"2026-12-06 16:27:15","author_name":"HTN20190109","width":"100%","blog_title":"HTN20190109\u306e\u65e5\u8a18","provider_url":"https://hatena.blog","title":" BertForQuestionAnswering","description":"BertForQuestionAnswering \u306f Hugging Face Transformers \u306e\u30e2\u30c7\u30eb\u3067\u3001\u5165\u529b\u3055\u308c\u305f \u8cea\u554f\u3068\u304b\u3089\u56de\u7b54\u7b87\u6240\u306e\u958b\u59cb\u4f4d\u7f6e\u3068\u7d42\u4e86\u4f4d\u7f6e\u3092\u4e88\u6e2c\u3057\u307e\u3059 1. \u8cea\u554f\uff0b\u6587\u8108\u3092BERT\u3078\u5165\u529b2. \u5404\u30c8\u30fc\u30af\u30f3\u306b\u3064\u3044\u3066\u300c\u56de\u7b54\u958b\u59cb\u70b9\u300d\u3092\u4e88\u6e2c3. \u5404\u30c8\u30fc\u30af\u30f3\u306b\u3064\u3044\u3066\u300c\u56de\u7b54\u7d42\u4e86\u70b9\u300d\u3092\u4e88\u6e2c4. \u958b\u59cb\u4f4d\u7f6e\u3068\u7d42\u4e86\u4f4d\u7f6e\u304b\u3089\u56de\u7b54\u6587\u5b57\u5217\u3092\u5207\u308a\u51fa\u3059 from transformers import BertTokenizer, BertForQuestionAnsweringimport torch # \u30e2\u30c7\u30eb\u3068\u30c8\u30fc\u30af\u30ca\u30a4\u30b6\u30fcmodel_name = \"bert-large-uncased-w\u2026","image_url":null,"provider_name":"Hatena Blog","categories":["DL"],"url":"https://htn20190109.hatenablog.com/entry/2026/12/06/162715"}