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

Function tensor_1d_value

ds4.c:5507–5519  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5505 dspark_weights_note_metadata_error(dw, "missing or zero Markov rank");
5506 }
5507 if (!dw->has_noise_token_id || dw->noise_token_id >= DS4_N_VOCAB) {
5508 dspark_weights_note_metadata_error(dw, "missing or out-of-range noise token");
5509 }
5510 if (!dw->has_target_layers || dw->target_layer_count == 0) {
5511 dspark_weights_note_metadata_error(dw, "missing target layer list");
5512 return;
5513 }
5514
5515 uint32_t prev = UINT32_MAX;
5516 for (uint32_t i = 0; i < dw->target_layer_count; i++) {
5517 const uint32_t layer = dw->target_layers[i];
5518 if (layer >= DS4_N_LAYER) {
5519 dspark_weights_note_metadata_error(dw, "target layer is outside the target model");
5520 }
5521 if (i != 0 && layer <= prev) {
5522 dspark_weights_note_metadata_error(dw, "target layers are not strictly increasing");

Callers 3

tensor_2d_valueFunction · 0.85
compressor_decode_oneFunction · 0.85

Calls 3

ds4_dieFunction · 0.85
tensor_dataFunction · 0.85
f16_to_f32Function · 0.70

Tested by

no test coverage detected