mirror of
https://github.com/Niko1221/Strata.git
synced 2026-11-07 14:21:06 -10:00
Mac config: --spec 3 --spec-min-p 0.5 for a resident Q2_0 pack too; IQ3_S numbers re-measured
M5 Max, MTP, 5 interleaved pairs, fixed harness (each run's spec, min-p and context read from the engine's own log), greedy ids identical in every run, over --spec 2: Q2_0 story 104.4 -> 104.7 (+0.4%), code 114.4 -> 127.3 (+11.5%), JSON 124.6 -> 132.5 (+6.3%), agent turn 115.9 -> 117.9 (+1.9%, 3/5 pairs). IQ3_S story 94.2 -> 93.3 (-0.9%), code 103.8 -> 106.1 (+2.5%), JSON 105.1 -> 122.6 (+16.7%), agent turn 102.1 -> 107.1 (+4.9%). The earlier Q2_0 'flat' result and IQ3_S '+1.4..3.6%' came from a harness that gave the spec flags to the first pair of an arm only. Other sets keep --spec 2.
This commit is contained in:
1 parent
656ddfd050
commit
5957d10f75
3 files changed
+14
-10
No files matched your search
+2
-2
@@ -130,8 +130,8 @@ The ready-made Mac engine is in the app and in the Terminal's engine component,
|
||||
## Defaults and options
|
||||
|
||||
The config uses the Mac defaults: `--spec 2` with MTP (best on mixed text; an explicit `--spec N` in the config's `args` is kept),
|
||||
or `--spec 3 --spec-min-p 0.5` for the IQ3_S set (M5 Max, 5 interleaved pairs, same tokens: story +1.4%, code +3.0%, JSON +3.6%,
|
||||
agent turn +2.8% over `--spec 2`; on Q2_0 the same setting measured flat, so Q2_0 stays at `--spec 2`),
|
||||
or `--spec 3 --spec-min-p 0.5` for the IQ3_S and Q2_0 sets (M5 Max, 5 interleaved pairs, same tokens, over `--spec 2`: IQ3_S story -0.9%,
|
||||
code +2.5%, JSON +16.7%, agent turn +4.9%; Q2_0 story +0.4%, code +11.5%, JSON +6.3%, agent turn +1.9%; the other sets are not measured),
|
||||
and the Q8_0 hyper-connection read. `STRATA_HC_Q8=0` in the config's `env` gives the exact BF16 read. The Mac engine is
|
||||
deterministic: two runs give identical numbers.
|
||||
|
||||
|
||||
@@ -44,15 +44,15 @@ STREAM_COPY_GAIN = "decoding about 15%, prompts about 25%" # without the exper
|
||||
# (UD-Q5_K_XL, story: 28 tok/s without MTP, 41.8 at --spec 2, 50.6 at --spec 3). Smaller Macs stream without it.
|
||||
STREAM_MTP_FROM_GB = 96
|
||||
STREAM_SPEC = 3
|
||||
# A resident IQ3_S pack runs a 3-token window with --spec-min-p 0.5 (the draft layer extends the window only when sure): M5 Max,
|
||||
# MTP, 5 interleaved pairs, identical tokens, story / code / JSON / agent turn +1.4% / +3.0% / +3.6% / +2.8% over --spec 2
|
||||
# (phaseA-tests/mac-q/RESULTS.md). Q2_0 measured flat (-1% to 0%), so it stays at --spec 2.
|
||||
SPEC3_MODELS = ("IQ3_S",)
|
||||
# A resident IQ3_S or Q2_0 pack runs a 3-token window with --spec-min-p 0.5 (the draft layer extends the window only when sure):
|
||||
# M5 Max, MTP, 5 interleaved pairs, identical tokens, over --spec 2: IQ3_S story / code / JSON / agent turn -0.9% / +2.5% / +16.7% /
|
||||
# +4.9%; Q2_0 +0.4% / +11.5% / +6.3% / +1.9% (phaseA-tests/mac-q/RESULTS.md sections 14 and 15). Other sets are not measured: --spec 2.
|
||||
SPEC3_MODELS = ("IQ3_S", "Q2_0")
|
||||
SPEC3_MIN_P = "0.5"
|
||||
|
||||
|
||||
def spec_args(model: str, stream: bool, mtp: bool) -> list[str]:
|
||||
"""The window flags for a Mac config: --spec 3 --spec-min-p 0.5 for a resident IQ3_S pack, STREAM_SPEC when the model
|
||||
"""The window flags for a Mac config: --spec 3 --spec-min-p 0.5 for a resident IQ3_S or Q2_0 pack, STREAM_SPEC when the model
|
||||
streams from the SSD with the draft layer, else --spec 2."""
|
||||
if stream and mtp:
|
||||
return ["--spec", str(STREAM_SPEC)]
|
||||
|
||||
@@ -119,15 +119,19 @@ class Config(unittest.TestCase):
|
||||
self.assertTrue(M.stream_mtp(False, 16) and M.stream_mtp(True, 128) and not M.stream_mtp(True, 64))
|
||||
|
||||
def test_iq3_s_runs_a_three_token_window_with_min_p(self):
|
||||
# M5 Max, MTP, 5 interleaved pairs, identical tokens: --spec 3 --spec-min-p 0.5 is +1.4..3.6% over --spec 2 on IQ3_S; Q2_0 is flat
|
||||
# M5 Max, MTP, 5 interleaved pairs, identical tokens: --spec 3 --spec-min-p 0.5 over --spec 2: IQ3_S -0.9% / +2.5% / +16.7% / +4.9%
|
||||
# (story / code / JSON / agent turn), Q2_0 +0.4% / +11.5% / +6.3% / +1.9%
|
||||
shards = [Path("/m/a-00001.gguf"), Path("/m/a-00002.gguf")]
|
||||
iq = M.engine_args(Path("/p/packs/iq3_s"), shards, Path("/d/mtp/rt"), 32768, model="IQ3_S")
|
||||
self.assertEqual(iq[iq.index("--spec") + 1], "3")
|
||||
self.assertEqual(iq[iq.index("--spec-min-p") + 1], "0.5")
|
||||
self.assertIn("--mtp", iq)
|
||||
q2 = M.engine_args(Path("/p/packs/q2_0"), shards, Path("/d/mtp/rt"), 32768, model="Q2_0")
|
||||
self.assertEqual(q2[q2.index("--spec") + 1], "2")
|
||||
self.assertNotIn("--spec-min-p", q2)
|
||||
self.assertEqual(q2[q2.index("--spec") + 1], "3")
|
||||
self.assertEqual(q2[q2.index("--spec-min-p") + 1], "0.5")
|
||||
other = M.engine_args(Path("/p/packs/iq3_xxs"), shards, Path("/d/mtp/rt"), 32768, model="IQ3_XXS") # not measured: the old default
|
||||
self.assertEqual(other[other.index("--spec") + 1], "2")
|
||||
self.assertNotIn("--spec-min-p", other)
|
||||
none = M.engine_args(Path("/p"), shards, Path("/d/mtp/rt"), 32768) # no model named: the old default
|
||||
self.assertEqual(none[none.index("--spec") + 1], "2")
|
||||
self.assertNotIn("--spec-min-p", none)
|
||||
|
||||
Reference in new issue
Block a user