产品 |
是否支持 |
---|---|
√ |
|
x |
|
x |
|
x |
|
x |
构造CacheKey,通常在KvCacheManager的allocate_cache、pull_cache或者CacheManager的allocate_cache、pull_cache接口中作为参数类型使用。
1 | __init__(*args, **kwargs) |
参数名称 |
数据类型 |
取值说明 |
---|---|---|
cluster_id或prompt_cluster_id |
int |
cache所在远端集群id,必填。
|
req_id |
int |
cache关联的req_id,必填。 |
model_id |
int |
cache关联的model_id,默认为0。 |
prefix_id |
int |
cache关联的公共前缀id,默认为2的64方-1。 |
1 2 | from llm_datadist import CacheKey cache_key = CacheKey(0, 1, 0) |
正常情况下返回CacheKey的实例。
传入数据类型错误情况下会抛出TypeError或ValueError异常。
无