-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmodelMetrics.ts
More file actions
28 lines (24 loc) · 1.1 KB
/
modelMetrics.ts
File metadata and controls
28 lines (24 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
const SGLANG_BASE = "https://metrics.swissai.svc.cscs.ch/d/sglang-monitoring/sglang-monitoring?orgId=1&from=now-15m&to=now&timezone=browser&refresh=5s&var-model=";
const VLLM_BASE = "https://metrics.swissai.svc.cscs.ch/d/vllm-master-v2/vllm-monitoring-v2?orgId=1&from=now-15m&to=now&timezone=browser&refresh=5s&var-model_name=";
type Engine = "sglang" | "vllm";
const modelEngines: Record<string, Engine> = {
"swiss-ai/Apertus-8B-Instruct-2509": "sglang",
"zai-org/GLM-4.7-Flash": "sglang",
"Snowflake/snowflake-arctic-embed-l-v2.0": "vllm",
"cais/HarmBench-Llama-2-13b-cls": "vllm",
"meta-llama/Llama-3.3-70B-Instruct": "sglang",
"meta-llama/Llama-Guard-4-12B": "vllm",
"swiss-ai/Apertus-70B-Instruct-2509": "vllm",
"Qwen/Qwen3.5-27B": "vllm",
};
/**
* Get the metrics dashboard URL for a model, or null if none exists
*/
export function getModelMetricsUrl(modelName: string): string | null {
const engine = modelEngines[modelName];
if (!engine) return null;
const encoded = encodeURIComponent(modelName);
return engine === "sglang"
? `${SGLANG_BASE}${encoded}`
: `${VLLM_BASE}${encoded}`;
}