<h2 dir="auto">Environment info</h2>

<ul dir="auto">
<li><code class="notranslate">transformers</code> version:</li>
<li>Platform:</li>
<li>Python version:</li>
<li>PyTorch version (GPU?):</li>
<li>Tensorflow version (GPU?):</li>
<li>Using GPU in script?:</li>
<li>Using distributed or parallel set-up in script?:</li>
</ul>
<h3 dir="auto">Who can help</h3>

<h2 dir="auto">Information</h2>
<p dir="auto">Model I am using (Bert, XLNet ...):</p>
<p dir="auto">The problem arises when using:</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> the official example scripts: (give details below)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> my own modified scripts: (give details below)</li>
</ul>
<p dir="auto">The tasks I am working on is:</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> an official GLUE/SQUaD task: (give the name)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> my own task or dataset: (give details below)</li>
</ul>
<h2 dir="auto">To reproduce</h2>
<p dir="auto">Steps to reproduce the behavior:</p>
<ol dir="auto">
<li></li>
<li></li>
<li></li>
</ol>

<h2 dir="auto">Expected behavior</h2>

<p dir="auto">I want to down model from huggingface.cn, but I can't find the models to down.<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/49902228/98777922-8bf23780-242c-11eb-90b9-02d86cefac34.png"><img src="https://user-images.githubusercontent.com/49902228/98777922-8bf23780-242c-11eb-90b9-02d86cefac34.png" alt="down" style="max-width: 100%;"></a><br>
But I found the model had been download many times in noverber 9. Something happened I didn't know about? And what should I do to get models that I need?<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/49902228/98778321-23578a80-242d-11eb-9503-c46f3cde25f3.png"><img src="https://user-images.githubusercontent.com/49902228/98778321-23578a80-242d-11eb-9503-c46f3cde25f3.png" alt="have_down" style="max-width: 100%;"></a></p>
<h3 dir="auto">Feature request</h3>
<p dir="auto">Adding a filter of some sorts in the generate function to prevent x number of words from outside of the input from appearing in a generated text.</p>
<p dir="auto">This could work in a number of ways. It could be a filter on the number of out of source words appearing in the generated text (e.g 2 would mean that a maximum of 2 words could be present in the generated text but not in the source) or it could be some sort of damping variable (0 to 1) that's applied to the probabilities of each generated word therefore reducing the likelihood that out of source words would appear in the generated text. If the probability was set to 0 then the generation task would be purely extractive and have no risk of hallucinations.</p>
<h3 dir="auto">Motivation</h3>
<p dir="auto">To control the risk of hallucinations in the generated text.</p>
<h3 dir="auto">Your contribution</h3>
<p dir="auto">Happy to work on a PR for this if I just get a bit of guidance on the best place to start.</p>