[ perf ] Replace json-> orjson in hot path (#11221)

Signed-off-by: vincentzed <207368749+vincentzed@users.noreply.github.com>
This commit is contained in:
Vincent Zhong
2025-10-12 08:30:58 -04:00
committed by GitHub
parent 7b064f04f8
commit a220536f40
13 changed files with 32 additions and 20 deletions

View File

@@ -22,6 +22,8 @@ import random
import tempfile
from typing import Dict, List, Literal, Optional, Union
import orjson
from sglang.srt.connector import ConnectorType
from sglang.srt.function_call.function_call_parser import FunctionCallParser
from sglang.srt.lora.lora_registry import LoRARef
@@ -3041,7 +3043,7 @@ class ServerArgs:
self.model_path,
trust_remote_code=self.trust_remote_code,
revision=self.revision,
model_override_args=json.loads(self.json_model_override_args),
model_override_args=orjson.loads(self.json_model_override_args),
**kwargs,
)
return hf_config