MCPcopy Create free account
hub / github.com/Niko1221/Strata / check_supported

Function check_supported

engine/src/split/src/model.cpp:1284–1293  ·  view source on GitHub ↗

A file whose routed experts the engine has no kernel for is refused here, in one plain line, before anything is read into RAM or placed on the cards (the app's rule, strata_control/split_engine.py, refuses it earlier; this is the same check for a start that skipped the rule). The server then starts the normal layer split. Q2_0 is not listed: the Gguf has already repacked it to Q4_0.

Source from the content-addressed store, hash-verified

1282// the cards (the app's rule, strata_control/split_engine.py, refuses it earlier; this is the same check for a start that skipped the rule). The
1283// server then starts the normal layer split. Q2_0 is not listed: the Gguf has already repacked it to Q4_0.
1284static void check_supported(const Gguf& g) {
1285 const uint32_t ok[] = {T_Q4_K, T_Q5_K, T_Q5_1, T_Q8_0, T_Q4_0, T_IQ4_NL, T_IQ4_XS, T_IQ3_S, T_IQ3_XXS, T_IQ2_S};
1286 for (const auto& kv : g.tensors()) {
1287 const std::string& n = kv.first;
1288 if (n.find("_exps.weight") == std::string::npos || n.find("shexp") != std::string::npos) continue;
1289 if (std::find(std::begin(ok), std::end(ok), kv.second.type) == std::end(ok))
1290 throw std::runtime_error("the all-cards split engine does not read this model's routed experts (" + n + " is ggml type " +
1291 std::to_string(kv.second.type) + "); use the normal layer split");
1292 }
1293}
1294
1295Model::Model(const std::string& path, Load how, Store* store, const std::string* image) : g(path) {
1296 // the cards first: reading the embeddings into RAM below takes seconds on a cold cache

Callers 1

ModelMethod · 0.85

Calls 6

findFunction · 0.50
beginFunction · 0.50
endFunction · 0.50
to_stringFunction · 0.50
tensorsMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected