Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion managed-inference/images/llama-cpp/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,29 @@ spec:
cpuFallback: reject
probes:
- health
- completion
- models
- synchronous-chat
- streaming-chat
- usage
- structured-output
- tool-call
- tool-result-continuation
- context-window
- authentication
- malformed-request
- cancellation
- client-timeout
probeBounds:
cancellationMaxTokens: 4096
clientTimeoutMilliseconds: 250
maxResponseBytes: 16777216
maxStreamEvents: 512
maxTokens:
synchronousChat: 16
streamingChat: 32
structuredOutput: 64
toolCall: 256
toolResultContinuation: 64

source:
repository: https://github.com/ggml-org/llama.cpp
Expand Down
11 changes: 10 additions & 1 deletion scripts/checks/export-llama-cpp-image-config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import Ajv2020 from "ajv/dist/2020.js";
import YAML from "yaml";

import {
LLAMA_CPP_DGX_SPARK_PROTOCOL_PROBES,
llamaCppDgxSparkExecutionPlanSha256,
parseLlamaCppDgxSparkExecutionPlan,
} from "./llama-cpp-dgx-spark-qualification-contract.mts";
Expand Down Expand Up @@ -50,6 +51,7 @@ type ServerImageManifest = {
gpu?: unknown;
model?: unknown;
platform?: unknown;
probeBounds?: unknown;
probes?: unknown;
profile?: unknown;
recipeRef?: unknown;
Expand Down Expand Up @@ -332,6 +334,7 @@ export function loadLlamaCppImageConfig(
"gpu",
"model",
"platform",
"probeBounds",
"probes",
"profile",
"recipeRef",
Expand Down Expand Up @@ -439,7 +442,7 @@ export function loadLlamaCppImageConfig(
fullOffload: true,
vendor: "nvidia",
}) ||
JSON.stringify(qualification?.probes) !== JSON.stringify(["health", "completion"])
JSON.stringify(qualification?.probes) !== JSON.stringify(LLAMA_CPP_DGX_SPARK_PROTOCOL_PROBES)
) {
throw new Error("invalid llama.cpp image publication contract");
}
Expand Down Expand Up @@ -536,6 +539,7 @@ export function loadLlamaCppImageConfig(
id: qualificationModel?.id,
},
platform: qualification?.platform,
probeBounds: qualification?.probeBounds,
probes: qualification?.probes,
profile: qualification?.profile,
recipeRef: qualificationRecipeRef,
Expand Down Expand Up @@ -669,7 +673,12 @@ export function loadLlamaCppImageConfig(
revision: spec?.source?.revision,
},
},
qualification: {
probeBounds: qualification?.probeBounds,
probes: qualification?.probes,
},
recipe: {
capabilities: recipe.spec.capabilities,
id: recipe.metadata.id,
model: {
acquisition: {
Expand Down
Loading
Loading