Python function
attention_dispatch_metadata
attention_dispatch_metadata()β
max.nn.kv_cache.attention_dispatch_metadata(kv_collection, *, device_idx=None)
Extracts the AttentionDispatchMetadata from a KV collection.
-
Parameters:
-
- kv_collection (PagedCacheValues) β The paged KV cache values to extract metadata from.
- device_idx (int | None) β Optional device index included in the error message when
dispatch_metadataisNone.
-
Returns:
-
The
AttentionDispatchMetadatastored on the collection. -
Raises:
-
ValueError β If
kv_collection.dispatch_metadataisNone. -
Return type:
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!