Skip to main content

RunCommand

Struct RunCommand 

Source
pub struct RunCommand {
Show 53 fields pub model: Option<String>, pub product_sources: ProductSourceArgs, pub system: Option<String>, pub max_tokens: u32, pub stop: Vec<String>, pub enable_thinking: bool, pub disable_thinking: bool, pub no_context_shift: bool, pub temperature: f32, pub backend: String, pub gpu_devices: Option<String>, pub layer_split_pipeline_mode: Option<LayerSplitPipelineModeArg>, pub prompt: Option<String>, pub tokenizer: Option<PathBuf>, pub bench_mode: bool, pub top_k: usize, pub top_p: f32, pub min_p: f32, pub presence_penalty: f32, pub repeat_penalty: f32, pub repeat_last_n: usize, pub seed: Option<u64>, pub gpu_memory_utilization: f32, pub runtime_memory_budget_bytes: Option<NonZeroUsize>, pub max_model_len: Option<usize>, pub max_num_seqs: Option<usize>, pub max_num_batched_tokens: Option<usize>, pub sequence_fit_policy: Option<SequenceFitPolicyArg>, pub batched_graph: bool, pub disable_batched_graph: bool, pub reusable_execution: bool, pub disable_reusable_execution: bool, pub unified_graph: bool, pub disable_unified_graph: bool, pub unified_graph_layers_only: bool, pub disable_unified_graph_layers_only: bool, pub unified_graph_lm_head_eager: bool, pub disable_unified_graph_lm_head_eager: bool, pub kv_dtype: Option<String>, pub kv_capacity: Option<usize>, pub kv_max_blocks: Option<usize>, pub effective_config_json: Option<PathBuf>, pub decision_trace_jsonl: Option<PathBuf>, pub observability_vertical_slice_out: Option<PathBuf>, pub vnext_checkpoint: VNextCheckpointArgs, pub profile_jsonl: Option<PathBuf>, pub profile_detail: ProfileDetailArg, pub vnext_diagnostic_fault: Option<VNextDiagnosticFaultArg>, pub memory_profile_jsonl: Option<PathBuf>, pub scheduler_trace_jsonl: Option<PathBuf>, pub request_dump_dir: Option<PathBuf>, pub profile_sample_rate: f64, pub output_format: OutputFormat,
}

Fields§

§model: Option<String>

Model name (release alias, Hugging Face repository, local directory, or .gguf file).

§product_sources: ProductSourceArgs§system: Option<String>

System prompt (interactive chat mode only).

§max_tokens: u32

Maximum output-token ceiling. Context planning shrinks it to the remaining KV capacity before dropping any complete history turn.

§stop: Vec<String>

Stop generation when this text appears. Can be provided multiple times.

§enable_thinking: bool

Enable model reasoning for chat templates that support it.

§disable_thinking: bool

Disable model reasoning for chat templates that support it.

§no_context_shift: bool

Disable CLI context shift. By default, ferrum run keeps the REPL alive by shrinking this turn’s output budget before dropping history. Oldest complete turns are removed only when the rendered prompt itself no longer fits in KV.

§temperature: f32

Sampling temperature (0.0–2.0). 0.0 = greedy / argmax (deterministic, what you want for benchmarks). >0 = softmax sample with --top-k and --top-p filtering applied.

§backend: String

Backend: auto, cpu, metal, cuda (default: auto)

§gpu_devices: Option<String>

CUDA GPU ids to use, comma-separated. Multi-GPU requests select layer-split for supported Llama-family safetensors models.

§layer_split_pipeline_mode: Option<LayerSplitPipelineModeArg>

Layer-split decode pipeline mode for multi-GPU CUDA runs.

§prompt: Option<String>

One-shot prompt (skip interactive REPL). When supplied, ferrum runs a single prefill+decode and exits — useful for benchmarking and shell scripting. For .gguf paths, omitting this drops into the GGUF REPL.

§tokenizer: Option<PathBuf>

Path to a HuggingFace tokenizer.json (only used for .gguf paths). If omitted, ferrum looks for <gguf-stem>.tokenizer.json and then tokenizer.json next to the .gguf file.

§bench_mode: bool

Bench mode: skip generated text output, print only timing summary. Implies one-shot (--prompt is required).

§top_k: usize

Top-K sampling cutoff (0 disables — keep all). Only the K highest- probability tokens compete in the softmax sample. Default 50, a conservative value that filters obvious garbage without flattening the distribution.

§top_p: f32

Top-P (nucleus) sampling cutoff (0.0 disables, 1.0 keeps all). Smallest set of tokens whose cumulative probability exceeds P is kept; the rest are zeroed before sampling. Default 0.95.

§min_p: f32

Minimum probability cutoff relative to the most likely token. A value of 0 disables min-p filtering.

§presence_penalty: f32

Presence penalty applied to tokens that already occurred in the request. Qwen3.5 recommends 1.5 for general thinking workloads.

§repeat_penalty: f32

Repetition penalty applied to logits before sampling. >1 discourages repeats, <1 encourages, 1.0 disables. Defaults to 1.1 (OpenAI/llama.cpp standard) because the chat default is greedy (temperature 0): greedy with no penalty deterministically locks into token loops on some inputs (the “2D/3D 2D/3D…” degeneration). Pass --repeat-penalty 1.0 for an unpenalized greedy baseline.

§repeat_last_n: usize

Number of recent tokens that the repetition penalty considers. Smaller = local repeat avoidance only.

§seed: Option<u64>

Random seed for sampling (when temperature > 0). Omit for non-deterministic chat.

§gpu_memory_utilization: f32

Fraction of GPU memory ferrum is allowed to use (mirrors vLLM’s --gpu-memory-utilization). Auto-sizes the KV pool: at 0.9 ferrum will use ≤ 90 % of the GPU’s reported total memory, reserving ~4 GB scratch + the weight bytes. Set to 1.0 for an exclusive GPU; leave at 0.9 if other processes share the card.

§runtime_memory_budget_bytes: Option<NonZeroUsize>

Exact device-wide memory budget available to runtime weights and dynamic resources. This is a typed capacity ceiling shared by run and serve; omit it to use the normal pressure-threshold policy.

§max_model_len: Option<usize>

vLLM-compatible alias for FERRUM_MAX_MODEL_LEN.

§max_num_seqs: Option<usize>

vLLM-compatible alias for FERRUM_PAGED_MAX_SEQS.

§max_num_batched_tokens: Option<usize>

vLLM-compatible alias for FERRUM_MAX_BATCHED_TOKENS.

§sequence_fit_policy: Option<SequenceFitPolicyArg>

Sequence fit gate used before prefill admission.

§batched_graph: bool

Enable legacy Llama/Gemma batched decode CUDA graph replay.

§disable_batched_graph: bool

Disable legacy Llama/Gemma batched decode CUDA graph replay.

§reusable_execution: bool

Enable vNext reusable device-program preparation.

§disable_reusable_execution: bool

Disable vNext reusable device-program preparation.

§unified_graph: bool

Enable Llama/Gemma unified decode CUDA graph replay.

§disable_unified_graph: bool

Disable Llama/Gemma unified decode CUDA graph replay.

§unified_graph_layers_only: bool

Capture only Llama/Gemma unified transformer layers in CUDA graph replay.

§disable_unified_graph_layers_only: bool

Disable layers-only unified CUDA graph capture scope.

§unified_graph_lm_head_eager: bool

Capture unified layers plus final packing; leave lm_head eager.

§disable_unified_graph_lm_head_eager: bool

Disable lm-head-eager unified CUDA graph capture scope.

§kv_dtype: Option<String>

KV cache element dtype (Dim 5 polymorphism point). Accepts fp16, bf16, int8, fp8. Default fp16. INT8 / FP8 require model wire-up; today only the kernel + type layer ships. Override via FERRUM_KV_DTYPE env var.

§kv_capacity: Option<usize>

Per-sequence KV token capacity (FERRUM_KV_CAPACITY).

§kv_max_blocks: Option<usize>

KV block budget (FERRUM_KV_MAX_BLOCKS).

§effective_config_json: Option<PathBuf>

Write resolved startup runtime config JSON and exit artifacts.

§decision_trace_jsonl: Option<PathBuf>

Write one auto-config decision JSON record per line.

§observability_vertical_slice_out: Option<PathBuf>

Generate a synthetic/no-weight observability vertical-slice artifact and exit.

§vnext_checkpoint: VNextCheckpointArgs§profile_jsonl: Option<PathBuf>

Write product observability profile events to this JSONL path.

§profile_detail: ProfileDetailArg

Product observability detail level.

§vnext_diagnostic_fault: Option<VNextDiagnosticFaultArg>

Inject one typed vNext diagnostic fault. Requires a latency profile.

§memory_profile_jsonl: Option<PathBuf>

Write product memory profile events to this JSONL path.

§scheduler_trace_jsonl: Option<PathBuf>

Write scheduler/admission trace events to this JSONL path.

§request_dump_dir: Option<PathBuf>

Write a sanitized request/replay bundle to this directory.

§profile_sample_rate: f64

Product observability sampling rate for resource lifecycle events.

§output_format: OutputFormat

Output format. text (default) — streaming text + stats UX. jsonl — one JSON record per event on stdout; used by tests and scripts.

Trait Implementations§

Source§

impl Args for RunCommand

Source§

fn group_id() -> Option<Id>

Report the ArgGroup::id for this set of arguments
Source§

fn augment_args<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_args_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

impl FromArgMatches for RunCommand

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<F, T> IntoSample<T> for F
where T: FromSample<F>,

Source§

fn into_sample(self) -> T

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more