mirror of
https://github.com/saymrwulf/transformers.git
synced 2026-05-14 20:58:08 +00:00
Fix RealmModelIntegrationTest.test_inference_open_qa (#21136)
fix Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
parent
a5327c6a9a
commit
a45914193a
1 changed files with 0 additions and 3 deletions
|
|
@ -480,15 +480,12 @@ class RealmModelIntegrationTest(unittest.TestCase):
|
|||
def test_inference_open_qa(self):
|
||||
from transformers.models.realm.retrieval_realm import RealmRetriever
|
||||
|
||||
config = RealmConfig()
|
||||
|
||||
tokenizer = RealmTokenizer.from_pretrained("google/realm-orqa-nq-openqa")
|
||||
retriever = RealmRetriever.from_pretrained("google/realm-orqa-nq-openqa")
|
||||
|
||||
model = RealmForOpenQA.from_pretrained(
|
||||
"google/realm-orqa-nq-openqa",
|
||||
retriever=retriever,
|
||||
config=config,
|
||||
)
|
||||
|
||||
question = "Who is the pioneer in modern computer science?"
|
||||
|
|
|
|||
Loading…
Reference in a new issue