Skip to content

Commit

Permalink
remove unused use_cache in config classes (#20844)
Browse files Browse the repository at this point in the history
remove unused use_cache in config classes

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
  • Loading branch information
ydshieh and ydshieh committed Dec 20, 2022
1 parent d0bfdd2 commit 2280880
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 12 deletions.
2 changes: 0 additions & 2 deletions src/transformers/models/canine/configuration_canine.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ def __init__(
type_vocab_size=16,
initializer_range=0.02,
layer_norm_eps=1e-12,
use_cache=True,
pad_token_id=0,
bos_token_id=0xE000,
eos_token_id=0xE001,
Expand All @@ -128,7 +127,6 @@ def __init__(
self.initializer_range = initializer_range
self.type_vocab_size = type_vocab_size
self.layer_norm_eps = layer_norm_eps
self.use_cache = use_cache

# Character config:
self.downsampling_rate = downsampling_rate
Expand Down
5 changes: 0 additions & 5 deletions src/transformers/models/lilt/configuration_lilt.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,6 @@ class LiltConfig(PretrainedConfig):
[Self-Attention with Relative Position Representations (Shaw et al.)](https://arxiv.org/abs/1803.02155).
For more information on `"relative_key_query"`, please refer to *Method 4* in [Improve Transformer Models
with Better Relative Position Embeddings (Huang et al.)](https://arxiv.org/abs/2009.13658).
use_cache (`bool`, *optional*, defaults to `True`):
Whether or not the model should return the last key/values attentions (not used by all models). Only
relevant if `config.is_decoder=True`.
classifier_dropout (`float`, *optional*):
The dropout ratio for the classification head.
channel_shrink_ratio (`int`, *optional*, defaults to 4):
Expand Down Expand Up @@ -111,7 +108,6 @@ def __init__(
layer_norm_eps=1e-12,
pad_token_id=0,
position_embedding_type="absolute",
use_cache=True,
classifier_dropout=None,
channel_shrink_ratio=4,
max_2d_position_embeddings=1024,
Expand All @@ -132,7 +128,6 @@ def __init__(
self.initializer_range = initializer_range
self.layer_norm_eps = layer_norm_eps
self.position_embedding_type = position_embedding_type
self.use_cache = use_cache
self.classifier_dropout = classifier_dropout
self.channel_shrink_ratio = channel_shrink_ratio
self.max_2d_position_embeddings = max_2d_position_embeddings
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,6 @@ class LongformerConfig(PretrainedConfig):
[Self-Attention with Relative Position Representations (Shaw et al.)](https://arxiv.org/abs/1803.02155).
For more information on `"relative_key_query"`, please refer to *Method 4* in [Improve Transformer Models
with Better Relative Position Embeddings (Huang et al.)](https://arxiv.org/abs/2009.13658).
use_cache (`bool`, *optional*, defaults to `True`):
Whether or not the model should return the last key/values attentions (not used by all models). Only
relevant if `config.is_decoder=True`.
classifier_dropout (`float`, *optional*):
The dropout ratio for the classification head.
attention_window (`int` or `List[int]`, *optional*, defaults to 512):
Expand Down Expand Up @@ -137,7 +134,6 @@ def __init__(
initializer_range: float = 0.02,
layer_norm_eps: float = 1e-12,
position_embedding_type: str = "absolute",
use_cache: bool = True,
classifier_dropout: float = None,
onnx_export: bool = False,
**kwargs
Expand All @@ -162,7 +158,6 @@ def __init__(
self.initializer_range = initializer_range
self.layer_norm_eps = layer_norm_eps
self.position_embedding_type = position_embedding_type
self.use_cache = use_cache
self.classifier_dropout = classifier_dropout
self.onnx_export = onnx_export

Expand Down

0 comments on commit 2280880

Please sign in to comment.