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: the DSpark message says it is not supported on a Mac yet; --dspark on warns before loading (engine and launch)

Niko1221864afc7421f5
diff --git a/src/dsv41/ds4_model.cu b/src/dsv41/ds4_model.cu
index 980bc0deb..51f1eac08 100644
--- a/src/dsv41/ds4_model.cu
+++ b/src/dsv41/ds4_model.cu
@@ -2232,9 +2232,13 @@ struct Model::Impl {
#if defined(STRATA_METAL)
// On a Mac the drafter is off unless it is asked for outright: it gave the same answers and no speed-up there, and the head of its
// quantised Markov bias has no Metal kernel (the engine stopped with "kernel launch with no Metal dispatch" on the setup test).
- if (o.dspark_auto && o.dspark && g.n_mtp > 0) {
- o.dspark = false;
- std::fprintf(stderr, "ds4: DSpark not loaded on a Mac (--dspark on loads it anyway)\n");
+ if (o.dspark && g.n_mtp > 0) {
+ if (o.dspark_auto) {
+ o.dspark = false;
+ std::fprintf(stderr, "ds4: the DSpark drafter is not supported on a Mac yet, so it is not loaded\n");
+ } else { // --dspark on / off: loaded as asked
+ std::fprintf(stderr, "ds4: WARNING: the DSpark drafter is not supported on a Mac yet; --dspark on will probably stop at the Markov bias step (kernel launch with no Metal dispatch)\n");
+ }
}
#endif
if (o.dspark_auto && o.dspark && g.n_mtp > 0) { // (see Options::dspark_auto)
diff --git a/strata_cli/launch/cmd.py b/strata_cli/launch/cmd.py
index 6bb6caf95..1358d4688 100644
--- a/strata_cli/launch/cmd.py
+++ b/strata_cli/launch/cmd.py
@@ -285,6 +285,9 @@ def settings_from_args(a: argparse.Namespace, catalog=None) -> tuple[S.LaunchSet
s.extra = {**s.extra, **S.settings_from_pairs(a.set)}
if a.dspark:
s.extra = {**s.extra, "--dspark": a.dspark}
+ if a.dspark == "on" and sys.platform == "darwin":
+ notices.append(S.Notice("warn", "DeepSeek's drafter (DSpark) is not supported on a Mac yet, so --dspark on will probably stop the engine.",
+ "Leave it out: on a Mac the drafter is off and answers are as fast without it."))
if a.pool_cores:
text = a.pool_cores.replace(" ", "")
if not re.fullmatch(r"\d+(-\d+(:\d+)?)?(,\d+(-\d+(:\d+)?)?)*", text):
diff --git a/tests/terminal/test_launch.py b/tests/terminal/test_launch.py
index 15f4c0441..a4b8c6c6c 100644
--- a/tests/terminal/test_launch.py
+++ b/tests/terminal/test_launch.py
@@ -837,6 +837,17 @@ class FlagsCommand(unittest.TestCase):
self.assertNotIn("--pool-cores", p["settings"]["extra"])
self.assertTrue(any("pool-cores" in w for w in p["warnings"]))
+ def test_dspark_on_a_mac_is_warned_about_and_not_refused(self):
+ # the drafter has no Metal kernels yet: --dspark on is passed on as asked, with a plain warning (recommend, never force)
+ import sys
+ from unittest import mock
+ with mock.patch.object(sys, "platform", "darwin"):
+ p = self.plan("--model", "q2_0", "--dspark", "on")
+ self.assertEqual(p["settings"]["extra"].get("--dspark"), "on")
+ self.assertTrue(any("DSpark" in w and "Mac" in w for w in p["warnings"]), p["warnings"])
+ p = self.plan("--model", "q2_0", "--dspark", "auto")
+ self.assertFalse(any("DSpark" in w and "Mac" in w for w in p["warnings"]))
+
def test_dspark_takes_a_word_and_the_word_reaches_the_engine_line(self):
# --set dspark=on used to start strata-dsv41 with a lone "--dspark" ("--dspark needs a value", #3959)
from strata_cli.launch import settings as S