Unable to use fill-mask pipeline on gpt-neo model
See original GitHub issueEnvironment info
transformers
version: 4.5.0- Platform: googleColab
- Python version:3.7
Models: GPT neo
Code :
#Import Hugging Face's Transformers
from transformers import pipeline
generator = pipeline('fill-mask', model='EleutherAI/gpt-neo-1.3B')
Error:
Can someone help me know what could the reason be for not able to use the fill-mask on gpt-neo
model?
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Error when trying to use GPTNeo model · Issue #11543 - GitHub
I'll post another snippet. from transformers import GPT2Tokenizer, GPTNeoForCausalLM, pipeline import tensorflowjs tokenizer = GPT2Tokenizer.
Read more >Pipelines - Hugging Face
This mask filling pipeline can currently be loaded from pipeline() using the following task identifier: "fill-mask" . The models that this pipeline can...
Read more >How to use GPT-3 for fill-mask tasks? - python - Stack Overflow
First of all, I don't think you can access properties like token or scores in GPT-3, all you have is the generated text....
Read more >AI Hello World | The FreeBSD Forums
Been playing last weekend with GPT-Neo-2.7B (2.7 Billion parameters), a pre-trained model from Eleuther.AI (open source, academic foundation ...
Read more >Transformers: State-of-the-Art Natural Language Processing
v4.11.0: GPT-J, Speech2Text2, FNet, Pipeline GPU utilization, dynamic model code loading GPT-J Three new models are released as part of the ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Isn’t the text generation specific to generating new text with a given prompt? => well, normally it is meant to generate new text given a prompt indeed. But as models like GPT-3 and GPT-neo are so powerful and are trained on a lot of data, they are capable of performing what the authors of GPT-3 call “in-context learning”: this means that the model knows what to do just based on a given prompt. See the GPT-3 paper for more info.
I’ve just tried it with GPT-3 and it works. However, GPT-neo doesn’t seem as powerful. This is logical since GPT-3 has 175 billion parameters, whereas GPT-neo only has 1.3 billion (there’s also a 2.7 billion variant available).
Maybe you can try by giving more examples in the prompt. Sometimes it seems to work:
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
Please note that issues that do not follow the contributing guidelines are likely to be ignored.