MCPcopy Create free account
hub / github.com/antirez/llama.cpp-deepseek-v4-flash / add_child

Method add_child

tools/server/server-task.h:228–245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

226 }
227
228 void add_child(int id_parent, int id_child) {
229 server_task copy;
230
231 copy.id = id_child;
232 copy.id_parent = id_parent;
233 copy.params = params;
234 copy.type = type;
235 copy.tokens = tokens.clone();
236 copy.id_slot = -1; // child tasks cannot specify slot
237
238 // use different sampling seed for each child
239 // note: https://github.com/ggml-org/llama.cpp/pull/18700#discussion_r2675115723
240 if (copy.params.sampling.seed != LLAMA_DEFAULT_SEED) {
241 copy.params.sampling.seed += (uint32_t)child_tasks.size() + 1;
242 }
243
244 child_tasks.push_back(std::move(copy));
245 }
246
247 // the task will be moved into queue, then onto slots
248 // however, the state must be kept by caller (e.g., HTTP thread)

Callers 1

Calls 3

cloneMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected