Skip to content

Commit 5492f26

Browse files
haozha111copybara-github
authored andcommitted
* Fix verfication code for phi. We shouldn't append model.safetensors since phi has >1 safetensors file.
* also disable openelm test for now until we find the rootcause of failure. PiperOrigin-RevId: 766260501
1 parent 30ad826 commit 5492f26

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

ai_edge_torch/generative/examples/phi/verify_util.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
"""Utils for verifying the Phi model."""
1616

1717
import logging
18-
import os
1918
import pathlib
2019
from typing import Callable, Dict
2120

@@ -39,7 +38,6 @@
3938
def verify_phi(
4039
version: str,
4140
checkpoint_dir: str,
42-
weight_filename: str = "model.safetensors",
4341
max_new_tokens: int = 30,
4442
prompts: list[str] | None = None,
4543
atol: float = 1e-04,
@@ -63,7 +61,7 @@ def verify_phi(
6361
)
6462
reauthored_checkpoint = pathlib.Path(cached_config_file).parent
6563
else:
66-
reauthored_checkpoint = os.path.join(checkpoint_dir, weight_filename)
64+
reauthored_checkpoint = checkpoint_dir
6765

6866
logging.info("Building the reauthored model from: %s", reauthored_checkpoint)
6967
reauthored_model = _BUILDER[version](

0 commit comments

Comments
 (0)