mstar.engine.resources.lora.identity#
Which weights an adapter name stands for, as the prefix cache keys them.
A request on an adapter fills KV pages that differ from the base model’s for the same
tokens, so its prompt’s key chain hangs from a root that names the adapter’s weights
(adapter_prefix_root). The API server takes it from the adapter’s digest when it
selects the adapter for a request (ServedModels); nothing about an adapter travels
per step.
Functions
|
SHA-256 over everything an adapter's delta depends on, rank-independent. |
|
The root an adapter's key chains hang from. |
- mstar.engine.resources.lora.identity.adapter_digest(adapter)[source]#
SHA-256 over everything an adapter’s delta depends on, rank-independent.
adapteris aLoraAdapterasread_lora_filereturns it: every module’s name, alpha (the sidecar’s included), and A and B with their dtype and shape, so that equal bytes of a different shape or dtype digest apart.- Return type: