Simplify multi-tokenizer (#11295)
Signed-off-by: zhengkezhou1 <madzhou1@gmail.com> Co-authored-by: Liangsheng Yin <lsyincs@gmail.com>
This commit is contained in:
co-authored by
Liangsheng Yin
parent
dbb16bedd5
commit
260fe755b6
@@ -39,6 +39,7 @@ else:
|
||||
@dataclass
|
||||
class BaseReq(ABC):
|
||||
rid: Optional[Union[str, List[str]]] = field(default=None, kw_only=True)
|
||||
http_worker_ipc: Optional[str] = field(default=None, kw_only=True)
|
||||
|
||||
def regenerate_rid(self):
|
||||
"""Generate a new request ID and return it."""
|
||||
@@ -52,6 +53,7 @@ class BaseReq(ABC):
|
||||
@dataclass
|
||||
class BaseBatchReq(ABC):
|
||||
rids: Optional[List[str]] = field(default=None, kw_only=True)
|
||||
http_worker_ipcs: Optional[List[str]] = field(default=None, kw_only=True)
|
||||
|
||||
def regenerate_rids(self):
|
||||
"""Generate new request IDs and return them."""
|
||||
@@ -1407,18 +1409,6 @@ class LoRAUpdateOutput(BaseReq):
|
||||
LoadLoRAAdapterReqOutput = UnloadLoRAAdapterReqOutput = LoRAUpdateOutput
|
||||
|
||||
|
||||
@dataclass
|
||||
class MultiTokenizerRegisterReq(BaseBatchReq):
|
||||
ipc_name: Optional[str] = None
|
||||
|
||||
|
||||
@dataclass
|
||||
class MultiTokenizerWrapper:
|
||||
# FIXME(lsyin): remove this
|
||||
worker_id: int
|
||||
obj: Optional[Any] = None
|
||||
|
||||
|
||||
class BlockReqType(Enum):
|
||||
BLOCK = 1
|
||||
UNBLOCK = 2
|
||||
|
||||
Reference in New Issue
Block a user