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
fe2877ce
"benchmark/git@developer.sourcefind.cn:change/sglang.git" did not exist on "7e3bb5270524d38bd98b93a22441fa693c3fa64c"
Unverified
Commit
fe2877ce
authored
Oct 26, 2023
by
Younes Belkada
Committed by
GitHub
Oct 26, 2023
Browse files
Remove unneeded prints in modeling_gpt_neox.py (#27080)
parent
efba1a17
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
4 deletions
+0
-4
src/transformers/models/gpt_neox/modeling_gpt_neox.py
src/transformers/models/gpt_neox/modeling_gpt_neox.py
+0
-4
No files found.
src/transformers/models/gpt_neox/modeling_gpt_neox.py
View file @
fe2877ce
...
@@ -804,9 +804,6 @@ class GPTNeoXForCausalLM(GPTNeoXPreTrainedModel):
...
@@ -804,9 +804,6 @@ class GPTNeoXForCausalLM(GPTNeoXPreTrainedModel):
self
,
input_ids
,
past_key_values
=
None
,
attention_mask
=
None
,
inputs_embeds
=
None
,
**
kwargs
self
,
input_ids
,
past_key_values
=
None
,
attention_mask
=
None
,
inputs_embeds
=
None
,
**
kwargs
):
):
input_shape
=
input_ids
.
shape
input_shape
=
input_ids
.
shape
print
(
input_shape
)
print
(
past_key_values
[
0
][
0
].
shape
if
past_key_values
is
not
None
else
"no pkv"
)
# cut decoder_input_ids if past is used
# cut decoder_input_ids if past is used
if
past_key_values
is
not
None
:
if
past_key_values
is
not
None
:
past_length
=
past_key_values
[
0
][
0
].
shape
[
2
]
past_length
=
past_key_values
[
0
][
0
].
shape
[
2
]
...
@@ -837,7 +834,6 @@ class GPTNeoXForCausalLM(GPTNeoXPreTrainedModel):
...
@@ -837,7 +834,6 @@ class GPTNeoXForCausalLM(GPTNeoXPreTrainedModel):
model_inputs
=
{
"inputs_embeds"
:
inputs_embeds
}
model_inputs
=
{
"inputs_embeds"
:
inputs_embeds
}
else
:
else
:
model_inputs
=
{
"input_ids"
:
input_ids
}
model_inputs
=
{
"input_ids"
:
input_ids
}
print
(
position_ids
.
shape
)
model_inputs
.
update
(
model_inputs
.
update
(
{
{
"attention_mask"
:
attention_mask
,
"attention_mask"
:
attention_mask
,
...
...
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