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
e135a6c9
"benchmark/git@developer.sourcefind.cn:zhaoyu6/sglang.git" did not exist on "14269198e3b59cf662da209cafdd7790c9dd634b"
Unverified
Commit
e135a6c9
authored
Dec 05, 2022
by
Francisco Kurucz
Committed by
GitHub
Dec 05, 2022
Browse files
Fix flax GPT-J-6B linking model in tests (#20556)
parent
24124709
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
tests/models/gptj/test_modeling_flax_gptj.py
tests/models/gptj/test_modeling_flax_gptj.py
+2
-2
No files found.
tests/models/gptj/test_modeling_flax_gptj.py
View file @
e135a6c9
...
...
@@ -202,7 +202,7 @@ class FlaxGPTJModelTest(FlaxModelTesterMixin, FlaxGenerationTesterMixin, unittes
tokenizer
=
GPT2Tokenizer
.
from_pretrained
(
"gpt2"
,
pad_token
=
"<|endoftext|>"
,
padding_side
=
"left"
)
inputs
=
tokenizer
([
"Hello this is a long string"
,
"Hey"
],
return_tensors
=
"np"
,
padding
=
True
,
truncation
=
True
)
model
=
FlaxGPTJForCausalLM
.
from_pretrained
(
"EleutherAI/gptj-6B"
)
model
=
FlaxGPTJForCausalLM
.
from_pretrained
(
"EleutherAI/gpt
-
j-6B"
)
model
.
do_sample
=
False
model
.
config
.
pad_token_id
=
model
.
config
.
eos_token_id
...
...
@@ -323,6 +323,6 @@ class FlaxGPTJModelTest(FlaxModelTesterMixin, FlaxGenerationTesterMixin, unittes
@
tooslow
def
test_model_from_pretrained
(
self
):
for
model_class_name
in
self
.
all_model_classes
:
model
=
model_class_name
.
from_pretrained
(
"EleutherAI/gptj-6B"
)
model
=
model_class_name
.
from_pretrained
(
"EleutherAI/gpt
-
j-6B"
)
outputs
=
model
(
np
.
ones
((
1
,
1
)))
self
.
assertIsNotNone
(
outputs
)
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