MCPcopy Create free account
hub / github.com/antirez/ds4 / kv_cache_push_raw

Function kv_cache_push_raw

ds4.c:8541–8554  ·  view source on GitHub ↗

Append to the raw SWA cache. Once full, it slides by one row. */

Source from the content-addressed store, hash-verified

8539
8540static bool weights_model_map_decode_static_supported(const ds4_weights *w) {
8541 if (!w) return false;
8542 if (DS4_MODEL_FAMILY == DS4_MODEL_FAMILY_GLM_DSA) {
8543 return g_glm_streaming_runtime_static_map_enabled;
8544 }
8545 for (uint32_t il = 0; il < DS4_N_LAYER; il++) {
8546 const ds4_layer_weights *l = &w->layer[il];
8547 if (!l->ffn_gate_exps || !l->ffn_up_exps || !l->ffn_down_exps) continue;
8548 if (!weights_streaming_layer_experts_uniform(w, il)) {
8549 return false;
8550 }
8551 }
8552 return true;
8553}
8554
8555static void model_map_span_vec_include_output(ds4_model_map_span_vec *spans, const ds4_weights *w) {
8556 model_map_span_vec_include_one(spans, w->output_hc_base);
8557 model_map_span_vec_include_one(spans, w->output_hc_fn);

Callers 3

Calls 2

f32_to_f16Function · 0.85
f16_to_f32Function · 0.70

Tested by

no test coverage detected