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
OpenDAS
text-generation-inference
Commits
c9c65ab3
Unverified
Commit
c9c65ab3
authored
Jun 20, 2023
by
Nicolas Patry
Committed by
GitHub
Jun 20, 2023
Browse files
fix(server): Fixing T5 in case the names are mixed up. (#475)
parent
53aa9194
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
server/text_generation_server/models/custom_modeling/t5_modeling.py
...t_generation_server/models/custom_modeling/t5_modeling.py
+4
-1
No files found.
server/text_generation_server/models/custom_modeling/t5_modeling.py
View file @
c9c65ab3
...
...
@@ -1001,7 +1001,10 @@ class T5ForConditionalGeneration(T5PreTrainedModel):
super
().
__init__
(
config
)
self
.
model_dim
=
config
.
d_model
self
.
shared
=
TensorParallelEmbedding
(
prefix
=
"shared"
,
weights
=
weights
)
try
:
self
.
shared
=
TensorParallelEmbedding
(
prefix
=
"shared"
,
weights
=
weights
)
except
RuntimeError
:
self
.
shared
=
TensorParallelEmbedding
(
prefix
=
"encoder.embed_tokens"
,
weights
=
weights
)
encoder_config
=
copy
.
deepcopy
(
config
)
encoder_config
.
is_decoder
=
False
...
...
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