mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-10 20:04:52 +00:00
Complete OPTDecoder load parameters
This commit is contained in:
parent
5f76dae04a
commit
7d0aaede63
@ -444,14 +444,14 @@ class OPTDecoder(OPTPreTrainedModel):
|
|||||||
|
|
||||||
if config.word_embed_proj_dim != config.hidden_size:
|
if config.word_embed_proj_dim != config.hidden_size:
|
||||||
self.project_out = FastLinear.load(
|
self.project_out = FastLinear.load(
|
||||||
config, prefix="model.decoder.project_out", bias=False
|
config, prefix="model.decoder.project_out", weights=weights, bias=False
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
self.project_out = None
|
self.project_out = None
|
||||||
|
|
||||||
if config.word_embed_proj_dim != config.hidden_size:
|
if config.word_embed_proj_dim != config.hidden_size:
|
||||||
self.project_in = FastLinear.load(
|
self.project_in = FastLinear.load(
|
||||||
config, prefix="model.decoder.project_in", bias=False
|
config, prefix="model.decoder.project_in", weights=weights, bias=False
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
self.project_in = None
|
self.project_in = None
|
||||||
|
Loading…
Reference in New Issue
Block a user