Improve doc of use_cache (#5912)

* Improve doc of use_cache

* Update src/transformers/configuration_xlnet.py

Co-authored-by: Teven <teven.lescao@gmail.com>

Co-authored-by: Teven <teven.lescao@gmail.com>
This commit is contained in:
Sylvain Gugger 2020-07-20 11:50:41 -04:00 committed by GitHub
parent 9ccb45a263
commit 32883b310b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -111,7 +111,11 @@ class XLNetConfig(PretrainedConfig):
end_n_top (:obj:`int`, optional, defaults to 5):
Used in the SQuAD evaluation script for XLM and XLNet.
use_cache (:obj:`bool`, `optional`, defaults to :obj:`True`):
Differs slightly from other models as it is always turned on at training time.
Whether or not the model should return the last pre-computed hidden states.
.. note::
This flag behaves differently from with other models: it just controls the inference behavior, during
training the model always uses ``use_cache=True``.
Example::