Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
0511369a
Unverified
Commit
0511369a
authored
Jul 21, 2023
by
Arthur
Committed by
GitHub
Jul 21, 2023
Browse files
[`LlamaConfig`] Nit: pad token should be None by default (#24958)
* pad token should be None by default * fix tests * nits
parent
f74560d0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
src/transformers/models/llama/configuration_llama.py
src/transformers/models/llama/configuration_llama.py
+1
-1
tests/models/llama/test_modeling_llama.py
tests/models/llama/test_modeling_llama.py
+3
-0
No files found.
src/transformers/models/llama/configuration_llama.py
View file @
0511369a
...
...
@@ -116,7 +116,7 @@ class LlamaConfig(PretrainedConfig):
initializer_range
=
0.02
,
rms_norm_eps
=
1e-6
,
use_cache
=
True
,
pad_token_id
=
0
,
pad_token_id
=
None
,
bos_token_id
=
1
,
eos_token_id
=
2
,
pretraining_tp
=
1
,
...
...
tests/models/llama/test_modeling_llama.py
View file @
0511369a
...
...
@@ -58,6 +58,7 @@ class LlamaModelTester:
initializer_range
=
0.02
,
num_labels
=
3
,
num_choices
=
4
,
pad_token_id
=
0
,
scope
=
None
,
):
self
.
parent
=
parent
...
...
@@ -81,6 +82,7 @@ class LlamaModelTester:
self
.
initializer_range
=
initializer_range
self
.
num_labels
=
num_labels
self
.
num_choices
=
num_choices
self
.
pad_token_id
=
pad_token_id
self
.
scope
=
scope
def
prepare_config_and_inputs
(
self
):
...
...
@@ -120,6 +122,7 @@ class LlamaModelTester:
type_vocab_size
=
self
.
type_vocab_size
,
is_decoder
=
False
,
initializer_range
=
self
.
initializer_range
,
pad_token_id
=
self
.
pad_token_id
,
)
def
create_and_check_model
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment