Skip to content
Draft
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
109 changes: 109 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@ native-full-replay backend="cpu": llama-prepare
cache-reuse-smoke base_url model prompt_file output wave="4":
@cargo run --locked -p skippy-correctness -- open-ai-cache-reuse --base-url "{{ base_url }}" --model "{{ model }}" --prompt-file "{{ prompt_file }}" --wave "{{ wave }}" > "{{ output }}"

# Explicit hardware capture; never part of the offline/default test suite.
receipts-metal-build: llama-prepare
cmake -S evals/receipts-metal -B target/receipts-metal -G Ninja -DCMAKE_BUILD_TYPE=Release -DNATIVE_SOURCE="$(cd '{{llama_dir}}' && pwd)"
cmake --build target/receipts-metal --parallel 8

kv-matrix-build native_lib_dir: llama-prepare
#!/usr/bin/env bash
set -euo pipefail
Expand Down
1 change: 1 addition & 0 deletions crates/skippy-api/src/execution/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ pub(super) fn model_request(
telemetry_queue_capacity: 0,
telemetry_level: telemetry.level,
session_lifecycle_observer: None,
receipts: None,
},
openai,
open_events: ModelOpenEvents::Disabled,
Expand Down
1 change: 1 addition & 0 deletions crates/skippy-api/src/execution/split.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ fn worker_options(
) -> Result<BinaryStageOptions, ExecutionError> {
let config = plan.worker.clone();
Ok(BinaryStageOptions {
receipts: None,
max_inflight: config.lane_count as usize,
config,
topology: Some(plan.topology.clone()),
Expand Down
2 changes: 1 addition & 1 deletion crates/skippy-api/src/native-recipe.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"llama_upstream_sha": "5bacb7c868a2bc98682de15f447fc1ce17c9c49c",
"patch_queue_sha256": "fe6cef31db7cba6ce8f428a84eee1a816d870135cf182b0f4027b0763f8dbe37"
"patch_queue_sha256": "e4ace1fd27d987644e56f651454f2902e08c337707286901f02ea3018b7aca5f"
}
1 change: 1 addition & 0 deletions crates/skippy-api/src/serving/lifecycle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ mod tests {
telemetry_queue_capacity: 0,
telemetry_level: skippy_serving::telemetry::TelemetryLevel::Off,
session_lifecycle_observer: None,
receipts: None,
},
open_events: ModelOpenEvents::Disabled,
hooks_factory: None,
Expand Down
1 change: 1 addition & 0 deletions crates/skippy-api/src/serving/local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ impl LocalOpenAiOptions {
telemetry_queue_capacity: self.telemetry_queue_capacity,
telemetry_level: self.telemetry_level,
session_lifecycle_observer: None,
receipts: None,
},
openai,
open_events,
Expand Down
1 change: 1 addition & 0 deletions crates/skippy-api/tests/model_open_observer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ fn observed_request(config: StageConfig) -> (ModelLoadRequest, Receiver<ModelOpe
telemetry_queue_capacity: 0,
telemetry_level: skippy_serving::telemetry::TelemetryLevel::Off,
session_lifecycle_observer: None,
receipts: None,
},
open_events: ModelOpenEvents::observe(move |observation| {
let _ = tx.send(observation);
Expand Down
2 changes: 2 additions & 0 deletions crates/skippy-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ skippy-gpu-bench = { path = "../skippy-gpu-bench", version = "0.80.0" }
tempfile = "3"
anyhow.workspace = true
dirs = "6.0.0"
hex = "0.4"
clap.workspace = true
skippy-analytics = { path = "../skippy-analytics", version = "0.80.0" }
skippy-api = { path = "../skippy-api", version = "0.80.0" }
skippy-cache = { path = "../skippy-cache", version = "0.80.0" }
skippy-commands = { path = "../skippy-commands", version = "0.80.0" }
skippy-receipt-audit = { path = "../skippy-receipt-audit", version = "0.80.0" }
skippy-model-hf = { path = "../skippy-model-hf", version = "0.80.0" }
skippy-model-artifact = { path = "../skippy-model-artifact", version = "0.80.0" }
skippy-inference-api = { path = "../skippy-inference-api", version = "0.80.0" }
Expand Down
2 changes: 2 additions & 0 deletions crates/skippy-cli/src/analytics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ pub fn family(command: &Command) -> &'static str {
Command::Models { .. } => "models",
Command::PlanSplit(_) => "plan_split",
Command::Runtime { .. } => "runtime",
Command::AuditReceipt(_) => "audit_receipt",
Command::RecheckReceipt(_) => "recheck_receipt",
Command::Analytics { .. } => "analytics",
}
}
Expand Down
6 changes: 6 additions & 0 deletions crates/skippy-cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ pub enum Command {
},
/// Plan and admit a direct GGUF split for explicit worker endpoints.
PlanSplit(PlanSplitArgs),
/// Send a chat request to a node serving with receipts, then audit the receipt.
AuditReceipt(crate::receipts::AuditReceiptArgs),
/// Check an audit's evidence again from the file and the claimed GGUF alone.
RecheckReceipt(crate::receipts::RecheckReceiptArgs),
/// List, install, remove, or prune verified native runtime bundles.
Runtime {
#[command(subcommand)]
Expand Down Expand Up @@ -160,6 +164,8 @@ pub struct ServeBinaryArgs {
pub worker_only: bool,
#[arg(skip)]
pub api_bind_addr: Option<SocketAddr>,
#[command(flatten)]
pub receipts: crate::receipts::ServeReceiptsArgs,
#[arg(long, default_value_t = 4)]
pub max_inflight: usize,
#[arg(long)]
Expand Down
2 changes: 2 additions & 0 deletions crates/skippy-cli/src/conversion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ pub fn binary_stage_options(args: ServeBinaryArgs) -> Result<BinaryStageOptions>
native_mtp_min_tokens: openai_speculative.native_mtp.min_draft_tokens,
speculative: openai_speculative,
});
let receipts = args.receipts.stage_options(&config.model_id)?;
let native_mtp_enabled = config.native_mtp_enabled;
Ok(BinaryStageOptions {
tuning: tuning.clone(),
Expand All @@ -154,6 +155,7 @@ pub fn binary_stage_options(args: ServeBinaryArgs) -> Result<BinaryStageOptions>
split_dflash: None,
openai,
l3_manager: None,
receipts,
})
}

Expand Down
11 changes: 9 additions & 2 deletions crates/skippy-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ mod managed;
mod model_source;
mod multi_model;
mod native_logging;
mod receipts;
mod residency;
mod runtime;
mod serve;
Expand Down Expand Up @@ -74,7 +75,8 @@ fn run_application(cli: Cli, startup_warnings: Vec<String>) -> std::process::Exi
Err(error) => {
native_logs.flush_on_error();
let _ = skippy_commands::console::failure(&error);
std::process::ExitCode::FAILURE
// a receipt audit that did not pass names its own exit code
receipts::audit_exit_code(&error).unwrap_or(std::process::ExitCode::FAILURE)
}
}
}
Expand Down Expand Up @@ -144,7 +146,10 @@ async fn run_command(cli: Cli, native_logs: Arc<native_logging::NativeDiagnostic
let native_options = runtime::resolve_options(cli.native_runtime)?;
#[cfg(feature = "dynamic-native-runtime")]
if matches!(&cli.command, Command::Serve(args) if !args.print_effective_config || args.public.config.is_none())
|| matches!(&cli.command, Command::PlanSplit(_))
|| matches!(
&cli.command,
Command::PlanSplit(_) | Command::AuditReceipt(_) | Command::RecheckReceipt(_)
)
{
runtime::prepare_native_runtime(&native_options, automatic_runtime).await?;
}
Expand Down Expand Up @@ -182,6 +187,8 @@ async fn run_command(cli: Cli, native_logs: Arc<native_logging::NativeDiagnostic
Command::TuneTrial { input } => tuning::run_trial(input).await,
Command::Models { command } => skippy_commands::models::run_standalone(&command).await,
Command::PlanSplit(args) => skippy_commands::split::run(args.into()),
Command::AuditReceipt(args) => receipts::audit(args).await,
Command::RecheckReceipt(args) => receipts::recheck(args).await,
Command::Runtime { command } => {
skippy_commands::runtime::run(
command.into(),
Expand Down
Loading
Loading