pub enum ExtendedCommands {
Show 67 variants
Chat {Show 15 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,
backend: BackendArg,
},
Bench {
file: PathBuf,
warmup: usize,
iterations: usize,
max_tokens: usize,
prompt: Option<String>,
fast: bool,
brick: Option<String>,
percentiles: Vec<f64>,
},
Eval {Show 13 fields
file: PathBuf,
dataset: String,
text: Option<String>,
max_tokens: usize,
threshold: f32,
task: Option<String>,
data: Option<PathBuf>,
model_size: Option<String>,
num_classes: usize,
generate_card: bool,
device: String,
samples: usize,
temperature: 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 24 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,
skip_capability: bool,
assert_classifier_head: 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 {Show 20 fields
file: Option<PathBuf>,
method: String,
rank: Option<u32>,
vram: f64,
plan: bool,
model: Option<String>,
freeze_base: bool,
train_data: Option<PathBuf>,
json: bool,
task: Option<String>,
budget: usize,
strategy: String,
scheduler: String,
scout: bool,
data: Option<PathBuf>,
num_classes: usize,
model_size: Option<String>,
from_scout: Option<PathBuf>,
max_epochs: usize,
time_limit: Option<String>,
},
Monitor {
dir: Option<PathBuf>,
refresh_ms: u64,
compact: bool,
json: bool,
format: String,
},
Runs {
command: RunsCommands,
},
Experiment {
command: ExperimentCommands,
},
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,
},
Test {
command: TestSubcommand,
},
CompareHf {
file: PathBuf,
hf: String,
tensor: Option<String>,
threshold: f64,
json: bool,
},
Modelfile {
command: ModelfileSubcommand,
},
Hex {Show 15 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,
slice: Option<String>,
},
Tree {
file: PathBuf,
filter: Option<String>,
format: TreeFormat,
sizes: bool,
depth: Option<usize>,
},
Flow {
file: PathBuf,
layer: Option<String>,
component: String,
verbose: bool,
json: bool,
},
Qualify {
file: PathBuf,
tier: String,
timeout: u64,
json: bool,
verbose: bool,
skip: Option<Vec<String>>,
},
Train {
command: TrainCommands,
},
Pretrain {Show 18 fields
dataset: PathBuf,
tokenizer: PathBuf,
run_dir: PathBuf,
mode: PretrainMode,
lr: Option<f32>,
num_steps: usize,
warmup_steps: Option<usize>,
batch_size: usize,
seq_length: usize,
steps_per_epoch: usize,
seed: u64,
target_val_loss: Option<f32>,
vocab_size: u32,
synthetic: bool,
device: String,
init: Option<PathBuf>,
force_under_provisioned: bool,
val_shard: Option<PathBuf>,
},
Tokenize {
command: TokenizeCommands,
},
Data {
command: DataCommands,
},
Pipeline {
command: PipelineCommands,
},
Diagnose {
checkpoint_dir: PathBuf,
data: Option<PathBuf>,
model_size: Option<String>,
num_classes: usize,
},
OllamaChatLint {
response_file: PathBuf,
stream: bool,
},
OllamaToolsLint {
response_file: PathBuf,
request_file: Option<PathBuf>,
stream: bool,
},
DrySamplingLint {
observation_file: PathBuf,
},
AwqLint {
observation_file: PathBuf,
},
Fp8Lint {
observation_file: PathBuf,
},
Nf4Lint {
observation_file: PathBuf,
},
GptqLint {
observation_file: PathBuf,
},
OomLint {
report_file: PathBuf,
stderr_file: Option<PathBuf>,
},
NcclDiagLint {
diag_file: PathBuf,
exit_code: Option<i32>,
require_doc_link: bool,
},
ReactTraceLint {
trace_file: PathBuf,
max_iterations: Option<i64>,
require_grammar: bool,
},
HangTraceLint {
trace_dir: PathBuf,
mode: String,
world_size: usize,
exit_code: Option<i32>,
expected_exit_code: Option<i32>,
},
DdpMetricsLint {
metrics_1gpu_file: PathBuf,
metrics_ngpu_file: PathBuf,
world_size: i64,
scaling_floor: f64,
loss_tolerance: f64,
},
Dataset {
command: DatasetCommands,
},
Kernel {
command: KernelCommands,
},
AudioInspectLint {
json_file: PathBuf,
expected_sample_rate: Option<u32>,
expected_channels: Option<u32>,
},
AttnParityLint {
parity_file: Option<PathBuf>,
provenance_file: Option<PathBuf>,
head_dim_error_file: Option<PathBuf>,
tol_abs: f64,
tol_cos: f64,
},
AttnVizLint {
attn_file: Option<PathBuf>,
html_file: Option<PathBuf>,
expected_heatmaps: usize,
tolerance: f64,
epsilon: f64,
},
CheckFiniteLint {
error_file: Option<PathBuf>,
list_file: Option<PathBuf>,
min_layers: usize,
},
EmbedVizLint {
csv_file: PathBuf,
expected_vocab_size: Option<usize>,
csv_file_b: Option<PathBuf>,
},
ExplainTokenLint {
jsonl_file: PathBuf,
tolerance: f64,
require_greedy: bool,
},
GpuMemtraceLint {
trace_file: PathBuf,
},
KvTimelineLint {
timeline_file: PathBuf,
preempt_threshold: f64,
},
OtlpLint {
otlp_file: PathBuf,
require_apr_span: bool,
require_genai_attrs: bool,
expect_trace_id: Option<String>,
},
PrometheusLint {
metrics_file: PathBuf,
content_type: Option<String>,
require_k07_metrics: bool,
},
ToolUseLint {
observation_file: PathBuf,
},
GbnfLint {
observation_file: PathBuf,
},
TypicalPLint {
observation_file: PathBuf,
},
GradNorm {
history_file: PathBuf,
max_grad_norm: Option<f64>,
spike_window: usize,
spike_multiplier: f64,
},
RegistryQuotaLint {
observation_file: PathBuf,
},
ImatrixLint {
observation_file: PathBuf,
},
EmbeddingsLint {
observation_file: PathBuf,
},
UnifiedSearchLint {
observation_file: PathBuf,
},
RmGcLint {
observation_file: PathBuf,
},
SharedCacheLint {
observation_file: PathBuf,
},
Ppl {
log_probs_file: PathBuf,
},
QuantPreservationLint {
reference: PathBuf,
requant: PathBuf,
},
Shard {
file: PathBuf,
max_shard_size: String,
output: PathBuf,
force: bool,
},
Unshard {
input: PathBuf,
output: PathBuf,
force: bool,
},
Tools(ToolCommands),
Rerank {Show 20 fields
model: PathBuf,
input_ids: Option<String>,
token_type_ids: Option<String>,
query: Option<String>,
passage: Option<String>,
passages: Vec<String>,
sort: bool,
top_k: usize,
vocab: Option<PathBuf>,
hidden_dim: usize,
num_layers: usize,
num_heads: usize,
intermediate_dim: usize,
vocab_size: usize,
max_position_embeddings: usize,
type_vocab_size: usize,
num_labels: usize,
with_pooler: bool,
raw_logit: bool,
json: bool,
},
Embed {},
}Expand description
Extended CLI commands (analysis, profiling, QA, benchmarks, and advanced tools).
Flattened into Commands via #[command(flatten)] so all subcommands remain
top-level from the user’s perspective (e.g., apr chat, apr profile).
Variants§
Chat
Interactive chat with language model
Fields
backend: BackendArgBench
Benchmark throughput (spec H12: >= 10 tok/s)
Fields
Eval
Evaluate model perplexity (spec H13: PPL <= 20) or classification metrics
Fields
Profile
Deep profiling with Roofline analysis
Fields
compare_hf: Option<String>[NOT IMPLEMENTED — accepted and ignored] Compare against HuggingFace baseline
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 (register pressure, roofline)
#2399 finding 1: on a build without the analyzer this line is the only thing a user sees before running the command, so it has to say so.
Fields
Tune
ML tuning: LoRA/QLoRA configuration, memory planning, and HPO (GH-176, SPEC-TUNE-2026-001)
Fields
Monitor
Attach live TUI to a running training session
Fields
Runs
List, show, and compare training experiment runs
Fields
command: RunsCommandsExperiment
Interactive experiment browser (TUI with loss curves)
Fields
command: ExperimentCommandsCbtop
ComputeBrick pipeline monitor (cbtop)
Fields
Test
Test harness for web, LLM, media and replay — powered by probador.
Named for what it tests, not for the act of testing. probar is Spanish
for “to try”; it named the VERB, so apr probar --help told a reader
nothing about the subject. This follows the precedent already set by
apr data (“Data quality pipeline … powered by alimentar”): a plain
noun for the user-facing command, the Spanish name kept for the engine
and credited in the description.
The harness covers four distinct things, and the subcommands group by what is UNDER TEST rather than by verb:
web the WASM/browser build and its runtime behaviour (serve, build, watch, comply, stress) llm inference correctness, throughput and cost against an endpoint (test, load, bench, sweep, score, experiment, data-audit) media rendered output against ground truth (av-sync, audio, video, animation) replay the runner itself — recording, state machines, reporting (record, playbook, coverage, report)
Only tensor is routed today (PMAT-481 visual regression); the rest
land as they are delegated to the probador library. Renaming now costs
one path — after those land it is a breaking change across the whole
testing surface.
apr probar stays as a hidden alias so existing scripts keep working.
Fields
command: TestSubcommandCompareHf
Compare APR model against HuggingFace source
Fields
Modelfile
CRUX-K-11: parse Ollama-style Modelfile DSL into apr config.
Fields
command: ModelfileSubcommandHex
Format-aware binary forensics (10X better than xxd)
Fields
Tree
Model architecture tree view
Fields
format: TreeFormatOutput format: ascii, dot, mermaid, json
#2394 finding 15: this was a String that the dispatcher parsed
with .unwrap_or(TreeFormat::Ascii), so --format bogusvalue
silently rendered ascii and exited 0 — a typo’d --format josn in
a pipeline produced a tree instead of JSON, with no warning. Parsing
at the CLI boundary makes the unparseable value unrepresentable
downstream: clap rejects it before any command runs.
Flow
Data flow visualization
Fields
Qualify
Cross-subcommand smoke test (does every tool handle this model?)
Fields
Train
Training pipeline (plan/apply) — forjar-style pre-flight validation
Fields
command: TrainCommandsPretrain
Pretraining loop driver (SHIP-TWO-001 MODEL-2).
Wires the pretraining loop shape defined by
contracts/training-loop-pretrain-v1.yaml. Executes a synthetic
decreasing-loss drive by default so GATE-TRAIN-005 / -007 / -008
divergence-and-NaN guards can be exercised without an actual
370M compute run. Real corpus wiring is a follow-up ticket.
Fields
mode: PretrainModeTraining regime — finetune (MODEL-1) or from-scratch (MODEL-2 cold start). Per contract training-loop-pretrain-v1 §hyperparameter_defaults, this atomically flips (regime, lr_max, warmup_steps, target_val_loss) unless explicit –lr / –warmup-steps / –target-val-loss override.
lr: Option<f32>Peak learning rate after warmup. Omit to inherit mode default (finetune: 5e-5, from-scratch: 3e-4).
warmup_steps: Option<usize>Number of warmup steps. Omit to inherit mode default (finetune: 100, from-scratch: 1000).
target_val_loss: Option<f32>Target val_loss. Omit to inherit mode default (finetune: 2.2, from-scratch: 3.0).
vocab_size: u32Vocabulary size (required for --mode from-scratch INV-TRAIN-005
regime-dependent cap: 2·ln(vocab_size)). MODEL-2 uses 50257.
synthetic: boolSynthetic-drive only — do not attempt real compute, exercise loop gates only. INV-TRAIN-010: absent = real compute (drive_real), present = synthetic (drive_synthetic).
device: StringTraining backend. Grammar (contract gpu-training-backend-v1
INV-GPUTRAIN-001): ^(cpu|cuda(:[0-9]|:1[0-5])?|auto)$.
Default auto uses CUDA if available, else CPU (the only
spelling that may fall back silently — all other values
hard-fail on missing runtime per GATE-GPUTRAIN-002).
init: Option<PathBuf>Initial weights from a pretrained APR file
(contract apr-pretrain-from-init-v1). Per spec §49’s
MODEL-2 pretrained-init pivot: when present, load weights
from <PATH> instead of random-init. Composes with
--mode finetune (canonical) or --mode from-scratch
(allowed but non-canonical — emits a warning). Missing,
corrupted, or arch-mismatched APR files exit non-zero
before step 1 (no silent random-init fallback).
force_under_provisioned: boolSPEC §83 P0-J: bypass the Chinchilla compute-optimal hard
gate (chinchilla-gate-v1). Default is fail-fast when
D/N < 10× (severely under-provisioned per Hoffmann et al.
2022). Pass this flag to acknowledge the under-provisioning
and proceed anyway (e.g. for ablation studies, resumed
runs, or smoke tests).
val_shard: Option<PathBuf>SPEC §84 P2-F: shared held-out validation shard.
When provided, the val-loss eval reads HELD_OUT_BATCHES
batches from this separate .bin-shards directory instead
of stealing the first 16 batches of --dataset. This makes
val_loss comparable across runs whose --dataset
composition changes (P2-C’s audit-falsified result was
confounded by val sets being drawn from different corpus
distributions — qwen-v2 = codeparrot only, qwen-v3 =
codeparrot + the-stack-dedup).
Path semantics: directory of .bin shards (same format as
--dataset). Operator tokenizes the held-out corpus
independently via apr tokenize encode-corpus --max-docs N
to a separate output dir, then passes that dir here. The
shard contract is contracts/dataset-thestack-python-v1.yaml.
When omitted, falls back to the historical “first 16 batches of –dataset” behaviour for backwards compatibility.
Tokenize
Tokenizer training pipeline (plan/apply) — BPE vocabulary learning
Fields
command: TokenizeCommandsData
Data quality pipeline (audit, split, balance) — powered by alimentar
Fields
command: DataCommandsPipeline
Pipeline orchestration (plan/apply/status) — wraps forjar DAG engine
Fields
command: PipelineCommandsDiagnose
Automated Five Whys diagnosis on a training checkpoint
Fields
OllamaChatLint
Lint an Ollama /api/chat response for schema + NDJSON invariants (CRUX-C-04)
Fields
OllamaToolsLint
Lint an Ollama /api/chat function-calling response (CRUX-I-04)
Fields
DrySamplingLint
Lint a captured DRY-sampling observation (CRUX-C-23)
AwqLint
Lint a captured AWQ quality/compression/flags observation (CRUX-B-08)
Fp8Lint
Lint a captured FP8 (E4M3) round-trip + SM-capability observation (CRUX-B-11)
Nf4Lint
Lint a captured NF4 codebook/roundtrip/storage/parity observation (CRUX-B-10)
GptqLint
Lint a captured GPTQ compression/cosine/flags observation (CRUX-B-09)
OomLint
Lint a captured CUDA OOM postmortem report (CRUX-F-13)
Fields
NcclDiagLint
Lint a captured NCCL failure-diagnostics JSON from stderr (CRUX-F-15)
Fields
ReactTraceLint
Lint an externally captured ReAct loop trace JSON (CRUX-I-06 — no apr producer yet)
Fields
HangTraceLint
Lint a captured $APR_TRACE_DIR hang stack-dump directory (CRUX-F-14)
Fields
DdpMetricsLint
Lint two externally captured DDP metrics JSONs, N=1 and N=k (CRUX-D-11 — no apr producer yet)
Fields
Dataset
Dataset inspection tools (CRUX-H-13)
Fields
command: DatasetCommandsKernel
Kernel-level parity measurements (CRUX-L-02)
Fields
command: KernelCommandsAudioInspectLint
Lint an audio-inspect JSON body, e.g. from
apr dataset audio-inspect clip.wav --format json -o audio.json (CRUX-H-13)
Fields
AttnParityLint
Lint attention parity + provenance JSON, e.g. from
apr kernel parity --impl tiled --ref naive --json -o parity.json (CRUX-L-02)
Fields
parity_file: Option<PathBuf>Parity JSON body (max_abs_diff, cosine_sim), as written by
apr kernel parity --json
provenance_file: Option<PathBuf>Provenance JSON body (attn_impl, kernel_source, fallback).
apr kernel parity --json writes both gates’ fields into one body,
so the same file may be passed here and to –parity-file
AttnVizLint
Lint an externally captured attention dump (CRUX-F-17 — no apr producer yet)
Fields
CheckFiniteLint
Lint an externally captured check-finite error and/or coverage JSON (CRUX-F-11 — no apr producer yet)
Fields
EmbedVizLint
Lint an embedding-projection CSV, e.g. from
apr debug embed-viz --model model.apr --seed 42 -o emb.csv (CRUX-F-18)
Fields
ExplainTokenLint
Lint an externally captured token-selection JSONL trace (CRUX-F-19 — no apr producer yet)
Fields
GpuMemtraceLint
Lint a captured GPU memory Chrome Trace Event Format JSON (CRUX-F-07)
Fields
KvTimelineLint
Lint a captured KV-cache utilization timeline (CRUX-F-06)
Fields
OtlpLint
Lint a captured OTLP/JSON ExportTraceServiceRequest body (CRUX-K-08).
At least one gate flag is required: every check is opt-in, so a bare invocation would check nothing and exit 0 for any parseable JSON.
Fields
PrometheusLint
Lint a captured Prometheus /metrics response (CRUX-K-07)
Fields
ToolUseLint
Lint a captured OpenAI tool-use response (CRUX-C-11)
GbnfLint
Lint a GBNF grammar-constrained observation (CRUX-C-10)
TypicalPLint
Lint a typical-p sampling observation (CRUX-C-22)
Fields
GradNorm
Gradient-norm telemetry analysis (CRUX-F-09)
Fields
RegistryQuotaLint
Lint a captured registry byte-quota observation (CRUX-A-22)
ImatrixLint
Lint a captured imatrix calibration observation (CRUX-B-07)
EmbeddingsLint
Lint a captured /v1/embeddings observation (CRUX-C-13)
Fields
UnifiedSearchLint
Lint a captured Hub+local unified-search merge observation (CRUX-A-23)
RmGcLint
Lint a captured apr rm / externally captured gc blob-GC observation (CRUX-A-25)
Lint a captured APR_MODELS shared-cache observation (CRUX-A-21)
Ppl
Perplexity classifier (CRUX-E-02)
Fields
QuantPreservationLint
Validate dequant→requant metadata preservation (CRUX-B-19)
Fields
Shard
Split a safetensors file into shards + weight-map index (CRUX-B-05)
Fields
Unshard
Reconstruct a single safetensors file from a sharded directory (CRUX-B-05)
Fields
Tools(ToolCommands)
Publishing, conversion, and analysis tools
Rerank
Score a query/passage pair (or rank multiple passages) with a BERT cross-encoder loaded from an APR v2 file (GH-326 Phase 3).
Wraps aprender_core::models::bert::CrossEncoder::load_from_reader
score(). The APR must contain the canonical HF BERT tensor names (seemodels::bert::expected_bert_tensor_names).
Tokenisation is NOT applied here — caller passes pre-tokenised
input_ids + token_type_ids as comma-delimited u32 lists. A
dedicated tokeniser-aware mode is Phase 3b follow-up scope.
Fields
input_ids: Option<String>Pre-tokenised input ids (comma-separated u32s). Mutually
exclusive with --query+--passage+--vocab (Phase 3b).
Example: --input-ids 101,2024,102,3456,102 for [CLS] q [SEP] p [SEP].
token_type_ids: Option<String>Pre-tokenised token-type ids (comma-separated u32s).
Same length as --input-ids. 0 for query side, 1 for passage.
query: Option<String>Phase 3b — query text. Pair with --passage + --vocab to enable
in-process WordPiece tokenisation. The tokeniser builds
[CLS] query [SEP] passage [SEP] with token_type_ids = 0 for
the query side and 1 for the passage side.
passage: Option<String>Phase 3b — passage text. Required when --query is supplied
in single-pair mode (use --passages for batch ranking).
passages: Vec<String>Phase 5 — batch ranking mode (#326). Passage candidates to
score against --query. May be supplied multiple times:
apr rerank model.apr --query "..." --passages "p1" --passages "p2".
Mutually exclusive with --passage. Output is one
score[i] line per passage in input order, OR a JSON array
of {passage, logit, score} objects sorted by descending
score when --sort is set.
sort: boolPhase 5 — sort batch output by descending score (highest
relevance first). Only meaningful with --passages and
--json. Default: preserve input order.
vocab: Option<PathBuf>Phase 3b — path to a WordPiece vocab.txt (one token per line,
line index = token id). Required when --query is supplied.
Must contain entries for [CLS], [SEP], and [UNK].
Phase 4 accepts HuggingFace tokenizer.json (extension-detected).
Override hidden_dim (default: 384 / MiniLM-L-6).
num_labels: usizeNumber of labels in the classifier head (default: 1 for regression-style relevance scoring).
with_pooler: boolLoad the optional BERT pooler dense layer (default: true).
Cross-encoders that skip the pooler should pass --with-pooler false.
Takes an optional value: --with-pooler (bare) and an omitted flag
both mean true; --with-pooler false / --with-pooler=false turn
the pooler off. A bare bool here would compile to a SetTrue switch
and make the documented false unreachable.
Embed
Produce sentence embeddings from a BERT bi-encoder (GH-326 Phase 6).
First-stage dense retrieval companion to apr rerank. Loads an
encoder-only BertModel (e.g. sentence-transformers/all-MiniLM-L6-v2),
tokenises the input text with WordPiece, runs the full encoder
forward, then pools the hidden states with one of:
--pool cls — take the [CLS] hidden state
--pool mean — mean over non-padding token positions (default;
sentence-transformers convention)
Optionally L2-normalises the result (--normalize, default true,
matches sentence-transformers).
Fields
text: Vec<String>Text to encode. Repeatable: apr embed model.apr --text "a" --text "b" --vocab tok.json.
text_file: Option<PathBuf>Phase 7 (GH-326) — read texts from a file, one per line.
Concatenated with --text inputs in order: --text first,
then --text-file rows. Blank lines and lines starting
with # are skipped. Useful for RAG-style first-stage
retrieval where the second-stage rerank candidate set
(50-100 documents) is the embed input.
pool: StringPooling strategy (cls or mean). Default: mean
(matches sentence-transformers convention).
normalize: boolL2-normalise the output embedding. Default: true (matches
sentence-transformers convention). Pass --normalize false
to keep raw magnitudes.
Takes an optional value: --normalize (bare) and an omitted flag
both mean true; --normalize false / --normalize=false keep the
raw magnitudes. A bare bool here would compile to a SetTrue switch
and make the documented false unreachable.
Because the value is optional, do not place a bare --normalize
immediately before the MODEL positional — write
apr embed MODEL --normalize or --normalize=true MODEL.
Override hidden_dim (default: 384 / MiniLM).
Trait Implementations§
Source§impl Debug for ExtendedCommands
impl Debug for ExtendedCommands
Source§impl FromArgMatches for ExtendedCommands
impl FromArgMatches for ExtendedCommands
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 ExtendedCommands
impl Subcommand for ExtendedCommands
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 ExtendedCommands
impl RefUnwindSafe for ExtendedCommands
impl Send for ExtendedCommands
impl Sync for ExtendedCommands
impl Unpin for ExtendedCommands
impl UnsafeUnpin for ExtendedCommands
impl UnwindSafe for ExtendedCommands
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.