Unverified Commit 32883b31 authored by Sylvain Gugger's avatar Sylvain Gugger Committed by GitHub
Browse files

Improve doc of use_cache (#5912)



* Improve doc of use_cache

* Update src/transformers/configuration_xlnet.py
Co-authored-by: default avatarTeven <teven.lescao@gmail.com>
Co-authored-by: default avatarTeven <teven.lescao@gmail.com>
parent 9ccb45a2
...@@ -111,7 +111,11 @@ class XLNetConfig(PretrainedConfig): ...@@ -111,7 +111,11 @@ class XLNetConfig(PretrainedConfig):
end_n_top (:obj:`int`, optional, defaults to 5): end_n_top (:obj:`int`, optional, defaults to 5):
Used in the SQuAD evaluation script for XLM and XLNet. Used in the SQuAD evaluation script for XLM and XLNet.
use_cache (:obj:`bool`, `optional`, defaults to :obj:`True`): 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:: Example::
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment