vllm.plugins.lora_resolvers.hf_hub_resolver ¶
HfHubResolver ¶
Bases: FilesystemResolver
Source code in vllm/plugins/lora_resolvers/hf_hub_resolver.py
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 | |
__init__ ¶
Source code in vllm/plugins/lora_resolvers/hf_hub_resolver.py
_get_adapter_dirs async ¶
Gets the subpaths within a HF repo that contain an adapter config.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
repo_name | str | Name of the HF hub repo to inspect. | required |
Source code in vllm/plugins/lora_resolvers/hf_hub_resolver.py
_resolve_repo 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:
| Name | Type | Description | Default |
|---|---|---|---|
lora_name | str | Path to LoRA in HF Hub, e.g., | required |
Source code in vllm/plugins/lora_resolvers/hf_hub_resolver.py
_resolve_repo_subpath 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:
| Name | Type | Description | Default |
|---|---|---|---|
lora_name | str | Path to LoRA in HF Hub, e.g., | required |
maybe_repo | str | None | Path to the repo to match against if one exists. | required |
Source code in vllm/plugins/lora_resolvers/hf_hub_resolver.py
resolve_lora async ¶
resolve_lora(
base_model_name: str, lora_name: str
) -> LoRARequest | None
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