Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/pr_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -538,14 +538,14 @@ jobs:
${{ env.CACHE_NAMESPACE }}-${{ runner.os }}-skippy-ci-smoke-models-

- name: SDK and API crate tests
if: ${{ matrix.group == 'sdk-api' && (needs.changes.outputs.all_rust == 'true' || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'mesh-llm-client') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'mesh-llm-api-client') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'mesh-llm-api-server') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'mesh-llm-config') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'mesh-llm-commands') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'mesh-llm-events') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'mesh-llm-hardware-profile') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'mesh-llm-runtime-install') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'mesh-llm-sdk') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'mesh-llm-cli') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'mesh-llm-tui') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'mesh-llm-embedded-runtime') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'mesh-llm-console-server') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'mesh-llm-ffi') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'mesh-llm-nodejs')) }}
if: ${{ matrix.group == 'sdk-api' && (needs.changes.outputs.all_rust == 'true' || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'mesh-llm-client') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'mesh-llm-api-client') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'mesh-llm-api-server') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'mesh-llm-config') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'mesh-llm-commands') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'mesh-llm-events') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'mesh-llm-hardware-profile') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'mesh-llm-runtime-install') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'mesh-llm-native-runtime') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'mesh-llm-routing') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'mesh-llm-types') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'mesh-llm-sdk') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'mesh-llm-cli') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'mesh-llm-tui') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'mesh-llm-embedded-runtime') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'mesh-llm-console-server') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'mesh-llm-ffi') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'mesh-llm-nodejs')) }}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this change is getting included multiple time across PRs

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure why tho?

run: |
should_test() {
local crate="$1"
[ "$ALL_RUST" = "true" ] || jq -e --arg crate "$crate" 'index($crate) != null' <<<"$AFFECTED" >/dev/null
}

for c in mesh-llm-client mesh-llm-api-client mesh-llm-api-server mesh-llm-config mesh-llm-commands mesh-llm-events mesh-llm-hardware-profile mesh-llm-runtime-install mesh-llm-cli mesh-llm-tui mesh-llm-embedded-runtime mesh-llm-sdk mesh-llm-console-server mesh-llm-ffi mesh-llm-nodejs; do
for c in mesh-llm-client mesh-llm-api-client mesh-llm-api-server mesh-llm-config mesh-llm-commands mesh-llm-events mesh-llm-hardware-profile mesh-llm-runtime-install mesh-llm-native-runtime mesh-llm-routing mesh-llm-types mesh-llm-cli mesh-llm-tui mesh-llm-embedded-runtime mesh-llm-sdk mesh-llm-console-server mesh-llm-ffi mesh-llm-nodejs; do
if should_test "$c"; then
cargo test -p "$c"
else
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 5c6e3bea6ac4126a8528a250bd270f72ee2cd61b Mon Sep 17 00:00:00 2001
From 21cd005d8e0a4e5b1bb3bc0768969d4cb1bedafd Mon Sep 17 00:00:00 2001
From: Mesh-LLM CI <ci@mesh-llm.local>
Date: Fri, 26 Jun 2026 13:47:52 +1000
Subject: [PATCH 01/10] Add Skippy ABI and package writer foundation
Expand Down Expand Up @@ -334,10 +334,10 @@ index 00000000..7ab93d35
+
+#endif // SKIPPY_ABI_H
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index d15ccfd9..2526f45c 100644
index 320784c3..5298c337 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -35,6 +35,7 @@ add_library(llama
@@ -36,6 +36,7 @@ add_library(llama
llama-model.cpp
llama-quant.cpp
llama-sampler.cpp
Expand All @@ -346,11 +346,11 @@ index d15ccfd9..2526f45c 100644
unicode-data.cpp
unicode.cpp
diff --git a/src/llama-graph.cpp b/src/llama-graph.cpp
index 68c9e606..c39487b8 100644
index 4c86e43c..118987b3 100644
--- a/src/llama-graph.cpp
+++ b/src/llama-graph.cpp
@@ -19,6 +19,20 @@
#include <sstream>
@@ -21,6 +21,20 @@
#include <string>
#include <unordered_set>

+static thread_local skippy_graph_filter g_skippy_graph_filter;
Expand All @@ -370,7 +370,7 @@ index 68c9e606..c39487b8 100644
// dedup helpers

static ggml_tensor * build_attn_inp_kq_mask(
@@ -1855,28 +1869,32 @@ ggml_tensor * llm_graph_context::build_inp_embd(ggml_tensor * tok_embd) const {
@@ -2164,28 +2178,32 @@ ggml_tensor * llm_graph_context::build_inp_embd(ggml_tensor * tok_embd) const {
{
auto & cur = inps[0];

Expand Down Expand Up @@ -421,10 +421,10 @@ index 68c9e606..c39487b8 100644
}

diff --git a/src/llama-graph.h b/src/llama-graph.h
index a6e8c398..00170956 100644
index 4b5b75c6..b943320e 100644
--- a/src/llama-graph.h
+++ b/src/llama-graph.h
@@ -28,6 +28,18 @@ class llama_memory_recurrent_context;
@@ -30,6 +30,18 @@ class llama_memory_recurrent_context;
class llama_memory_hybrid_context;
class llama_memory_hybrid_iswa_context;

Expand All @@ -444,7 +444,7 @@ index a6e8c398..00170956 100644
enum llm_graph_type {
LLM_GRAPH_TYPE_DEFAULT,
diff --git a/src/llama-model-loader.cpp b/src/llama-model-loader.cpp
index 474cabdf..86909230 100644
index e07b0d23..9b0e00ae 100644
--- a/src/llama-model-loader.cpp
+++ b/src/llama-model-loader.cpp
@@ -17,6 +17,16 @@ static const size_t kiB = 1024;
Expand All @@ -464,7 +464,7 @@ index 474cabdf..86909230 100644
const char * llama_file_version_name(llama_fver version) {
switch (version) {
case GGUF_FILE_VERSION_V1: return "GGUF V1 (support until nov 2023)";
@@ -1100,6 +1110,40 @@ struct ggml_tensor * llama_model_loader::create_tensor(
@@ -1103,6 +1113,40 @@ struct ggml_tensor * llama_model_loader::create_tensor(
throw std::runtime_error(format("missing tensor info mapping for %s", tn.str().c_str()));
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 459e05b46cc375894b3386f6f732f6028a9a6699 Mon Sep 17 00:00:00 2001
From 5625209c975d14399629caa50adf3cbb810dbcf5 Mon Sep 17 00:00:00 2001
From: Mesh-LLM CI <ci@mesh-llm.local>
Date: Fri, 26 Jun 2026 13:47:52 +1000
Subject: [PATCH 02/10] Add early staged model-family and chat support
Expand Down Expand Up @@ -32,11 +32,11 @@ Squashes the first Qwen MoE staged-runtime support, native KV page basics, sessi
create mode 100644 common/stage-chat.cpp

diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt
index fc16b21c..4e5a28c0 100644
index 4cf580a0..b06bfeda 100644
--- a/common/CMakeLists.txt
+++ b/common/CMakeLists.txt
@@ -100,6 +100,7 @@ add_library(${TARGET}
regex-partial.h
@@ -98,6 +98,7 @@ add_library(${TARGET}
reasoning-budget.h
sampling.cpp
sampling.h
+ stage-chat.cpp
Expand Down Expand Up @@ -319,18 +319,18 @@ index 7ab93d35..23a46e0f 100644
const char * path,
struct skippy_model_info ** out_info,
diff --git a/src/llama-graph.cpp b/src/llama-graph.cpp
index c39487b8..126261f2 100644
index 118987b3..dfde71c8 100644
--- a/src/llama-graph.cpp
+++ b/src/llama-graph.cpp
@@ -20,6 +20,7 @@
@@ -22,6 +22,7 @@
#include <unordered_set>

static thread_local skippy_graph_filter g_skippy_graph_filter;
+static thread_local skippy_activation_tokens g_skippy_activation_tokens;

void skippy_graph_set_filter(const skippy_graph_filter & filter) {
g_skippy_graph_filter = filter;
@@ -33,6 +34,18 @@ const skippy_graph_filter & skippy_graph_get_filter() {
@@ -35,6 +36,18 @@ const skippy_graph_filter & skippy_graph_get_filter() {
return g_skippy_graph_filter;
}

Expand All @@ -349,7 +349,7 @@ index c39487b8..126261f2 100644
// dedup helpers

static ggml_tensor * build_attn_inp_kq_mask(
@@ -153,6 +166,18 @@ bool llm_graph_input_embd_h::can_reuse(const llm_graph_params & params) {
@@ -155,6 +168,18 @@ bool llm_graph_input_embd_h::can_reuse(const llm_graph_params & params) {
return res;
}

Expand All @@ -368,7 +368,7 @@ index c39487b8..126261f2 100644
void llm_graph_input_pos::set_input(const llama_ubatch * ubatch) {
if (ubatch->pos && pos) {
const int64_t n_tokens = ubatch->n_tokens;
@@ -680,17 +705,22 @@ void llm_graph_input_attn_cross::set_input(const llama_ubatch * ubatch) {
@@ -967,17 +992,22 @@ void llm_graph_input_attn_cross::set_input(const llama_ubatch * ubatch) {
}

void llm_graph_input_mem_hybrid::set_input(const llama_ubatch * ubatch) {
Expand Down Expand Up @@ -396,7 +396,7 @@ index c39487b8..126261f2 100644
}

const int64_t n_rs = mctx->get_recr()->get_n_rs();
@@ -733,9 +763,14 @@ bool llm_graph_input_mem_hybrid::can_reuse(const llm_graph_params & params) {
@@ -1020,9 +1050,14 @@ bool llm_graph_input_mem_hybrid::can_reuse(const llm_graph_params & params) {
// Instead of creating a hybrid input, the graph can simply create 2 separate inputs.
// Refactoring is required in the future.
void llm_graph_input_mem_hybrid_k::set_input(const llama_ubatch * ubatch) {
Expand All @@ -414,10 +414,10 @@ index c39487b8..126261f2 100644
const int64_t n_rs = mctx->get_recr()->get_n_rs();

diff --git a/src/llama-graph.h b/src/llama-graph.h
index 00170956..bc1e10e2 100644
index b943320e..31083518 100644
--- a/src/llama-graph.h
+++ b/src/llama-graph.h
@@ -36,9 +36,17 @@ struct skippy_graph_filter {
@@ -38,9 +38,17 @@ struct skippy_graph_filter {
bool include_output = false;
};

Expand All @@ -435,7 +435,7 @@ index 00170956..bc1e10e2 100644

// certain models (typically multi-modal) can produce different types of graphs
enum llm_graph_type {
@@ -152,6 +160,18 @@ public:
@@ -154,6 +162,18 @@ public:
const int64_t n_embd = 0;
};

Expand All @@ -455,7 +455,7 @@ index 00170956..bc1e10e2 100644
public:
llm_graph_input_pos(uint32_t n_pos_per_embd) : n_pos_per_embd(n_pos_per_embd) {}
diff --git a/src/llama-kv-cache.cpp b/src/llama-kv-cache.cpp
index 2802103b..400a9d29 100644
index 12bf5c37..906e9eac 100644
--- a/src/llama-kv-cache.cpp
+++ b/src/llama-kv-cache.cpp
@@ -4,6 +4,7 @@
Expand All @@ -466,8 +466,8 @@ index 2802103b..400a9d29 100644

#include <algorithm>
#include <cassert>
@@ -1220,6 +1221,352 @@ ggml_type llama_kv_cache::type_v() const {
return layers[0].v->type;
@@ -1240,6 +1241,352 @@ ggml_tensor * llama_kv_cache::get_k_storage(int32_t il) const {
return layers[ikv].k;
}

+bool llama_kv_cache::stage_export_kv_page(
Expand Down Expand Up @@ -820,7 +820,7 @@ index 2802103b..400a9d29 100644
uint32_t result = 0;

diff --git a/src/llama-kv-cache.h b/src/llama-kv-cache.h
index 3d68f98c..83cee5f9 100644
index 531d99db..d9301c19 100644
--- a/src/llama-kv-cache.h
+++ b/src/llama-kv-cache.h
@@ -6,12 +6,14 @@
Expand All @@ -838,9 +838,9 @@ index 3d68f98c..83cee5f9 100644

//
// llama_kv_cache
@@ -161,6 +163,23 @@ public:
ggml_type type_k() const;
ggml_type type_v() const;
@@ -164,6 +166,23 @@ public:
std::vector<uint32_t> get_layer_ids() const;
ggml_tensor * get_k_storage(int32_t il) const;

+ bool stage_export_kv_page(
+ int32_t layer_start,
Expand All @@ -863,10 +863,10 @@ index 3d68f98c..83cee5f9 100644
// graph_build API
//
diff --git a/src/llama-model-loader.cpp b/src/llama-model-loader.cpp
index 86909230..622b228e 100644
index 9b0e00ae..561e9850 100644
--- a/src/llama-model-loader.cpp
+++ b/src/llama-model-loader.cpp
@@ -1088,13 +1088,6 @@ struct ggml_tensor * llama_model_loader::create_tensor(
@@ -1091,13 +1091,6 @@ struct ggml_tensor * llama_model_loader::create_tensor(
};

auto buft_for_tensor = [&](ggml_tensor * t_meta) -> ggml_backend_buffer_type_t {
Expand All @@ -880,7 +880,7 @@ index 86909230..622b228e 100644
// some models use the token embedding tensor as the output, but since these are used in different layers and with different ops
// the tensor is duplicated
// to handle this, we check if the tensor is duplicated, and if so, we assume that it is being loaded as the output tensor
@@ -1128,22 +1121,38 @@ struct ggml_tensor * llama_model_loader::create_tensor(
@@ -1131,22 +1124,38 @@ struct ggml_tensor * llama_model_loader::create_tensor(
break;
}

Expand Down Expand Up @@ -929,10 +929,10 @@ index 86909230..622b228e 100644
if (info.op == GGML_OP_NONE || (flags & TENSOR_SKIP)) {
const size_t nbytes = ggml_nbytes(t_meta);
diff --git a/src/llama-model.cpp b/src/llama-model.cpp
index d041a9ce..fc13d414 100644
index d58ebac2..3196973f 100644
--- a/src/llama-model.cpp
+++ b/src/llama-model.cpp
@@ -1360,13 +1360,13 @@ bool llama_model_base::load_tensors(llama_model_loader & ml) {
@@ -1367,13 +1367,13 @@ bool llama_model_base::load_tensors(llama_model_loader & ml) {
}

// MoE expert weight scales (per-expert, shape {n_expert})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 3bb375d5797de655cdee37f0a8eb272cfb609812 Mon Sep 17 00:00:00 2001
From a4f23f17019419c4e1f7acd2bea9bd9ee18159f9 Mon Sep 17 00:00:00 2001
From: Mesh-LLM CI <ci@mesh-llm.local>
Date: Fri, 26 Jun 2026 13:47:52 +1000
Subject: [PATCH 03/10] Add staged sampling, checkpoints, and part loading
Expand Down Expand Up @@ -245,18 +245,18 @@ index 23a46e0f..4dd985da 100644
size_t output_text_capacity,
size_t * out_text_bytes,
diff --git a/src/llama-model-loader.cpp b/src/llama-model-loader.cpp
index 622b228e..16cc0b06 100644
index 561e9850..97372c4c 100644
--- a/src/llama-model-loader.cpp
+++ b/src/llama-model-loader.cpp
@@ -525,6 +525,7 @@ llama_model_loader::llama_model_loader(
@@ -528,6 +528,7 @@ llama_model_loader::llama_model_loader(
void * set_tensor_data_ud,
const std::string & fname,
std::vector<std::string> & splits,
+ bool ordered_parts,
FILE * file,
bool use_mmap,
bool use_direct_io,
@@ -593,11 +594,50 @@ llama_model_loader::llama_model_loader(
@@ -596,11 +597,50 @@ llama_model_loader::llama_model_loader(
n_bytes += ggml_nbytes(cur);
weights_map.emplace(tensor_name, llama_tensor_weight(files.back().get(), 0, metadata, cur));
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 0e34ce3acca749ba8e949d9b3b9e24dfc1537933 Mon Sep 17 00:00:00 2001
From 29baeca7b5f406c2df3966e98c1e5e4b4ef10258 Mon Sep 17 00:00:00 2001
From: Mesh-LLM CI <ci@mesh-llm.local>
Date: Fri, 26 Jun 2026 13:47:52 +1000
Subject: [PATCH 04/10] Add lanes, external media, and chat grammar support
Expand All @@ -8,11 +8,11 @@ Squashes Qwen3 MoE staged execution, KV cache type and generation signal ABI, ba
common/stage-chat.cpp | 230 ++++++++
include/skippy-signals.h | 44 ++
include/skippy.h | 165 +++---
src/llama-kv-cache.cpp | 346 ------------
src/llama-kv-cache.cpp | 361 +------------
src/llama-kv-cache.h | 19 -
src/models/qwen3moe.cpp | 18 +-
src/skippy.cpp | 1079 +++++++++++++++++++++++---------------
7 files changed, 1013 insertions(+), 888 deletions(-)
7 files changed, 1019 insertions(+), 897 deletions(-)
create mode 100644 include/skippy-signals.h

diff --git a/common/stage-chat.cpp b/common/stage-chat.cpp
Expand Down Expand Up @@ -573,11 +573,40 @@ index 4dd985da..3ffdb879 100644
const char * path,
struct skippy_model_info ** out_info,
diff --git a/src/llama-kv-cache.cpp b/src/llama-kv-cache.cpp
index 400a9d29..024bac7a 100644
index 906e9eac..4bdefc22 100644
--- a/src/llama-kv-cache.cpp
+++ b/src/llama-kv-cache.cpp
@@ -1221,352 +1221,6 @@ ggml_type llama_kv_cache::type_v() const {
return layers[0].v->type;
@@ -212,12 +212,10 @@ llama_kv_cache::llama_kv_cache(
n_embd_head_k_all = -1;
}

- if (!is_mla) {
- if (n_embd_head_v_all == 0) {
- n_embd_head_v_all = (int32_t) hparams.n_embd_head_v(il);
- } else if (n_embd_head_v_all > 0 && n_embd_head_v_all != (int32_t) hparams.n_embd_head_v(il)) {
- n_embd_head_v_all = -1;
- }
+ if (n_embd_head_v_all == 0) {
+ n_embd_head_v_all = (int32_t) hparams.n_embd_head_v(il);
+ } else if (n_embd_head_v_all > 0 && n_embd_head_v_all != (int32_t) hparams.n_embd_head_v(il)) {
+ n_embd_head_v_all = -1;
}

// [TAG_V_CACHE_VARIABLE]
@@ -339,9 +337,8 @@ llama_kv_cache::llama_kv_cache(
ggml_is_quantized(type_k) &&
hparams.n_embd_head_k() % 64 == 0;

- // always create Hadamard rotation tensors for DeepSeek lightning indexers
- if ((model.arch == LLM_ARCH_DEEPSEEK32 || model.arch == LLM_ARCH_DEEPSEEK4) &&
- hparams.n_embd_head_k_full == hparams.indexer_head_size) {
+ // always create Hadamard rotation tensors for DeepSeek V3.2 DSA lightning indexer
+ if (model.arch == LLM_ARCH_DEEPSEEK32 && hparams.n_embd_head_k_full == hparams.indexer_head_size) {
attn_rot_k = true;
}

@@ -1241,352 +1238,6 @@ ggml_tensor * llama_kv_cache::get_k_storage(int32_t il) const {
return layers[ikv].k;
}

-bool llama_kv_cache::stage_export_kv_page(
Expand Down Expand Up @@ -930,7 +959,7 @@ index 400a9d29..024bac7a 100644
uint32_t result = 0;

diff --git a/src/llama-kv-cache.h b/src/llama-kv-cache.h
index 83cee5f9..a3a1ec96 100644
index d9301c19..92394d4c 100644
--- a/src/llama-kv-cache.h
+++ b/src/llama-kv-cache.h
@@ -13,8 +13,6 @@ struct llama_cparams;
Expand All @@ -942,9 +971,9 @@ index 83cee5f9..a3a1ec96 100644
//
// llama_kv_cache
//
@@ -163,23 +161,6 @@ public:
ggml_type type_k() const;
ggml_type type_v() const;
@@ -166,23 +164,6 @@ public:
std::vector<uint32_t> get_layer_ids() const;
ggml_tensor * get_k_storage(int32_t il) const;

- bool stage_export_kv_page(
- int32_t layer_start,
Expand Down
Loading
Loading