MCPcopy Create free account
hub / github.com/evilsocket/cake / Args

Class Args

cake-core/src/lib.rs:150–295  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148#[derive(Clone, Parser, Default, Debug)]
149#[command(author, version, about, long_about = None)]
150pub struct Args {
151 /// GPU device index.
152 #[arg(long, default_value_t = 0)]
153 pub device: usize,
154 /// Mode (set by subcommand, not directly by user).
155 #[arg(skip)]
156 pub mode: Mode,
157 /// Worker name.
158 #[arg(long)]
159 pub name: Option<String>,
160 /// Binding address and port for workers.
161 #[arg(long, default_value = "0.0.0.0:10128")]
162 pub address: String,
163 /// Enable OpenAI compatible chat completion API.
164 #[arg(long)]
165 pub api: Option<String>,
166 /// Path to model directory, or HuggingFace repo ID (e.g., evilsocket/Qwen2.5-Coder-1.5B-Instruct).
167 #[arg(long, default_value = "./cake-data/Meta-Llama-3-8B/")]
168 pub model: String,
169 /// Topology file.
170 #[arg(long)]
171 pub topology: Option<String>,
172 /// The initial prompt (set programmatically from the positional argument in `cake run`).
173 #[arg(skip = String::from("The sky is blue because "))]
174 pub prompt: String,
175 /// The system prompt.
176 #[arg(long, default_value = "You are a helpful AI assistant.")]
177 pub system_prompt: String,
178 /// The seed to use when generating random samples.
179 #[arg(long, default_value_t = 299792458)]
180 pub seed: u64,
181 /// The length of the sample to generate (in tokens).
182 #[arg(short = 'n', long, default_value_t = 2048)]
183 pub sample_len: usize,
184 /// The temperature used to generate samples.
185 #[arg(long, default_value_t = 1.0)]
186 pub temperature: f64,
187 /// Nucleus sampling probability cutoff.
188 #[arg(long)]
189 pub top_p: Option<f64>,
190 /// Only sample among the top K samples.
191 #[arg(long)]
192 pub top_k: Option<usize>,
193 /// Penalty to be applied for repeating tokens, 1. means no penalty.
194 #[arg(long, default_value_t = 1.1)]
195 pub repeat_penalty: f32,
196 /// The context size to consider for the repeat penalty.
197 #[arg(long, default_value_t = 128)]
198 pub repeat_last_n: usize,
199 /// Use different dtype than f16
200 #[arg(long)]
201 pub dtype: Option<String>,
202
203 /// Cluster key for zero-config mDNS discovery and PSK authentication.
204 /// When set on both master and workers, enables automatic discovery,
205 /// layer assignment, and model data push without topology files.
206 #[arg(long, env = "CAKE_CLUSTER_KEY")]
207 pub cluster_key: Option<String>,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected