pub struct NodeConfig {
pub addr: String,
pub ssh: Option<String>,
pub ckpt_dir: String,
pub device: DeviceList,
pub precision: Precision,
pub kv_cache: KvPolicy,
pub rng_seed: Option<u64>,
pub max_ram_gb: Option<f64>,
pub layers: Option<String>,
pub role: NodeRole,
pub standby_for: Option<String>,
}Expand description
Per-node settings.
Fields§
§addr: Stringhost:port the coordinator connects to (and the worker binds).
ssh: Option<String>SSH alias/host for probing, launching, and syncing weights (None = local).
ckpt_dir: StringLocal checkpoint directory ON THAT NODE.
device: DeviceListDevice string (cpu, metal, cuda, ane, vulkan, or a+b combo —
first is primary, rest are CPU/host spill for weights that don’t fit).
precision: PrecisionNumeric precision string. Float widths: f32 | f16 | bf16 | mixed.
Scaled-GEMM shorthands: fp8 (e4m3) | fp8e5m2 | mxfp8 | nvfp4 |
mxfp4. Or ANY minifloat by name — f8e4m3, f6e3m2, f4e2m1,
f4e3m0, … (the fNeXmY family). The model crate maps it to compile
flags; exotic formats change numerics and want backend/tensor-core support.
kv_cache: KvPolicy§rng_seed: Option<u64>Per-node RNG seed (overrides the global). Keeps sampling reproducible and distinct per stage when desired.
max_ram_gb: Option<f64>Hard cap on this node’s stage RAM (GB). The planner never exceeds it.
layers: Option<String>Manual "a:b" layer range (used when policy = manual, or to pin a node).
role: NodeRoleActive / standby / draining. See NodeRole.
standby_for: Option<String>For a standby: the addr of the active node it mirrors. When unset, a
standby backs whichever active stage is largest — the one whose loss
would cost the most to re-plan.
Implementations§
Source§impl NodeConfig
impl NodeConfig
Sourcepub fn devices(&self) -> &[Device]
pub fn devices(&self) -> &[Device]
Device preference list (primary first). CPU spill devices follow.
Infallible: the string was parsed and validated when the config loaded.
Sourcepub fn primary_device(&self) -> Device
pub fn primary_device(&self) -> Device
Primary compute device (first in the list).
Sourcepub fn cpu_offload(&self) -> bool
pub fn cpu_offload(&self) -> bool
True if the node lists a CPU/host spill target after its primary.
Sourcepub fn manual_range(&self) -> Option<Range<usize>>
pub fn manual_range(&self) -> Option<Range<usize>>
Manual layer range if given.
Trait Implementations§
Source§impl Clone for NodeConfig
impl Clone for NodeConfig
Source§fn clone(&self) -> NodeConfig
fn clone(&self) -> NodeConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NodeConfig
impl Debug for NodeConfig
Source§impl<'de> Deserialize<'de> for NodeConfig
impl<'de> Deserialize<'de> for NodeConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for NodeConfig
impl RefUnwindSafe for NodeConfig
impl Send for NodeConfig
impl Sync for NodeConfig
impl Unpin for NodeConfig
impl UnsafeUnpin for NodeConfig
impl UnwindSafe for NodeConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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