feat: Add model version tracking with API endpoints and response metadata (#8795)

This commit is contained in:
Chengxing Xie
2025-08-15 03:13:46 +08:00
committed by GitHub
parent 2cc9eeab01
commit c1c7dc4534
9 changed files with 320 additions and 1 deletions

View File

@@ -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

View File

@@ -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):