mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-05 15:58:53 +00:00
inkling2: match strata-v1.1 format in fast loader/SSD cap and align HELLO/GEN max_ctx
This commit is contained in:
1 parent
e487760492
commit
b02efbd48e
2 files changed
+6
-5
No files matched your search
@@ -775,8 +775,9 @@ struct InkCudaModel {
|
||||
const std::string& layer_split_spec = "",
|
||||
int cpu_threads = 0) {
|
||||
// Fast zero-overhead path for single-GPU .strata v1.1!
|
||||
const bool is_strata_fmt = (mf.m.format.rfind("strata", 0) == 0);
|
||||
const bool single_gpu_req = (gpu1 < 0) && (all_gpus.size() <= 1) && layer_split_spec.empty();
|
||||
if (mf.m.format == "strata" && single_gpu_req) {
|
||||
if (is_strata_fmt && single_gpu_req) {
|
||||
return load(mf.path, gpu0, build_screen, err, extra_reserve_bytes, vram_experts_gb, ram_experts_gb, ssd_experts, cpu_threads);
|
||||
}
|
||||
|
||||
@@ -1290,7 +1291,7 @@ struct InkCudaModel {
|
||||
uint8_t* h_arena_base = nullptr;
|
||||
if (uh > 0) {
|
||||
const size_t ram_cap = safe_host_ram_cap(ram_experts_gb, ssd_experts);
|
||||
if (ram_cap < uh && mf.m.format != "strata") {
|
||||
if (ram_cap < uh && !is_strata_fmt) {
|
||||
std::fprintf(stderr, "[InkCUDA] Note: GGUF/HF host spill %.2f GiB exceeds soft RAM cap %.2f GiB (allocating pageable host arena)\n",
|
||||
(double)uh / 1073741824.0, (double)ram_cap / 1073741824.0);
|
||||
}
|
||||
|
||||
@@ -475,8 +475,8 @@ inline int run_serve_loop(const ServeConfig& cfg, InkModelFile& mf, InkBackend&
|
||||
}
|
||||
|
||||
rq.prompt_len = static_cast<int>(rq.prompt_ids.size());
|
||||
if (rq.prompt_len <= 0 || rq.prompt_len >= cfg.bopts.max_ctx) {
|
||||
err = "prompt length out of range (1.." + std::to_string(cfg.bopts.max_ctx - 1) + ")";
|
||||
if (rq.prompt_len <= 0 || rq.prompt_len >= eff_max_ctx) {
|
||||
err = "prompt length out of range (1.." + std::to_string(eff_max_ctx - 1) + ")";
|
||||
rq.active = false;
|
||||
return false;
|
||||
}
|
||||
@@ -508,7 +508,7 @@ inline int run_serve_loop(const ServeConfig& cfg, InkModelFile& mf, InkBackend&
|
||||
if (line == "QUIT") { quit_requested = true; return false; }
|
||||
if (line == "HELLO") {
|
||||
proto("HELLO ok engine=strata-inkling-%s arch=inkling2_loop backend=%s max_ctx=%d parallel=%d",
|
||||
cfg.version.c_str(), backend.backend_name(), cfg.bopts.max_ctx, P);
|
||||
cfg.version.c_str(), backend.backend_name(), eff_max_ctx, P);
|
||||
return true;
|
||||
}
|
||||
if (line == "STATS") {
|
||||
|
||||
Reference in new issue
Block a user