Spaces:
Runtime error
Runtime error
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -78,7 +78,7 @@ def model_worker(
|
|
| 78 |
}[args.dtype]
|
| 79 |
with default_tensor_type(dtype=target_dtype, device="cuda"):
|
| 80 |
model = MetaModel(args.llama_type, args.llama_config, tokenizer_path=args.tokenizer_path)
|
| 81 |
-
for ckpt_id in args.num_ckpts:
|
| 82 |
ckpt_path = hf_hub_download(repo_id=args.pretrained_path, filename=args.ckpt_format.format(str(ckpt_id)))
|
| 83 |
print(f"Loading pretrained weights {ckpt_path}")
|
| 84 |
checkpoint = torch.load(ckpt_path, map_location='cpu')
|
|
|
|
| 78 |
}[args.dtype]
|
| 79 |
with default_tensor_type(dtype=target_dtype, device="cuda"):
|
| 80 |
model = MetaModel(args.llama_type, args.llama_config, tokenizer_path=args.tokenizer_path)
|
| 81 |
+
for ckpt_id in range(args.num_ckpts):
|
| 82 |
ckpt_path = hf_hub_download(repo_id=args.pretrained_path, filename=args.ckpt_format.format(str(ckpt_id)))
|
| 83 |
print(f"Loading pretrained weights {ckpt_path}")
|
| 84 |
checkpoint = torch.load(ckpt_path, map_location='cpu')
|