You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment you can use hugging face's mask filling pipeline to predict 1 masked token in a sentence using the below:
!pip install -q transformers
from __future__ import print_function
import ipywidgets as widgets
from transformers import pipeline
nlp_fill = pipeline('fill-mask')
nlp_fill("I am going to guess <mask> in this sentence")
The request is that you also add the ability to predict N masked tokens rather than only 1 masked token. So that for example if the sentence is "I am going to make <mask> <mask> for breakfast" then the model might predict "fried eggs" for the 2 masked tokens
The text was updated successfully, but these errors were encountered:
p-christ
changed the title
Fill Mask more than 1 token
Feature Request: Fill Mask more than 1 token
Apr 3, 2020
At the moment you can use hugging face's mask filling pipeline to predict 1 masked token in a sentence using the below:
The request is that you also add the ability to predict N masked tokens rather than only 1 masked token. So that for example if the sentence is
"I am going to make <mask> <mask> for breakfast"
then the model might predict "fried eggs" for the 2 masked tokensThe text was updated successfully, but these errors were encountered: