Qwen3.8-Flash-Next on any consumer hardware: one-click install for Windows / Linux. Strata inference engine, OpenAI/Anthropic API on localhost, optional image input.
C++
Adaptive tier: --adapt-decay
sergiywithc791d329340e
diff --git a/src/program/generate.cpp b/src/program/generate.cppindex 88fcb038c..e796a3f98 100644--- a/src/program/generate.cpp+++ b/src/program/generate.cpp@@ -362,6 +362,7 @@ struct Options {/// Plan v0.3 P6: every `adapt_every` rounds, swap up to `adapt_swaps` of the most-routed missing experts into/// the VRAM tier in place of the least-routed resident ones (decayed counts). 0 = static residency.int adapt_every = 4;+ float adapt_decay = 0.7f; ///< the usage counts are multiplied by this after each adaptation (--adapt-decay)/// Plan v0.3 P6: a draft enters the verify window only while every draft before it (and itself) has at least/// this probability under the draft layer; 0 = always --spec-1 drafts.double spec_min_p = 0.0;@@ -1192,6 +1193,7 @@ int main(int argc, char** argv) {else if (a == "--mtp-window") o.mtp_window = std::atoll(next("--mtp-window"));else if (a == "--pcie-frac") o.pcie_frac = std::atof(next("--pcie-frac"));else if (a == "--adapt-every") o.adapt_every = std::atoi(next("--adapt-every"));+ else if (a == "--adapt-decay") o.adapt_decay = (float) std::atof(next("--adapt-decay"));else if (a == "--spec-min-p") o.spec_min_p = std::atof(next("--spec-min-p"));else if (a == "--stop-eos") o.stop_eos = true;else if (a == "--spec-split") o.spec_split = true;@@ -4651,10 +4653,11 @@ int main(int argc, char** argv) {const strata::core::OnDevice on(st->dev);cudaEventRecord(st->adapt_ev, st->adapt_stream);}- // #477: the routing counted since the start (each count adds up to 1 / (1 - 0.7) over its decays: the- // sum is proportional to the routing itself) - only with --expert-profile-save, else `heat` is empty+ // #477: the routing counted since the start (each count adds up to 1 / (1 - --adapt-decay) over its+ // decays: the sum is proportional to the routing itself) - only with --expert-profile-save, else `heat`+ // is emptyfor (size_t i = 0; i < heat.size(); ++i) heat[i] += (double) drive.d.usage[i];- for (float& v : drive.d.usage) v *= 0.7f;+ for (float& v : drive.d.usage) v *= o.adapt_decay;return true;};// #477: write the learned profile (between requests and at QUIT: a prompt's lent slots are back by then).@@ -6306,7 +6309,7 @@ int main(int argc, char** argv) {if (trace_adapt)std::fprintf(stderr, "strata: ADAPT round=%lld swapped %zu of %d slots, usage decayed\n",(long long) adapt_rounds, swaps.size(), o.adapt_swaps);- for (float& v : drive.d.usage) v *= 0.7f;+ for (float& v : drive.d.usage) v *= o.adapt_decay;swaps_total += (int64_t) swaps.size();ms_adapt += std::chrono::duration<double, std::milli>(Clock::now() - ta).count();return true;