feat: Add model version tracking with API endpoints and response metadata (#8795)
This commit is contained in:
@@ -798,6 +798,8 @@ class UpdateWeightFromDiskReqInput:
|
||||
load_format: Optional[str] = None
|
||||
# Whether to abort all requests before updating weights
|
||||
abort_all_requests: bool = False
|
||||
# Optional: Update weight version along with weights
|
||||
weight_version: Optional[str] = None
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -819,6 +821,8 @@ class UpdateWeightsFromDistributedReqInput:
|
||||
flush_cache: bool = True
|
||||
# Whether to abort all requests before updating weights
|
||||
abort_all_requests: bool = False
|
||||
# Optional: Update weight version along with weights
|
||||
weight_version: Optional[str] = None
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -842,6 +846,8 @@ class UpdateWeightsFromTensorReqInput:
|
||||
flush_cache: bool = True
|
||||
# Whether to abort all requests before updating weights
|
||||
abort_all_requests: bool = False
|
||||
# Optional: Update weight version along with weights
|
||||
weight_version: Optional[str] = None
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -872,6 +878,14 @@ class InitWeightsUpdateGroupReqOutput:
|
||||
message: str
|
||||
|
||||
|
||||
@dataclass
|
||||
class UpdateWeightVersionReqInput:
|
||||
# The new weight version
|
||||
new_version: str
|
||||
# Whether to abort all running requests before updating
|
||||
abort_all_requests: bool = True
|
||||
|
||||
|
||||
@dataclass
|
||||
class GetWeightsByNameReqInput:
|
||||
name: str
|
||||
|
||||
@@ -1529,6 +1529,7 @@ class TokenizerManager:
|
||||
"id": rid,
|
||||
"finish_reason": recv_obj.finished_reasons[i],
|
||||
"prompt_tokens": recv_obj.prompt_tokens[i],
|
||||
"weight_version": self.server_args.weight_version,
|
||||
}
|
||||
|
||||
if getattr(state.obj, "return_logprob", False):
|
||||
|
||||
Reference in New Issue
Block a user