From bc0829b6772bbfd0bc733c7346ce132e8eb2d3d4 Mon Sep 17 00:00:00 2001 From: will Date: Fri, 27 Oct 2023 13:21:56 -0700 Subject: [PATCH] Fix llama json loading (#2160) --- examples/llama.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/llama.py b/examples/llama.py index 7ea401e05b..c94080eef0 100755 --- a/examples/llama.py +++ b/examples/llama.py @@ -256,7 +256,7 @@ def concat_weights(models): def load(fn:str): if fn.endswith('.index.json'): with open(fn) as fp: weight_map = json.load(fp)['weight_map'] - parts = {n: load(Path(fn).parent / Path(n).name) for n in set(weight_map.values())} + parts = {n: load(str(Path(fn).parent / Path(n).name)) for n in set(weight_map.values())} return {k: parts[n][k] for k, n in weight_map.items()} elif fn.endswith(".safetensors"): return safe_load(fn)