Unverified Commit c9c65ab3 authored by Nicolas Patry's avatar Nicolas Patry Committed by GitHub
Browse files

fix(server): Fixing T5 in case the names are mixed up. (#475)

parent 53aa9194
......@@ -1001,7 +1001,10 @@ class T5ForConditionalGeneration(T5PreTrainedModel):
super().__init__(config)
self.model_dim = config.d_model
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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment