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++
strata-q36: Q8_0 / F16 small tensors widened at load (the Q8_0 file's ssm_alpha / ssm_beta)
Niko1221f9641ff85ef2
diff --git a/src/qwen35/q36_engine.cu b/src/qwen35/q36_engine.cuindex 78c9b7b27..2cc0dd189 100644--- a/src/qwen35/q36_engine.cu+++ b/src/qwen35/q36_engine.cu@@ -801,8 +801,18 @@ float* upload_f32(const strata::TensorInfo& t, const uint8_t* src) {if (t.type == 0) std::memcpy(h.data(), src, h.size() * 4);else if (t.type == 30)for (size_t i = 0; i < h.size(); ++i) h[i] = bf16_to_f32((uint16_t) (src[2 * i] | (src[2 * i + 1] << 8)));- else {- std::fprintf(stderr, "strata-q36: %s is %s, expected F32 or BF16\n", t.name.c_str(), t.type_name());+ else if (t.type == 1) // F16+ for (size_t i = 0; i < h.size(); ++i)+ h[i] = __half2float(__ushort_as_half((unsigned short) (src[2 * i] | (src[2 * i + 1] << 8))));+ else if (t.type == 8 && h.size() % 32 == 0) {+ // Q8_0 (the Q8_0 file stores ssm_alpha / ssm_beta so): blocks of an fp16 scale and 32 int8, widened here+ for (size_t b = 0; b < h.size() / 32; ++b) {+ const uint8_t* q = src + b * 34;+ const float d = __half2float(__ushort_as_half((unsigned short) (q[0] | (q[1] << 8))));+ for (int j = 0; j < 32; ++j) h[b * 32 + j] = d * (float) (int8_t) q[2 + j];+ }+ } else {+ std::fprintf(stderr, "strata-q36: %s is %s, expected F32, BF16, F16 or Q8_0\n", t.name.c_str(), t.type_name());std::exit(1);}float* d = nullptr;diff --git a/tools/qwen35/q36_llama_dump.cpp b/tools/qwen35/q36_llama_dump.cppindex 0b1a7508f..7a2c378a0 100644--- a/tools/qwen35/q36_llama_dump.cpp+++ b/tools/qwen35/q36_llama_dump.cpp@@ -88,8 +88,12 @@ int main(int argc, char** argv) {cap.n_embd = llama_model_n_embd(mdl);cap.n_layer = llama_model_n_layer(mdl);llama_context_params cp = llama_context_default_params();- cp.n_ctx = 4096;- cp.n_batch = cp.n_ubatch = 4096;+ // STRATA_DUMP_CTX: a smaller context / batch (the parity sequences are a few hundred tokens) for a file whose+ // weights leave no VRAM for the 4096-token compute buffers (UD-Q6_K_XL on a 32 GB card)+ const char* cx = std::getenv("STRATA_DUMP_CTX");+ const int nctx = cx ? std::atoi(cx) : 4096;+ cp.n_ctx = nctx;+ cp.n_batch = cp.n_ubatch = nctx;cp.op_offload = ngl > 0; // --ngl 0 is the CPU backend: no prompt matmuls offloaded to a GPU eithercp.cb_eval = on_tensor;cp.cb_eval_user_data = ∩