"vscode:/vscode.git/clone" did not exist on "2a1ff2c0541d789655603883f74fb3bd4597e255"
Unverified Commit efb73fcb authored by drbh's avatar drbh Committed by GitHub
Browse files

fix: use path inside of speculator config (#1935)

This PR access the path on the speculator similar to
`MLPSpeculatorHead.load` and `MedusaHeadV1.load`


these changes resolves this error locally when loading a `MedusaHeadV2`
```
TypeError: expected str, bytes or os.PathLike object, not dict
```
parent 2f243a1a
......@@ -111,10 +111,10 @@ class MedusaHeadV2(nn.Module):
from safetensors import safe_open
import json
speculator = config.speculator
speculator_path = config.speculator["path"]
medusa_config = str(Path(speculator) / "config.json")
filename = str(Path(speculator) / "medusa_lm_head.safetensors")
medusa_config = str(Path(speculator_path) / "config.json")
filename = str(Path(speculator_path) / "medusa_lm_head.safetensors")
with open(medusa_config, "r") as f:
medusa_config = json.load(f)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment