Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

Commit

Permalink
fix mpt achitectures
Browse files Browse the repository at this point in the history
Signed-off-by: changwangss <[email protected]>
  • Loading branch information
changwangss committed Jun 28, 2024
1 parent f1dc6b8 commit c4450af
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 53 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -845,11 +845,7 @@ def forward(self, input: torch.Tensor) -> tuple[torch.Tensor, None]:
or device_map == "cpu"
or device_map == torch.device("cpu")
) and model.config.model_type == "mpt":
config = AutoConfig.from_pretrained(
os.path.join(os.path.dirname(__file__), "mosaicml_mpt-7b_config.json"),
torchscript=True
)
model.config = config
model.config.architectures = ["MptForCausalLM"]
model.eval()
model_type = model.config.model_type.replace("_", "-")

Expand Down

This file was deleted.

0 comments on commit c4450af

Please sign in to comment.