vllm.plugins.lora_resolvers.hf_hub_resolver ¶
Classes:
Functions:
-
register_hf_hub_resolver–Register the Hf hub LoRA Resolver with vLLM
HfHubResolver ¶
Bases: FilesystemResolver
Methods:
-
resolve_lora–Resolves potential LoRA requests in a remote repo on HF Hub.
Source code in vllm/plugins/lora_resolvers/hf_hub_resolver.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | |
_get_adapter_dirs(repo_name) async ¶
Gets the subpaths within a HF repo that contain an adapter config.
Parameters:
Source code in vllm/plugins/lora_resolvers/hf_hub_resolver.py
_resolve_repo(lora_name) async ¶
Given a fully qualified path to a LoRA with respect to its HF Hub repo, match the right repo to potentially download from if one exists.
Parameters:
-
(lora_name¶str) –Path to LoRA in HF Hub, e.g.,
/ / , match on / (if it contains an adapter directly) or / / if it may have one in subdirs.
Source code in vllm/plugins/lora_resolvers/hf_hub_resolver.py
_resolve_repo_subpath(lora_name, maybe_repo) async ¶
Given the fully qualified path of the LoRA with respect to the HF Repo, get the subpath to download from assuming it's actually got an adapter in it.
Parameters:
-
(lora_name¶str) –Path to LoRA in HF Hub, e.g.,
/ / -
(maybe_repo¶str | None) –Path to the repo to match against if one exists.
Source code in vllm/plugins/lora_resolvers/hf_hub_resolver.py
resolve_lora(base_model_name, lora_name) async ¶
Resolves potential LoRA requests in a remote repo on HF Hub. This is effectively the same behavior as the filesystem resolver, but with a snapshot_download on dirs containing an adapter config prior to inspecting the cached dir to build a potential LoRA request.
Source code in vllm/plugins/lora_resolvers/hf_hub_resolver.py
register_hf_hub_resolver() ¶
Register the Hf hub LoRA Resolver with vLLM