Merge branch 'f-q4-on242' into r131-q4
# Conflicts: # serve/server.py # src/core/expert_source.cpp
This commit is contained in:
commit
4167bd17ac
32 files changed
+3768
-501
No files matched your search
+119
-36
@@ -29,6 +29,7 @@
|
||||
#include "strata/kernels/cpu/pool.hpp"
|
||||
#include "strata/kernels/cpu/expert_layout.hpp"
|
||||
#include "strata/kernels/ngram.hpp"
|
||||
#include "strata/kernels/iq_kernels.hpp"
|
||||
#include "strata/kernels/s2_expert_grouped.hpp"
|
||||
#include "strata/kernels/sampler.hpp"
|
||||
#include "strata/kernels/verify_kernels.hpp"
|
||||
@@ -192,6 +193,9 @@ struct Options {
|
||||
bool cpu_oracle_q8_0 = false; // pinned x86 activation scales/codes at both expert stages
|
||||
std::string native_head_gguf; // native output.weight experiment; same model shard as the pack
|
||||
std::vector<std::string> native_dense_gguf; // repeat for native GDN/QSA projection shards
|
||||
/// Every shard of --native's model (strata::gguf_split_paths: the metadata shard first; a missing shard is an
|
||||
/// error) and of --native-head-gguf's (the same list unless that names another model).
|
||||
std::vector<std::string> native_shards, native_head_shards;
|
||||
/// Plan v0.3 P1: the whole native arithmetic set as ONE switch (model shard 1). It enables exactly the
|
||||
/// combination recorded in bench/results/2026-09-23-attention-ple plus the native indexer, and never the
|
||||
/// <=256-token attention adapter. It becomes the default once P0 shows it is not slower.
|
||||
@@ -247,6 +251,10 @@ struct Options {
|
||||
bool resident_pin = false;
|
||||
uint64_t resident_headroom = 8ull << 30;
|
||||
bool resident_soft = false;
|
||||
/// CS-T `--resident-budget-gib N`: the resident mode with a RAM budget - the N GiB of experts the GPU cache does
|
||||
/// not hold that the expert profile ranks hottest are copied into RAM, the rest are read from the files in place
|
||||
/// (the GGUF shards when the pack has no experts.bin). 0 = the whole complement (--resident-experts).
|
||||
uint64_t resident_budget = 0;
|
||||
/// R4: slots of VRAM-resident experts. **0 = off, and off is the default.**
|
||||
/// **THE COMMENT THAT USED TO BE HERE WAS FALSE AND ROUND 328 MEASURED IT.** It said "the cache has no
|
||||
/// consumer yet - `moe_hit_grouped_s2` does not exist - so switching it on costs the fill traffic and
|
||||
@@ -384,7 +392,8 @@ void usage() {
|
||||
" --pack DIR the pack directory (default pack/full)\n"
|
||||
" --tokens LIST the prompt as comma-separated token IDS (required)\n"
|
||||
" --tokens-file PATH pretokenized prompt, commas or whitespace (alternative to --tokens)\n"
|
||||
" --ple-gguf PATH required PLE table (original second GGUF shard)\n"
|
||||
" --ple-gguf PATH required PLE table (original second GGUF shard); with --native, the model's\n"
|
||||
" shard that holds per_layer_token_embd.weight when not given\n"
|
||||
" --no-ple explicit diagnostic ablation of the PLE layer\n"
|
||||
" --ple-io direct|mmap|ram n-gram table reads (plan v0.3 P2). direct (default): unbuffered SSD\n"
|
||||
" reads, the table never enters RAM or the file cache; mmap: A/B arm;\n"
|
||||
@@ -528,23 +537,6 @@ void usage() {
|
||||
" does not fit. Same answers as --mmap-experts for the same placement.\n");
|
||||
}
|
||||
|
||||
/// All shards of a split GGUF, from shard 1's path ("...-00001-of-00002.gguf"); just the path when it is not split.
|
||||
std::vector<std::string> model_shards(const std::string& first) {
|
||||
const std::string tag = "-00001-of-";
|
||||
const size_t at = first.rfind(tag);
|
||||
if (at == std::string::npos || first.size() < at + tag.size() + 10) return {first};
|
||||
const int total = std::atoi(first.substr(at + tag.size(), 5).c_str());
|
||||
std::vector<std::string> out;
|
||||
for (int i = 1; i <= total && i <= 99; ++i) {
|
||||
char num[8];
|
||||
std::snprintf(num, sizeof num, "%05d", i);
|
||||
std::string p = first;
|
||||
p.replace(at + 1, 5, num);
|
||||
if (std::ifstream(p, std::ios::binary)) out.push_back(p);
|
||||
}
|
||||
return out.empty() ? std::vector<std::string>{first} : out;
|
||||
}
|
||||
|
||||
bool parse_i64_list(const char* s, std::vector<int64_t>& out, std::string& err) {
|
||||
out.clear();
|
||||
std::string text(s);
|
||||
@@ -1175,6 +1167,17 @@ int main(int argc, char** argv) {
|
||||
if (const char* v = std::getenv("STRATA_RESIDENT_HEADROOM_GIB"); v != nullptr && std::atof(v) >= 0.0)
|
||||
o.resident_headroom = (uint64_t) (std::atof(v) * 1073741824.0);
|
||||
}
|
||||
else if (a == "--resident-budget-gib") {
|
||||
const double gib = std::atof(next("--resident-budget-gib"));
|
||||
if (!(gib > 0.0)) { std::fprintf(stderr, "strata generate: --resident-budget-gib needs N > 0\n"); return 2; }
|
||||
o.resident_budget = (uint64_t) (gib * 1073741824.0);
|
||||
o.mmap_experts = o.resident_cpu_experts = o.resident_pin = true;
|
||||
o.resident_headroom = 4ull << 30;
|
||||
if (const char* v = std::getenv("STRATA_RESIDENT_PIN"); v != nullptr && std::string(v) == "0")
|
||||
o.resident_pin = false;
|
||||
if (const char* v = std::getenv("STRATA_RESIDENT_HEADROOM_GIB"); v != nullptr && std::atof(v) >= 0.0)
|
||||
o.resident_headroom = (uint64_t) (std::atof(v) * 1073741824.0);
|
||||
}
|
||||
else if (a == "--stats") o.stats = true;
|
||||
else if (a == "--shared-late") o.shared_late = true;
|
||||
else if (a == "--keep-canonical") o.keep_canonical = true;
|
||||
@@ -1372,8 +1375,24 @@ int main(int argc, char** argv) {
|
||||
}
|
||||
strata::core::layer_set_shared_early(!o.shared_late);
|
||||
if (!o.native_preset.empty()) {
|
||||
try {
|
||||
// every shard of the model (<name>-0000N-of-0000M.gguf beside --native). A missing shard is an error
|
||||
// here: it used to be skipped, leaving a model with some tensors absent and a later error, or none.
|
||||
o.native_shards = strata::gguf_split_paths(o.native_preset);
|
||||
// --ple-gguf defaults to the shard that holds the PLE table, found by name: shard 2 of the ISTA files
|
||||
// and of Unsloth's UD-Q4_K_XL, shard 1 of Swift's
|
||||
if (o.ple_gguf.empty() && !o.no_ple) {
|
||||
const strata::GgufModel model(o.native_shards);
|
||||
size_t at = 0;
|
||||
if (model.find("per_layer_token_embd.weight", &at) != nullptr) o.ple_gguf = o.native_shards[at];
|
||||
}
|
||||
} catch (const std::exception& e) {
|
||||
std::fprintf(stderr, "strata generate: --native %s: %s\n", o.native_preset.c_str(), e.what());
|
||||
return 2;
|
||||
}
|
||||
if (o.no_ple || o.ple_gguf.empty()) {
|
||||
std::fprintf(stderr, "strata generate: --native requires --ple-gguf (the PLE key is native too)\n");
|
||||
std::fprintf(stderr, "strata generate: --native requires --ple-gguf (the PLE key is native too), and no "
|
||||
"shard of the model holds per_layer_token_embd.weight\n");
|
||||
return 2;
|
||||
}
|
||||
o.stream_token = true;
|
||||
@@ -1385,7 +1404,7 @@ int main(int argc, char** argv) {
|
||||
if (o.native_dense_gguf.empty()) {
|
||||
// every shard of the model (<name>-0000N-of-0000M.gguf beside --native), then the PLE shard: a split
|
||||
// may put any layer in any shard (Swift's GGUFs: layers 13-47 in shard 2, the PLE table in shard 1)
|
||||
o.native_dense_gguf = model_shards(o.native_preset);
|
||||
o.native_dense_gguf = o.native_shards;
|
||||
if (std::find(o.native_dense_gguf.begin(), o.native_dense_gguf.end(), o.ple_gguf) == o.native_dense_gguf.end())
|
||||
o.native_dense_gguf.push_back(o.ple_gguf);
|
||||
}
|
||||
@@ -1488,6 +1507,15 @@ int main(int argc, char** argv) {
|
||||
"session, which a layer split does not have; run them without --layer-split\n");
|
||||
return 2;
|
||||
}
|
||||
if (!o.native_head_gguf.empty()) {
|
||||
try {
|
||||
o.native_head_shards = o.native_head_gguf == o.native_preset ? o.native_shards
|
||||
: strata::gguf_split_paths(o.native_head_gguf);
|
||||
} catch (const std::exception& e) {
|
||||
std::fprintf(stderr, "strata generate: --native-head-gguf %s: %s\n", o.native_head_gguf.c_str(), e.what());
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
if (o.native_ple_key && (o.native_dense_gguf.empty() || o.no_ple)) {
|
||||
std::fprintf(stderr, "strata generate: --native-ple-key requires PLE and --native-dense-gguf\n");
|
||||
return 2;
|
||||
@@ -1525,6 +1553,20 @@ int main(int argc, char** argv) {
|
||||
std::fprintf(stderr, "strata generate: %s\n", err.c_str());
|
||||
return 1;
|
||||
}
|
||||
// Every layer's formats must have GPU expert kernels and a prompt-path dequantizer, checked here, before
|
||||
// anything is allocated: an unsupported down type used to exit from inside the first verify window, and
|
||||
// an unsupported dequant type left the prompt path's fp16 buffer unwritten.
|
||||
const auto& lay = strata::kernels::cpu::expert_layout();
|
||||
for (int64_t l = 0; lay.native && l < (int64_t) lay.fmt.size(); ++l) {
|
||||
const auto& f = lay.fmt[(size_t) l];
|
||||
if (!strata::kernels::native_expert_supported(f.gu_type, f.d_type, f.n_embd, f.n_ff)) {
|
||||
std::fprintf(stderr, "strata generate: layer %lld's experts are %s/%s (ggml types %d/%d), which this "
|
||||
"engine has no GPU kernels for\n", (long long) l,
|
||||
strata::ggml_type_name((uint32_t) f.gu_type), strata::ggml_type_name((uint32_t) f.d_type),
|
||||
f.gu_type, f.d_type);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
const bool native_pack = strata::kernels::cpu::expert_layout().native;
|
||||
// STRATA_EARLY_REMOTE_CONTEXTS=1: create EVERY secondary context here, like CUDA1's. Under WSL2 the driver's
|
||||
@@ -1587,7 +1629,7 @@ int main(int argc, char** argv) {
|
||||
// a pruned variant (GSQ-RCO Coder) ships fewer experts than the canonical 512x10; the model file
|
||||
// is the authority on its own MoE shape - everything else in the geometry is unchanged
|
||||
try {
|
||||
strata::GgufFile model_gguf(o.native_preset);
|
||||
strata::GgufFile model_gguf(o.native_shards.front()); // the metadata shard
|
||||
if (const strata::MetaValue* v = model_gguf.get("qwen4exp.expert_count")) g.n_expert = (int64_t) v->u;
|
||||
if (const strata::MetaValue* v = model_gguf.get("qwen4exp.expert_used_count")) K = (int64_t) v->u;
|
||||
if (const strata::MetaValue* v = model_gguf.get("qwen4exp.rope.freq_base")) gguf_rope_base = v->num();
|
||||
@@ -1682,7 +1724,7 @@ int main(int argc, char** argv) {
|
||||
return 2;
|
||||
}
|
||||
const strata::core::ModelGeometry g0;
|
||||
if (!native_embed.load(o.native_preset, g0.n_embd, 248320, err)) {
|
||||
if (!native_embed.load(o.native_shards, g0.n_embd, 248320, err)) {
|
||||
std::fprintf(stderr, "strata generate: %s\n", err.c_str());
|
||||
return 1;
|
||||
}
|
||||
@@ -1883,7 +1925,8 @@ int main(int argc, char** argv) {
|
||||
ss.ple.w.key_scales = (const float*) ((const uint8_t*) wk->data + wk->codes_bytes);
|
||||
}
|
||||
if (o.native_ple_key && wk->quantized()) {
|
||||
if (!wk->native_data || (wk->native_type != 42 && wk->native_type != 18 && wk->native_type != 23) || !wk->native_q8_1) {
|
||||
if (!wk->native_data || (wk->native_type != 42 && wk->native_type != 18 && wk->native_type != 23 &&
|
||||
wk->native_type != 8) || !wk->native_q8_1) {
|
||||
std::fprintf(stderr, "strata generate: native PLE key is absent or incompatible\n");
|
||||
return 1;
|
||||
}
|
||||
@@ -1895,6 +1938,20 @@ int main(int argc, char** argv) {
|
||||
ss.ple.w.norm_key = (const float*) wnk->data;
|
||||
ss.ple.w.norm_query = (const float*) wnq->data;
|
||||
ss.ple.w.norm_conv = (const float*) wnc->data;
|
||||
// The conv1d kernel reads F16, so this cast is a claim about the pack's storage. A checkpoint that keeps
|
||||
// the tensor F32 (Q8_0, UD-Q4_K_XL) would hand the kernel the low halves of the f32 words - not an error,
|
||||
// a plausible wrong layer-1 routing. tools/iq_pack.py narrows it (index kind 3); a pack that did not is
|
||||
// refused here (#255, gopinath87607). F16 is index kind 5 or 3 (F16InF32) in a native pack and kind 0
|
||||
// (verbatim 2-byte F16) in the canonical Q2_0 pack; BF16 (kind 4) has the same size and is not F16.
|
||||
const bool f16 = wc->kind == strata::core::WeightKind::F16InF32 ||
|
||||
(wc->kind == strata::core::WeightKind::Verbatim && wc->code_bits == 0);
|
||||
if (!f16 || wc->bytes != (uint64_t) wc->elements * 2) {
|
||||
std::fprintf(stderr, "strata generate: blk.1.ple_conv1d.weight is not stored as F16 (pack index kind %d, "
|
||||
"%llu B for %lld values); the PLE conv1d kernel reads F16 - repack with "
|
||||
"tools/iq_pack.py\n",
|
||||
(int) wc->kind, (unsigned long long) wc->bytes, (long long) wc->elements);
|
||||
return 1;
|
||||
}
|
||||
ss.ple.w.conv1d_f16 = (const uint16_t*) wc->data;
|
||||
ss.ple.consts = strata::kernels::ple_artifact_consts();
|
||||
if (o.ple_delay_us > 0) ple_table.set_injected_delay_us(o.ple_delay_us);
|
||||
@@ -2209,7 +2266,7 @@ int main(int argc, char** argv) {
|
||||
const bool last = i + 1 == stages.size();
|
||||
const strata::core::WeightRef* wo_s = st.wt.find("output.weight");
|
||||
if (wo_s == nullptr ||
|
||||
(last && !o.native_head_gguf.empty() && !st.head.load(o.native_head_gguf, g.n_embd, wo_s->ne1, err))) {
|
||||
(last && !o.native_head_gguf.empty() && !st.head.load(o.native_head_shards, g.n_embd, wo_s->ne1, err))) {
|
||||
std::fprintf(stderr, "strata generate: layer split, CUDA%d head: %s\n", st.dev,
|
||||
wo_s == nullptr ? "output.weight is missing" : err.c_str());
|
||||
return 1;
|
||||
@@ -2277,17 +2334,17 @@ int main(int argc, char** argv) {
|
||||
// built with `tools/iq_pack.py --experts-bin` (the per-layer blob sizes of its layout, PR #121). The low-RAM
|
||||
// mode: the experts come from the file through the OS cache instead of a pinned copy in RAM, for a PC whose
|
||||
// GPU holds most of them but whose RAM cannot hold them all.
|
||||
if (native_pack && !std::filesystem::exists(std::filesystem::path(o.pack) / "experts.bin")) {
|
||||
std::fprintf(stderr, "strata generate: --mmap-experts needs the pack's experts.bin; %s is a native (IQ) pack "
|
||||
"built without it: python tools/iq_pack.py --gguf <shard 1> --out %s --experts-bin\n",
|
||||
o.pack.c_str(), o.pack.c_str());
|
||||
return 2;
|
||||
}
|
||||
// CS-T: a native pack without experts.bin maps the model's GGUF shards instead (native_experts.txt's spans,
|
||||
// checked against the files first) - no 30-77 GB copy of the experts on the disk
|
||||
src.set_gguf(o.native_preset);
|
||||
if (const char* v = std::getenv("STRATA_FETCH_THREADS"); v != nullptr && std::atoi(v) > 0)
|
||||
src.set_fetch_threads(std::atoi(v));
|
||||
if (!src.open(o.pack, g.n_layers, g.n_expert, err)) {
|
||||
std::fprintf(stderr, "strata generate: %s\n", err.c_str());
|
||||
return 1;
|
||||
}
|
||||
std::fprintf(stderr, "strata generate: experts via mmap (--mmap-experts; the A/B arm of R2.1)\n");
|
||||
std::fprintf(stderr, "strata generate: experts via mmap (--mmap-experts; %s)\n",
|
||||
src.gguf_mode() ? "the GGUF shards in place, no experts.bin" : "the A/B arm of R2.1");
|
||||
srcp = &src;
|
||||
} else {
|
||||
arena_src.set_gguf(o.native_preset); // plan v0.3 P6: a native pack may take its experts from shard 1
|
||||
@@ -2338,7 +2395,7 @@ int main(int argc, char** argv) {
|
||||
const int64_t n_vocab = wo->ne1;
|
||||
strata::core::NativeHead native_head;
|
||||
if (!o.native_head_gguf.empty() && !multi_gpu) { // a layer split's head is on its last stage
|
||||
if (!native_head.load(o.native_head_gguf, g.n_embd, n_vocab, err)) {
|
||||
if (!native_head.load(o.native_head_shards, g.n_embd, n_vocab, err)) {
|
||||
std::fprintf(stderr, "strata generate: %s\n", err.c_str());
|
||||
return 1;
|
||||
}
|
||||
@@ -3428,7 +3485,8 @@ int main(int argc, char** argv) {
|
||||
const int64_t k = plan_lend(chunk);
|
||||
if (k > 0) lend_from = xcache.slots() - k;
|
||||
}
|
||||
if (src.pin_cache_complement(xcache, err, o.resident_pin, {}, lend_from, o.resident_headroom)) {
|
||||
if (src.pin_cache_complement(xcache, err, o.resident_pin, {}, lend_from, o.resident_headroom,
|
||||
o.resident_budget, &profile)) {
|
||||
if (o.adapt_every > 0 && o.adapt_swaps > 0 &&
|
||||
!src.reserve_exchanges(std::min<int64_t>(o.adapt_swaps, 96), err)) {
|
||||
std::fprintf(stderr, "strata generate: CPU expert residency: %s\n", err.c_str());
|
||||
@@ -4742,6 +4800,9 @@ int main(int argc, char** argv) {
|
||||
double dt_run = 0, dt_commit = 0, dt_draft = 0;
|
||||
int64_t dec_windows = 0, dec_T = 0;
|
||||
const int64_t decode_hits0 = drive.d.cache_hits;
|
||||
// CS-T: the RAM and file tiers of this request (the mmap source; 0 with the arena)
|
||||
const int64_t ram0 = src.ram_reads(), files0 = src.file_reads();
|
||||
const uint64_t file_bytes0 = src.file_read_bytes();
|
||||
const int64_t decode_look0 = drive.d.cache_hits + drive.d.cache_admitted + drive.d.cache_refused;
|
||||
if (cancelled) finish = "cancel";
|
||||
while (!cancelled && produced_n < max_new) {
|
||||
@@ -4983,9 +5044,12 @@ int main(int argc, char** argv) {
|
||||
const int64_t req_hits = drive.d.cache_hits - decode_hits0;
|
||||
const int64_t req_look = (drive.d.cache_hits + drive.d.cache_admitted + drive.d.cache_refused) - decode_look0;
|
||||
// DONE <generated> <prompt> <prompt ms> <decode ms> <finish> <drafts accepted> <drafts offered> <reused> [hits] [lookups]
|
||||
std::printf("DONE %lld %lld %.1f %.1f %s %lld %lld %lld %lld %lld\n", (long long) produced_n, (long long) n, prompt_ms,
|
||||
decode_ms, finish, (long long) draft_accepted, (long long) draft_offered, (long long) resume,
|
||||
(long long) req_hits, (long long) req_look);
|
||||
// [RAM blobs] [file blobs] [file MB] (CS-T tiers; appended, so an older server reads the rest)
|
||||
std::printf("DONE %lld %lld %.1f %.1f %s %lld %lld %lld %lld %lld %lld %lld %.1f\n", (long long) produced_n,
|
||||
(long long) n, prompt_ms, decode_ms, finish, (long long) draft_accepted, (long long) draft_offered,
|
||||
(long long) resume, (long long) req_hits, (long long) req_look,
|
||||
(long long) (src.ram_reads() - ram0), (long long) (src.file_reads() - files0),
|
||||
(double) (src.file_read_bytes() - file_bytes0) / 1e6);
|
||||
std::fflush(stdout);
|
||||
if (drive.routing != nullptr) std::fflush(drive.routing); // the routing trace survives a crash and is watchable mid-session
|
||||
const int64_t fresh = n - resume;
|
||||
@@ -5009,6 +5073,12 @@ int main(int argc, char** argv) {
|
||||
"VRAM tier, %lld blob reads from the file\n",
|
||||
(double) src.resident_bytes() / 1073741824.0, (long long) src.exchanges(),
|
||||
(long long) src.file_reads());
|
||||
// CS-T: the tiers, cumulative - GPU cache hits (the decode lookups above), RAM copy, files (SSD / OS cache)
|
||||
if (srcp == &src)
|
||||
std::fprintf(stderr, "strata serve: expert tiers: GPU %lld hits this request; since the start RAM %lld blobs, files %lld blobs "
|
||||
"%.1f MB read%s\n", (long long) req_hits, (long long) src.ram_reads(),
|
||||
(long long) src.file_reads(), (double) src.file_read_bytes() / 1e6,
|
||||
src.gguf_mode() ? " (the GGUF in place)" : "");
|
||||
// STRATA_SPLIT_TIMING: where each verify stage's host time went, cumulative per window since the start
|
||||
// (waiting for its GPU to ring a layer, the CPU pool and plan per layer, staging the window)
|
||||
if (static const bool st_timing = std::getenv("STRATA_SPLIT_TIMING") != nullptr; st_timing)
|
||||
@@ -5427,6 +5497,10 @@ int main(int argc, char** argv) {
|
||||
if (drive.d.pcie_num < 0) drive.d.pcie_num = 0;
|
||||
if (drive.d.pcie_num > 256) drive.d.pcie_num = 256;
|
||||
const int64_t pcie0 = drive.d.pcie_experts;
|
||||
// CS-T: the file tier since the decode began (the prompt path's copies are before this)
|
||||
const int64_t files0 = src.file_reads(), ram0 = src.ram_reads();
|
||||
const uint64_t fbytes0 = src.file_blob_bytes(), fall0 = src.file_read_bytes();
|
||||
const double fms0 = src.file_ms();
|
||||
if (o.adapt_every > 0 && o.adapt_swaps > 0) drive.d.usage.assign((size_t) (g.n_layers * g.n_expert), 0.0f);
|
||||
int64_t swaps_total = 0;
|
||||
double ms_adapt = 0;
|
||||
@@ -5666,6 +5740,15 @@ int main(int argc, char** argv) {
|
||||
std::printf("%-24s %.2f GiB of experts in RAM, %lld exchanged with the VRAM tier, %lld blob reads from "
|
||||
"the file\n", "resident RAM", (double) src.resident_bytes() / 1073741824.0,
|
||||
(long long) src.exchanges(), (long long) src.file_reads());
|
||||
if (srcp == &src) { // CS-T: the RAM and file tiers (the GPU cache's share is the hit rate above)
|
||||
const double fms = src.file_ms() - fms0, fmb = (double) (src.file_blob_bytes() - fbytes0) / 1e6;
|
||||
std::printf("%-24s decode: RAM %lld blobs, files %lld blobs, %.1f MB read from the files (%.2f MB/round, "
|
||||
"%.1f ms/round of reading, %.2f GB/s per reading thread)%s; prompt copies %.1f MB\n",
|
||||
"expert tiers", (long long) (src.ram_reads() - ram0), (long long) (src.file_reads() - files0),
|
||||
fmb, rounds > 0 ? fmb / rounds : 0.0, rounds > 0 ? fms / rounds : 0.0,
|
||||
fms > 0 ? fmb / fms : 0.0, src.gguf_mode() ? " (the GGUF in place)" : "",
|
||||
(double) (fall0 - fbytes0) / 1e6);
|
||||
}
|
||||
if (rounds > 0 && drive.d.pcie_num > 0)
|
||||
std::printf("%-24s %.2f distinct experts per layer read over PCIe (share %d/256 of the misses)\n",
|
||||
"pcie experts", (double) (drive.d.pcie_experts - pcie0) / (double) (rounds * g.n_layers),
|
||||
|
||||
Reference in new issue
Block a user