pub enum Commands {
Show 39 variants
Run {Show 22 fields
source: String,
positional_prompt: Option<String>,
input: Option<PathBuf>,
prompt: Option<String>,
max_tokens: usize,
stream: bool,
language: Option<String>,
task: Option<String>,
format: String,
no_gpu: bool,
gpu: bool,
offline: bool,
benchmark: bool,
trace: bool,
trace_steps: Option<Vec<String>>,
trace_verbose: bool,
trace_output: Option<PathBuf>,
trace_level: String,
trace_payload: bool,
profile: bool,
chat: bool,
verbose: bool,
},
Serve {
file: PathBuf,
port: u16,
host: String,
no_cors: bool,
no_metrics: bool,
no_gpu: bool,
gpu: bool,
batch: bool,
trace: bool,
trace_level: String,
profile: bool,
},
Inspect {
file: PathBuf,
vocab: bool,
filters: bool,
weights: bool,
json: bool,
},
Debug {
file: PathBuf,
drama: bool,
hex: bool,
strings: bool,
limit: usize,
},
Validate {
file: PathBuf,
quality: bool,
strict: bool,
min_score: Option<u8>,
},
Diff {
file1: PathBuf,
file2: PathBuf,
weights: bool,
values: bool,
filter: Option<String>,
limit: usize,
transpose_aware: bool,
json: bool,
},
Tensors {
file: PathBuf,
stats: bool,
filter: Option<String>,
limit: usize,
json: bool,
},
Trace {
file: PathBuf,
layer: Option<String>,
reference: Option<PathBuf>,
json: bool,
verbose: bool,
payload: bool,
diff: bool,
interactive: bool,
},
Lint {
file: PathBuf,
},
Explain {
code: Option<String>,
file: Option<PathBuf>,
tensor: Option<String>,
},
Canary {
command: CanaryCommands,
},
Export {
file: PathBuf,
format: String,
output: PathBuf,
quantize: Option<String>,
},
Import {
source: String,
output: Option<PathBuf>,
arch: String,
quantize: Option<String>,
strict: bool,
preserve_q4k: bool,
tokenizer: Option<PathBuf>,
enforce_provenance: bool,
allow_no_config: bool,
},
Pull {
model_ref: String,
force: bool,
},
List,
Rm {
model_ref: String,
},
Convert {
file: PathBuf,
quantize: Option<String>,
compress: Option<String>,
output: PathBuf,
force: bool,
},
Merge {
files: Vec<PathBuf>,
strategy: String,
output: PathBuf,
weights: Option<Vec<f32>>,
},
Tui {
file: Option<PathBuf>,
},
Cbtop {Show 16 fields
model: Option<String>,
attach: Option<String>,
model_path: Option<PathBuf>,
headless: bool,
json: bool,
output: Option<PathBuf>,
ci: bool,
throughput: Option<f64>,
brick_score: Option<u32>,
warmup: usize,
iterations: usize,
speculative: bool,
speculation_k: usize,
draft_model: Option<PathBuf>,
concurrent: usize,
simulated: bool,
},
Probar {
file: PathBuf,
output: PathBuf,
format: String,
golden: Option<PathBuf>,
layer: Option<String>,
},
CompareHf {
file: PathBuf,
hf: String,
tensor: Option<String>,
threshold: f64,
json: bool,
},
Hex {Show 14 fields
file: PathBuf,
tensor: Option<String>,
limit: usize,
stats: bool,
list: bool,
json: bool,
header: bool,
blocks: bool,
distribution: bool,
contract: bool,
entropy: bool,
raw: bool,
offset: String,
width: usize,
},
Tree {
file: PathBuf,
filter: Option<String>,
format: String,
sizes: bool,
depth: Option<usize>,
},
Flow {
file: PathBuf,
layer: Option<String>,
component: String,
verbose: bool,
},
Chat {Show 14 fields
file: PathBuf,
temperature: f32,
top_p: f32,
max_tokens: usize,
system: Option<String>,
inspect: bool,
no_gpu: bool,
gpu: bool,
trace: bool,
trace_steps: Option<Vec<String>>,
trace_verbose: bool,
trace_output: Option<PathBuf>,
trace_level: String,
profile: bool,
},
Bench {
file: PathBuf,
warmup: usize,
iterations: usize,
max_tokens: usize,
prompt: Option<String>,
fast: bool,
brick: Option<String>,
},
Eval {
file: PathBuf,
dataset: String,
text: Option<String>,
max_tokens: usize,
threshold: f32,
},
Profile {Show 22 fields
file: PathBuf,
granular: bool,
format: String,
focus: Option<String>,
detect_naive: bool,
threshold: f64,
compare_hf: Option<String>,
energy: bool,
perf_grade: bool,
callgraph: bool,
fail_on_naive: bool,
output: Option<PathBuf>,
ci: bool,
assert_throughput: Option<f64>,
assert_p99: Option<f64>,
assert_p50: Option<f64>,
warmup: usize,
measure: usize,
tokens: usize,
ollama: bool,
no_gpu: bool,
compare: Option<PathBuf>,
},
Qa {Show 22 fields
file: PathBuf,
assert_tps: Option<f64>,
assert_speedup: Option<f64>,
assert_gpu_speedup: Option<f64>,
skip_golden: bool,
skip_throughput: bool,
skip_ollama: bool,
skip_gpu_speedup: bool,
skip_contract: bool,
skip_format_parity: bool,
skip_ptx_parity: bool,
safetensors_path: Option<PathBuf>,
iterations: usize,
warmup: usize,
max_tokens: usize,
json: bool,
verbose: bool,
min_executed: Option<usize>,
previous_report: Option<PathBuf>,
regression_threshold: Option<f64>,
skip_gpu_state: bool,
skip_metadata: bool,
},
Parity {
file: PathBuf,
prompt: String,
assert: bool,
},
PtxMap {
file: PathBuf,
kernel: Option<String>,
reverse: Option<String>,
json: bool,
verbose: bool,
prefill: bool,
},
Ptx {
file: Option<PathBuf>,
kernel: Option<String>,
strict: bool,
bugs: bool,
json: bool,
verbose: bool,
},
Tune {
file: Option<PathBuf>,
method: String,
rank: Option<u32>,
vram: f64,
plan: bool,
model: Option<String>,
freeze_base: bool,
train_data: Option<PathBuf>,
json: bool,
},
Showcase {
auto_verify: bool,
step: Option<String>,
tier: String,
model_dir: PathBuf,
baseline: String,
zram: bool,
runs: usize,
gpu: bool,
json: bool,
verbose: bool,
quiet: bool,
},
Check {
file: PathBuf,
no_gpu: bool,
},
Rosetta {
action: RosettaCommands,
},
Publish {
directory: PathBuf,
repo_id: String,
model_name: Option<String>,
license: String,
pipeline_tag: String,
library_name: Option<String>,
tags: Option<Vec<String>>,
message: Option<String>,
dry_run: bool,
},
Oracle {
source: Option<String>,
family: Option<String>,
size: Option<String>,
compliance: bool,
tensors: bool,
stats: bool,
explain: bool,
kernels: bool,
validate: bool,
full: bool,
},
}Variants§
Run
Run model directly (auto-download, cache, execute)
Fields
Serve
Start inference server (REST API, streaming, metrics)
Fields
Inspect
Inspect model metadata, vocab, and structure
Fields
Debug
Simple debugging output (“drama” mode available)
Fields
Validate
Validate model integrity and quality
Fields
Diff
Compare two models
Fields
Tensors
List tensor names and shapes
Fields
Trace
Layer-by-layer trace analysis
Fields
Lint
Check for best practices and conventions
Explain
Explain errors, architecture, and tensors
Fields
Canary
Manage canary tests for regression
Fields
command: CanaryCommandsExport
Export model to other formats
Fields
Import
Import from external formats (hf://org/repo, local files, URLs)
Fields
preserve_q4k: boolPreserve Q4K quantization for fused kernel inference (GGUF only) Uses realizar’s Q4K converter instead of dequantizing to F32
tokenizer: Option<PathBuf>PMAT-232: External tokenizer.json for weights-only GGUF files. Required if the GGUF has no embedded tokenizer vocabulary.
Pull
Download and cache model from HuggingFace (Ollama-like UX)
Fields
List
List cached models
Rm
Remove model from cache
Convert
Convert/optimize model
Fields
Merge
Merge multiple models
Fields
Tui
Interactive terminal UI
Cbtop
ComputeBrick pipeline monitor (cbtop)
Fields
Probar
Export for probar visual testing
Fields
CompareHf
Compare APR model against HuggingFace source
Fields
Hex
Format-aware binary forensics (10X better than xxd)
Fields
Tree
Model architecture tree view
Fields
Flow
Data flow visualization
Fields
Chat
Interactive chat with language model
Fields
Bench
Benchmark throughput (spec H12: >= 10 tok/s)
Fields
Eval
Evaluate model perplexity (spec H13: PPL <= 20)
Fields
Profile
Deep profiling with Roofline analysis
Fields
Qa
Falsifiable QA checklist for model releases
Fields
Parity
GPU/CPU parity check (PMAT-232: genchi genbutsu — see where GPU diverges)
Fields
PtxMap
Model-to-PTX source mapping (Mieruka: make GPU kernel dispatch visible)
Fields
Ptx
PTX analysis and bug detection (trueno-explain: register pressure, roofline, 15+ bug detectors)
Fields
Tune
ML tuning: LoRA/QLoRA configuration and memory planning (GH-176)
Fields
Showcase
Qwen2.5-Coder showcase demo
Fields
Check
Model self-test: 10-stage pipeline integrity check (APR-TRACE-001)
Rosetta
Rosetta Stone - Universal model format converter (PMAT-ROSETTA-001)
Fields
action: RosettaCommandsPublish
Publish model to HuggingFace Hub (APR-PUB-001)
Fields
Additional tags (comma-separated)
Oracle
Model Oracle: identify family, size, constraints, and contract compliance
Three modes:
apr oracle
Fields
Trait Implementations§
Source§impl FromArgMatches for Commands
impl FromArgMatches for Commands
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for Commands
impl Subcommand for Commands
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommandAuto Trait Implementations§
impl Freeze for Commands
impl RefUnwindSafe for Commands
impl Send for Commands
impl Sync for Commands
impl Unpin for Commands
impl UnwindSafe for Commands
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more