Qwen_local_model
This commit is contained in:
@@ -17,6 +17,7 @@ class Settings(BaseModel):
|
||||
port: int = 8000
|
||||
openai_host: str = "0.0.0.0"
|
||||
openai_port: int = 8001
|
||||
public_model_name: str = "Qwen_local_model"
|
||||
model_root: str = "/opt/model"
|
||||
offline_mode: bool = True
|
||||
max_model_len: int = 8192
|
||||
@@ -44,6 +45,7 @@ def get_settings() -> Settings:
|
||||
port=runtime["port"],
|
||||
openai_host=runtime["openai_host"],
|
||||
openai_port=runtime["openai_port"],
|
||||
public_model_name=runtime["public_model_name"],
|
||||
model_root=runtime["model_root"],
|
||||
offline_mode=runtime["offline_mode"],
|
||||
api_key=runtime["api_key"],
|
||||
|
||||
@@ -68,6 +68,7 @@ def resolve_runtime_settings(content: dict[str, Any]) -> dict[str, Any]:
|
||||
"port": _to_int(api_service.get("port"), 8000),
|
||||
"openai_host": str(openai_service.get("host", "0.0.0.0")),
|
||||
"openai_port": _to_int(openai_service.get("port"), 8001),
|
||||
"public_model_name": _to_str(content.get("public_model_name"), "Qwen_local_model"),
|
||||
"api_key": str(content.get("api_key", "")).strip() or None,
|
||||
"tensor_parallel_size": _to_int(content.get("tensor_parallel_size"), 2),
|
||||
"dtype": str(content.get("dtype", "bfloat16")),
|
||||
|
||||
+2
-1
@@ -18,6 +18,7 @@ def build_command() -> list[str]:
|
||||
os.environ[key] = value
|
||||
host = str(runtime["openai_host"])
|
||||
port = str(runtime["openai_port"])
|
||||
public_model_name = str(runtime["public_model_name"]).strip()
|
||||
api_key = runtime["api_key"] or ""
|
||||
dtype = str(updates["dtype"] or runtime["dtype"])
|
||||
quantization = str(updates["quantization"] or "").strip()
|
||||
@@ -33,7 +34,7 @@ def build_command() -> list[str]:
|
||||
"--model",
|
||||
str(updates["model_name"]),
|
||||
"--served-model-name",
|
||||
str(updates["served_model_name"]),
|
||||
public_model_name or str(updates["served_model_name"]),
|
||||
"--tensor-parallel-size",
|
||||
str(updates["tensor_parallel_size"]),
|
||||
"--max-model-len",
|
||||
|
||||
Reference in New Issue
Block a user