mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-04-24 16:32:12 +00:00
fix dbrx & opt model prefix bug (#2201)
* Update idefics_causal_lm.py Fix syntax issues * fix dbrx & opt model prefix bug
This commit is contained in:
parent
508e308088
commit
8e3d1e6c3f
@ -711,7 +711,7 @@ class FlashDbrxForCausalLM(torch.nn.Module):
|
|||||||
else:
|
else:
|
||||||
prefix = f"{prefix}.transformer"
|
prefix = f"{prefix}.transformer"
|
||||||
|
|
||||||
self.model = DbrxModel(config, weights)
|
self.model = DbrxModel(prefix, config, weights)
|
||||||
self.lm_head = SpeculativeHead.load(
|
self.lm_head = SpeculativeHead.load(
|
||||||
config,
|
config,
|
||||||
prefix="lm_head",
|
prefix="lm_head",
|
||||||
|
@ -757,7 +757,7 @@ class OPTForCausalLM(OPTPreTrainedModel):
|
|||||||
else:
|
else:
|
||||||
prefix = f"{prefix}.model"
|
prefix = f"{prefix}.model"
|
||||||
|
|
||||||
self.model = OPTModel(config, weights)
|
self.model = OPTModel(prefix, config, weights)
|
||||||
|
|
||||||
self.lm_head = SpeculativeHead.load(
|
self.lm_head = SpeculativeHead.load(
|
||||||
config, prefix=f"{prefix}.decoder.embed_tokens", weights=weights
|
config, prefix=f"{prefix}.decoder.embed_tokens", weights=weights
|
||||||
|
Loading…
Reference in New Issue
Block a user