| |
| """Install the exact inference wheel used by this reproduction recipe.""" |
| import hashlib |
| import argparse |
| import subprocess |
| import sys |
| from huggingface_hub import hf_hub_download |
|
|
| parser = argparse.ArgumentParser(description=__doc__) |
| parser.add_argument("--fast", action="store_true", help="Also install the released optional vLLM dependencies") |
| args = parser.parse_args() |
| wheel = hf_hub_download( |
| "m-a-p/YuE2-3B", "yue2_infer-0.1.3-py3-none-any.whl", |
| revision="1a96eca688d6ae5d7f0feb88573fec89920fcd19", |
| ) |
| with open(wheel, "rb") as stream: |
| assert hashlib.sha256(stream.read()).hexdigest() == "156d6b8b7e46c3bd23cf22a50d3c20c403e5dc7f4a315582a224a840b01f4f07" |
| subprocess.check_call([sys.executable, "-m", "pip", "install", "--force-reinstall", "--no-deps", wheel]) |
| subprocess.check_call([sys.executable, "-m", "pip", "install", wheel + ("[fast]" if args.fast else "")]) |
|
|