Skip to content

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++

Mac: link the merged tree (commit batch off on Metal, stubs for the 0.1.44 entry points, version 0.1.44-metal)

Niko1221226e061756bb
diff --git a/metal/CMakeLists.txt b/metal/CMakeLists.txt
index 42978519c..3516a9e58 100644
--- a/metal/CMakeLists.txt
+++ b/metal/CMakeLists.txt
@@ -107,7 +107,7 @@ file(GLOB STRATA_METAL_ENGINE_SOURCES CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_D
add_library(strata_metal_host STATIC ${STRATA_METAL_HOST_SOURCES})
target_include_directories(strata_metal_host PUBLIC ${STRATA_ROOT}/include ${S}/core ${STRATA_ROOT}/third_party/ggml
${STRATA_GGML_DIR}/ggml/include ${STRATA_GGML_DIR}/ggml/src ${STRATA_GGML_DIR}/ggml/src/ggml-cpu)
-target_compile_definitions(strata_metal_host PUBLIC STRATA_NATIVE_EXPERTS=1 STRATA_VERSION="0.1.43.1-metal")
+target_compile_definitions(strata_metal_host PUBLIC STRATA_NATIVE_EXPERTS=1 STRATA_VERSION="0.1.44-metal")
target_compile_options(strata_metal_host PRIVATE -Wno-unused-parameter -Wno-deprecated-declarations)
target_link_libraries(strata_metal_host PUBLIC strata_gpu_metal ggml-cpu ggml-base)
diff --git a/metal/src/engine/stubs_144.cpp b/metal/src/engine/stubs_144.cpp
new file mode 100644
index 000000000..f4750d375
--- /dev/null
+++ b/metal/src/engine/stubs_144.cpp
@@ -0,0 +1,53 @@
+// metal/src/engine/stubs_144.cpp - the 0.1.44 PC entry points the Metal engine does not implement (merge of the Mac branch
+// with the PC release): new overloads / new functions that stubs.cpp (generated) does not know. Each either stops the engine
+// with its name (like stubs.cpp) or, where the caller has a documented fallback, answers "not available". None is reached
+// with the Metal defaults: STRATA_COMMIT_BATCH is off on Metal, the NVFP4 CPU rows need AVX2 / AVX-512, and the K-quant /
+// NVFP4 prompt paths are CUDA / HIP only.
+
+#include <cstddef>
+#include <cstdint>
+
+#include "strata/kernels/cpu/nvfp4_avx2.hpp"
+#include "strata/kernels/cpu/nvfp4_avx512.hpp"
+#include "strata/kernels/iq_kernels.hpp"
+#include "strata/kernels/native_qsa_indexer.hpp"
+#include "strata/kernels/verify_kernels.hpp"
+#include "strata/prefill/kernels.hpp"
+
+namespace strata::metal_engine {
+void missing(const char* name);
+}
+
+namespace strata::kernels {
+void iq_dequant_f16(int, const void*, int64_t, uint16_t*, void*, const float*) { strata::metal_engine::missing("strata::kernels::iq_dequant_f16(scale)"); }
+void iq_dequant_gu_f16(int, const void*, const void*, int64_t, int64_t, uint16_t*, void*, const float*) { strata::metal_engine::missing("strata::kernels::iq_dequant_gu_f16(tail)"); }
+bool gdn_commit_layers(float*, int64_t, int64_t, const float*, int64_t, const float*, int64_t, const float*, const float*, int64_t,
+ int, int, int, int, int, const int32_t*, void*) { return false; } // "nothing launched: keep the per-layer loop"
+void native_qsa_indexer_append_steps_layers(const float*, int64_t, const int32_t*, int, int, int32_t, float, const QsaIndexerLayers&, int,
+ const QsaShapes&, int64_t, const RopeScaling&, void*) {
+ strata::metal_engine::missing("strata::kernels::native_qsa_indexer_append_steps_layers");
+}
+} // namespace strata::kernels
+
+namespace strata::prefill {
+void moe_combine(const float*, const int32_t*, const float*, const float*, const float*, float*, int64_t, void*, const float*) {
+ strata::metal_engine::missing("strata::prefill::moe_combine(row_sd)");
+}
+} // namespace strata::prefill
+
+namespace strata::kernels::cpu {
+bool nvfp4_256_fits(int) { return false; }
+bool nvfp4_512_fits(int) { return false; }
+void nvfp4_256_gu_rows(const uint8_t*, size_t, size_t, int, const void* const*, int, float* const*, int, int, float, float) {
+ strata::metal_engine::missing("strata::kernels::cpu::nvfp4_256_gu_rows");
+}
+void nvfp4_256_rows(const uint8_t*, size_t, int, const void* const*, int, float* const*, int, int, float) {
+ strata::metal_engine::missing("strata::kernels::cpu::nvfp4_256_rows");
+}
+void nvfp4_512_gu_rows(const uint8_t*, size_t, size_t, int, const void* const*, int, float* const*, int, int, float, float) {
+ strata::metal_engine::missing("strata::kernels::cpu::nvfp4_512_gu_rows");
+}
+void nvfp4_512_rows(const uint8_t*, size_t, int, const void* const*, int, float* const*, int, int, float) {
+ strata::metal_engine::missing("strata::kernels::cpu::nvfp4_512_rows");
+}
+} // namespace strata::kernels::cpu
diff --git a/src/core/verify.cpp b/src/core/verify.cpp
index 751fa3763..a8791cc67 100644
--- a/src/core/verify.cpp
+++ b/src/core/verify.cpp
@@ -2035,7 +2035,11 @@ bool Verifier::capture_commit(std::string& err) {
// engine-latency (STRATA_COMMIT_BATCH, default on; =0 keeps the per-layer loop): every GDN layer's conv history and
// state in two launches instead of two per layer (~70 graph nodes fewer; the same arithmetic per layer, bitwise).
// The commit runs between a window and the draft round, which on HIP waits for it.
+#if defined(STRATA_GPU_METAL) // no batched commit kernels on Metal: the per-layer loop (the Mac engine's gated path)
+ static const bool commit_batch = false;
+#else
static const bool commit_batch = [] { const char* e = std::getenv("STRATA_COMMIT_BATCH"); return !e || e[0] != '0'; }();
+#endif
bool gdn_batched = false;
if (commit_batch) {
int64_t n_gdn = 0;