Skip to content

Commit

Permalink
fix dbrx & opt model prefix bug (#2201)
Browse files Browse the repository at this point in the history
* Update idefics_causal_lm.py

Fix syntax issues

* fix dbrx & opt model prefix bug
  • Loading branch information
icyxp authored Jul 8, 2024
1 parent 05c094f commit 521d0d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ def __init__(self, prefix: str, config, weights):
else:
prefix = f"{prefix}.transformer"

self.model = DbrxModel(config, weights)
self.model = DbrxModel(prefix, config, weights)
self.lm_head = SpeculativeHead.load(
config,
prefix="lm_head",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ def __init__(self, prefix, config, weights):
else:
prefix = f"{prefix}.model"

self.model = OPTModel(config, weights)
self.model = OPTModel(prefix, config, weights)

self.lm_head = SpeculativeHead.load(
config, prefix=f"{prefix}.decoder.embed_tokens", weights=weights
Expand Down

0 comments on commit 521d0d9

Please sign in to comment.