Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Fill Mask more than 1 token #3619

Closed
p-christ opened this issue Apr 3, 2020 · 1 comment
Closed

Feature Request: Fill Mask more than 1 token #3619

p-christ opened this issue Apr 3, 2020 · 1 comment

Comments

@p-christ
Copy link

p-christ commented 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:

!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

@p-christ p-christ changed the title Fill Mask more than 1 token Feature Request: Fill Mask more than 1 token Apr 3, 2020
@julien-c
Copy link
Member

julien-c commented Apr 3, 2020

Duplicate of #3609

Not currently supported but we welcome a PR

@julien-c julien-c closed this as completed Apr 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants