Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

Commit 98a3b11

Browse files
lesebgabe-l-hart
authored andcommitted
fix: allow multiple weight mapping files for mistral
Downloading a Mistral model fails because it includes multiple weight mapping files. The regression was introduced in commit `766bee9f4a1fcb187fae543a525495d3ff482097`. I'm unclear on the original intent, but perhaps the exception was meant to apply only to Granite models. This isn’t an ideal fix, but it does enable Mistral to be downloaded and used for chat. Signed-off-by: Sébastien Han <[email protected]>
1 parent e30aaa0 commit 98a3b11

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

torchchat/cli/convert_hf_checkpoint.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ def convert_hf_checkpoint(
4141

4242
# Load the json file containing weight mapping
4343
model_map_json_matches = [Path(m) for m in glob.glob(str(model_dir / "*.index.json"))]
44-
assert len(model_map_json_matches) <= 1, "Found multiple weight mapping files"
44+
if "mistral" not in model_name:
45+
assert len(model_map_json_matches) <= 1, "Found multiple weight mapping files"
4546
if len(model_map_json_matches):
4647
model_map_json = model_map_json_matches[0]
4748
else:

0 commit comments

Comments
 (0)