Skip to content

[Engine] Inkling 2 Mini: several requests at once (batch slots, parallel) - #226

Draft
okada-shogo wants to merge 13 commits into
simplexai-labs:mainfrom
okada-shogo:port/batch-slots
Draft

okada-shogo wants to merge 13 commits into
simplexai-labs:mainfrom
okada-shogo:port/batch-slots

Conversation

@okada-shogo

@okada-shogo okada-shogo commented Nov 22, 2026 •

Copy link
Copy Markdown

Problem and result

Inkling 2 Mini refuses --batch today (inkling2.cpp: "runs one sequence"), so the server answers one request at a
time and setup writes "parallel": 1. This PR lets it take batch slots like the other strata-poly models: up to 16
slots in all (--batch 1 to 15; the server uses up to 8, docs/BATCHING.md), a token of each slot in one step().

  • One request (--batch 0, "parallel": 1) runs the same launches as main: same tokens and top-5 probabilities.
  • Each slot writes the tokens it writes alone (--check-batch, every token, 2 to 6 slots).
  • Not with --draft-model; not on Metal yet (refused there; setup keeps "parallel": 1 on a Mac).

Throughput (tok/s, all chats together, higher is better). The server (terminal/serve), 300 tokens a chat,
greedy, fp16 cache, 32K context. Each cell is the mean of 3 rounds. main answers one request at a time, so every row is
compared with main's 1-chat rate.

Card Model Measure main this PR alone Change
Quadro RTX 6000 24 GB IQ4_NL 1 chat, "parallel": 1 60.3 60.4 +0.1%
Quadro RTX 6000 24 GB IQ4_NL 2 chats, "parallel": 2 60.3 78.2 +29.7%
Quadro RTX 6000 24 GB IQ4_NL 4 chats, "parallel": 4 60.3 94.7 +57.0%
Quadro RTX 6000 24 GB IQ4_NL 8 chats, "parallel": 8 60.3 103.3 +71.2%
Quadro RTX 6000 24 GB IQ4_NL 1 chat, "parallel": 4 60.3 61.8 +2.4%
Quadro RTX 6000 24 GB UD-Q2_K_XL 1 chat, "parallel": 1 58.7 58.7 -0.1%
Quadro RTX 6000 24 GB UD-Q2_K_XL 2 chats, "parallel": 2 58.7 77.7 +32.3%
Quadro RTX 6000 24 GB UD-Q2_K_XL 4 chats, "parallel": 4 58.7 92.6 +57.7%
Quadro RTX 6000 24 GB UD-Q2_K_XL 8 chats, "parallel": 8 58.7 101.8 +73.4%
Quadro RTX 6000 24 GB UD-Q2_K_XL 1 chat, "parallel": 4 58.7 60.2 +2.6%
RTX 2070 Super 8 GB IQ4_NL 1 chat, "parallel": 1 38.6 38.2 -1.0%
RTX 2070 Super 8 GB IQ4_NL 2 chats, "parallel": 2 38.6 47.4 +22.9%
RTX 2070 Super 8 GB IQ4_NL 4 chats, "parallel": 4 38.6 50.5 +30.8%
RTX 2070 Super 8 GB IQ4_NL 1 chat, "parallel": 4 38.6 36.1 -6.5%

The 24 GB card holds every expert in VRAM in every run (3,072 of 3,072). On the 8 GB card decode is bound by the CPU's
experts, and the slots' caches take VRAM from the expert cache (922 experts at 1 slot, 795 at 2, 649 at 4): that is
why it gains less, and why one chat at "parallel": 4 is slower there.

Each run (tok/s)
Card Model Measure Build Run 1 Run 2 Run 3
Quadro RTX 6000 24 GB IQ4_NL 1 chat, "parallel": 1 main 60.4 60.3 60.3
Quadro RTX 6000 24 GB IQ4_NL 1 chat, "parallel": 1 this PR alone 60.4 60.4 60.4
Quadro RTX 6000 24 GB IQ4_NL 2 chats, "parallel": 2 this PR alone 78.2 78.2 78.3
Quadro RTX 6000 24 GB IQ4_NL 4 chats, "parallel": 4 this PR alone 94.4 94.8 95.0
Quadro RTX 6000 24 GB IQ4_NL 8 chats, "parallel": 8 this PR alone 103.3 103.6 102.9
Quadro RTX 6000 24 GB IQ4_NL 1 chat, "parallel": 4 this PR alone 61.9 61.9 61.5
Quadro RTX 6000 24 GB UD-Q2_K_XL 1 chat, "parallel": 1 main 58.7 58.7 58.8
Quadro RTX 6000 24 GB UD-Q2_K_XL 1 chat, "parallel": 1 this PR alone 58.8 58.5 58.8
Quadro RTX 6000 24 GB UD-Q2_K_XL 2 chats, "parallel": 2 this PR alone 77.6 77.8 77.7
Quadro RTX 6000 24 GB UD-Q2_K_XL 4 chats, "parallel": 4 this PR alone 92.0 92.9 93.0
Quadro RTX 6000 24 GB UD-Q2_K_XL 8 chats, "parallel": 8 this PR alone 101.3 102.1 102.1
Quadro RTX 6000 24 GB UD-Q2_K_XL 1 chat, "parallel": 4 this PR alone 60.3 60.2 60.2
RTX 2070 Super 8 GB IQ4_NL 1 chat, "parallel": 1 main 37.7 39.1 39.0
RTX 2070 Super 8 GB IQ4_NL 1 chat, "parallel": 1 this PR alone 38.1 38.2 38.3
RTX 2070 Super 8 GB IQ4_NL 2 chats, "parallel": 2 this PR alone 47.7 47.0 47.6
RTX 2070 Super 8 GB IQ4_NL 4 chats, "parallel": 4 this PR alone 51.0 50.2 50.3
RTX 2070 Super 8 GB IQ4_NL 1 chat, "parallel": 4 this PR alone 35.5 35.6 37.2

Per-chat rates at 8 chats on the 24 GB card: 13.0 to 15.8 tok/s. 8 GB card, 4 chats: 256 step recordings held in
56 MiB (224 KiB each), cap 484, none dropped.

Identity.

Check Card Result
One request, main vs this PR, --batch 0: tokens + top-5 of 48-64 steps; IQ4_NL and UD-Q2_K_XL, expert cache frozen, all experts on the CPU, --no-graphs, small-card args RTX 2080 Ti 11 GB, RTX 2070 8 GB all same
--check-batch 2, 3, 4, 6 slots; --check-stagger 2 and 4 slots, with and without graphs; small-card args without --tail-skip; UD-Q2_K_XL RTX 2080 Ti 11 GB, RTX 2070 8 GB every token the same as alone
--check-stagger 4 slots with a cap of 120 step recordings: 372 dropped, made again RTX 2070 8 GB every token the same as alone
--check-stagger 4 slots with every 3rd step recording failed on purpose: unrecorded runs (3,360) plus heavy re-recording, since each failure also drops the other step recordings RTX 2070 8 GB every token the same as alone
--check-batch 4 --tail-skip 4 both differs (expected, see Limits)

Related discussion

Split out of #200, as the maintainer asked there:
#200 (comment)

Independent of the other split PRs (based on main, not stacked).

Approach

  • step() takes Inkling 2's rows in one head (batch_heads()): the dense products, mixes, norms and router run once
    for all rows. What reads or writes a sequence's own state (K/V convolutions, cache stores, attention, the output
    convolutions) uses the one-token kernel code with each row's own slot, in one launch for all rows (_rows kernels).
  • Three bugs found by the first test runs, fixed here:
    • A step of one row was routed on the card for the doorbell, but step() never rang it, so moe_card() read an
      unfilled table ("illegal memory access"). step() now rings and answers the doorbell as run() does.
    • A token alone is routed on the card (expf), a step's rows on the host (std::exp), which can differ in the last
      bit. Where card_moe(1) routes a token alone on the card, the rows now take the card's picks too.
    • Step recordings are keyed by their rows' sequences, so they grew without end until cudaGraphInstantiate ran out
      of memory (4 chats on 8 GB). At most a fixed count is held now (512 on an 8 GB card, about 128 MiB; least
      recently used dropped first). A recording the card has no memory for drops the step recordings and tries again,
      and a step that still cannot be recorded runs unrecorded.
Commit by commit
  1. Two slots: step() walks the layers in next_layer() order, as run() does (other families: il + 1). New
    hook tail_by_rows() (default false, only Inkling 2 sets it). tail_key() includes the bound sequence.
  2. --check-stagger (test tool, every family): with --check-batch K, prompts and answers of different lengths,
    sequences that join between steps. Changes no engine path.
  3. Up to 16 slots in one launch each: ink_qkv_rows(), ink_attend_rows(), ink_conv_add_rows() call the
    one-token kernel bodies with a row per blockIdx.y and each row's own pointers.
  4. Setup and docs: "one_request": "mac", so --parallel N works on Linux/Windows; docs/BATCHING.md and
    docs/models/inkling.md.
  5. A step of one row rings the doorbell (bell_on() is false for other families and for more rows).
  6. The rows take the card's picks where a token alone does (route_card(), h_wts_; only with the doorbell).
  7. Step recordings bounded (superseded by 8).
  8. Step recordings held to a count (STRATA_POLY_STEP_GRAPHS; a line on every drop). cudaGraphExecDestroy()
    gives no memory back to cudaMemGetInfo(), so 7's byte budget did not hold. record() (run()'s and step()'s
    other recordings) drops the step recordings and retries on an out-of-memory too; only where step recordings
    exist. STRATA_POLY_STEP_RECORD_FAIL=N is a test hook for the unrecorded path.
  9. The rows take the card's picks only under all of card_moe(1)'s conditions (no --expert-gpu, the slot table,
    a layer at a time where L.card is not 0).
  10. --batch up to 15: 32 rows would reach the prompt batch's kernels. --check-stagger's shift is clamped.
  11. Setup warns when --parallel meets --tail-skip; the docs say so.
  12. A layer card_moe() has not tried yet counts as the card's only where its types have the card's pick kernels
    (as moe_card() would find).
  13. Setup's --tail-skip warning reads the finished config ("parallel" kept from the config before too), and
    is not given where the family answers one request at a time.

Validation

Passed:

  • CUDA 12.9 build, sm_75, at this branch's head (11dfb28). The GPU runs below are of f4bfc38; commits 12-13 change
    a rule no current file reaches (12) and setup's text (13).
  • cd terminal && ../.venv/bin/python -m unittest tools.test_setup_* (all 90 setup test modules) serve.test_parallel: 1,410 tests OK, 1 skipped, at 11dfb28.
  • One request vs main and --check-batch (identity table): strata-poly --tokens @ids302.txt --max-new 64 --top-probs 5 --cpu-share 0 --kv fp16 with STRATA_FREEZE_EXPERTS=1 (main vs PR), and --batch K --check-batch K [--check-stagger] (slots), RTX 2080 Ti 11 GB and RTX 2070 8 GB, sm_75 binaries. --batch 16 is refused.
  • Server throughput (table above): terminal/serve/server.py with "parallel" 1/2/4/8 and as many concurrent chats, 3 rounds after a warm-up request; Quadro RTX 6000 24 GB (Xeon Gold 6244) and RTX 2070 Super 8 GB.

Failed (first runs, fixed by commits 5-9 and passed above): --check-batch 4 and 6 differed after some tokens;
--check-stagger and the server at "parallel" 2 and 4 stopped with "illegal memory access"; 4 chats at
"parallel" 4 stopped with cudaGraphInstantiate: out of memory.

Not run:

  • compute-sanitizer memcheck: both runs of the 4-slot --check-stagger case timed out (3,000 s, then 1,800 s with a
    64-token prompt and 4 tokens): too slow under the sanitizer. A lighter one (2 slots, a few tokens) is to come.
  • HIP build: main's HIP build of inkling2.cu already fails (10 __ldcs / __ldcg errors in code this PR does not touch; fixed by [Engine] build Inkling 2's DSpark screen on HIP #206). engine.cpp with this PR builds for HIP; a full HIP build waits for [Engine] build Inkling 2's DSpark screen on HIP #206. No AMD run.
  • Metal (refuses --batch for this model); FP8 caches (Ampere+); cards other than sm_75.
  • A kernel test of the _rows kernels against the one-token launch, bit for bit; the end-to-end --check-batch covers them.

Limits

  • Not with --draft-model; not on Metal; up to 16 slots.
  • Bit identity of a slot with the same request alone is checked at 2 to 6 slots only. Steps of 9 rows or more take two
    lin() calls in place of lin_pair() (its multi-row kernel takes up to 8), not checked.
  • --tail-skip can make a chat's answer depend on the other chats writing at the same time (the skip is decided over
    all rows of a step); setup warns.
  • Each slot's window rings are allocated at load: about 320 MiB per extra slot at fp16 (40 window visits x K and V x
    2,048 rows x 2 KiB), plus 32 MiB of attention rows, even while the slot is idle. On an 8 GB card that is 922 -> 795
    -> 649 experts in VRAM at 1, 2 and 4 slots. Mapping them lazily is left for later.
  • An out-of-memory at a recording's first launch is not caught (an error, as before).
  • With [Engine] Inkling 2 Mini: --layer-split across cards, the loop on the faster card #227 (--layer-split on Inkling 2): both PRs edit the same need(opt_.layer_split.empty()) line. Whichever
    lands second should keep --batch and --layer-split apart on Inkling 2 until that pair is tested.

Credits: design ported from our own engine's batch slots (#200), onto VecSzn's engine and his step() machinery
(batch_heads(), rows_heads, next_layer()) and his doorbell. The fixes in commits 8-11 follow an independent
review.

🤖 Generated with Claude Code

okada-shogo and others added 4 commits November 23, 2026 04:41
Inkling 2 no longer refuses --batch: up to 2 sequences beside the first
(not with --draft-model, whose caches and block are one sequence's, and
not on Metal yet).  Its step() rows go through one head
(batch_heads()): the products, the depth mixes, the loop's messages,
the norms and the router run once for all rows, so a step reads the
dense weights once.  What reads or writes a sequence's state goes a row
at a time with the launches one token alone has (ink_qkv(), ink_attend()
sized by the row's own room, ink_conv_add()), each with its own
sequence's slot (run_slot(): seq_buf(), seq_state()) and its position
from at_.  The --loop-bf16 controllers' gates and the FFN controller
also go a row at a time with a token's launches, since their few-token
launches are other kernels.

Engine::step() now takes the layers in next_layer()'s order, as run()
does, so a looped core runs its passes in a step too.  A new hook,
tail_by_rows(), keeps step()'s rows through layer_tail() and records a
tail by its rows' sequences (Layer::rows_tails), for Inkling 2's
convolution of the experts' sum, whose state is a sequence's own; such a
step is not split into halves.  The other families do not set it: their
paths are unchanged.  Inkling 2's tail recordings in run() are kept a
sequence apiece (tail_key()), since Layer::tail is shared by the
sequences and holds the bound one's state; with one sequence the keys
are the ones before.

Class: same bits for one request (--batch 0 runs the launches it ran
before).  With slots, each row's per-sequence steps are a token's own
launches, so they give it the bits it gets alone; the shared products
take the few-token kernels main documents as giving each row its
single-row bits (lin()/mmvq, gemv_set(), the norms and mixes).

The batch-slot design follows our reference (fork branch inkling2-batch,
d525c9a) on VecSzn's Inkling 2 engine and his step() machinery
(batch_heads(), rows_heads, next_layer()).

Built for CUDA (sm_75).  HIP (inkling2.cpp and engine.cpp are in the HIP
build) and Metal not built here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With --check-batch K, sequence j's prompt is the first n >> 3 (K - 1 - j)
of the --tokens' n (16 at least), read when the others have taken
j * max_new / (2K) steps, and it writes max_new - j * max_new / K
tokens: prompts of different lengths (so rows of a step at different
positions and attention sizes), sequences that join between steps, and
steps of fewer rows as they leave.  Without it --check-batch is as
before.  A test of the engine's step() for every family; ported from
our reference branch (inkling2-batch, d525c9a).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Inkling 2 takes --batch up to the engine's 16 (kInkRows, 32, is the most
rows a launch takes).  The steps of step()'s rows that read or write a
sequence's state were a launch a row; they are now one launch for all
rows (the _rows kernels), each row with its own state and cache
pointers:
- ink_qkv_rows(): the K and V convolutions, the clips and the cache
  stores, a row a blockIdx.y.
- ink_attend_rows(): scores, softmax, values and join over each row's
  own caches.  The launch is sized for the largest room among the rows;
  each row's join adds only the value parts it has alone
  (InkAttnRows::parts, from its own room, or its position and itself
  when not recorded).  A row's scores and parts do not depend on the
  launch's size, so its bits are its own launch's.
- ink_conv_add_rows(): the attention's and the experts' output
  convolutions.
The kernels' bodies moved, unchanged, into __device__ functions that
the one-token launches and the _rows launches both call.  The rows
read their positions from at_, which step() writes every step.  Not on
Metal, which has no _rows kernels and refuses --batch for Inkling 2.
The loop controllers stay a row at a time with a token's launches.

Class: same bits.  One request runs the same kernel code; each slot's
row gets the bits its own launch gave it.

Built for CUDA (sm_75).  HIP (inkling2.cu is HIP-compiled) not built
here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Inkling 2 Mini's family is "one_request": "mac": setup.py no longer
writes "parallel": 1 for it, so --parallel N works on Linux and Windows
as for the other strata-poly families (written when asked, with
poly_parallel_note()).  setup_mac.py still writes 1 (the engine refuses
--batch for this model on Metal).  test_setup_inkling.py checks both.
docs/BATCHING.md lists the model; docs/models/inkling.md says requests
at once are opt-in on NVIDIA, not with the draft file, and one at a time
on a Mac.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
okada-shogo and others added 3 commits November 23, 2026 11:04
Engine::step() with one row (a batch slot alone in a step: the first
request of a server with "parallel" set, or --check-stagger's steps
before the others join and after they leave) routed it on the card,
since card_moe(1) says yes for the doorbell (bell_on(): Inkling 2 with
experts outside VRAM), but step() never set bell_.  moe_card() then took
the mirror's branch (far_plan(), far_pull()) with the far table that
card_moe() leaves unfilled when it counts on the doorbell, and read
expert pointers that are not there: "step: an illegal memory access was
encountered" (--check-batch 4 --check-stagger, --no-graphs too, and the
server's first request at parallel 2 and 4, which answered HTTP 400).
With --batch 0 step() is not used, so one request was not hit.

step() now sets bell_ = bell_on(R) as run() does, keys its whole
recording by it, and answers the rings with bell_serve(): after the
whole recording's launch, or layer by layer after the card's experts,
as run() does.  bell_on() is false for every family but Inkling 2
(bells()), and for R > 1: other families' steps, and Inkling 2's steps
of several rows, launch what they launched before.

Class: same bits.  A one-row step now takes the experts the way the same
token alone takes them (the doorbell, the card's picks).

The doorbell is VecSzn's (202c1ad, after Strata v0.2.19's Inkling
hybrid mode).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With the doorbell (bell_on(): Inkling 2 with experts outside VRAM) a
token alone is routed on the card: route_card(), whose sigmoid is the
card's expf.  A step of several rows went to moe(), which routed each
row on the host: route(), the same formula with the host's std::exp.
The two need not round alike in the last bit, so a row's expert weights
(and, at a near tie, an expert) could differ from the ones it got alone,
and greedy answers parted after some tokens: --check-batch 4 and 6 gave
"DIFF" (cb4-iq4 sequence 4 at token 20 of 64, cb6 3 sequences), and the
small-card arguments and UD-Q2_K_XL more often.  At 2 slots no token
happened to change.

Where a token alone routes on the card, step() now routes its rows there
too before the router's event (route_card() of R rows: a row a warp, a
row's bits its own), copies the picks and weights to pinned memory
(h_ids_, h_wts_, the latter only for bells() with --batch), and moe()
takes them in place of route() for those rows (step_ids_).  The rest of
moe() is as before.  Not with --cache-bias, whose host route() biases
the picks, and not on HIP or Metal (no doorbell there, so a token alone
routes on the host as the rows do).

Class: same bits as a token alone; one request (--batch 0) and the other
families do not reach the new code (h_wts_ is null for them).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
step() records Inkling 2's heads and tails (Layer::rows_heads,
rows_tails) and whole steps (step_passes_) by their rows' sequences and
rooms.  With slots that come and go, every new set of rows made new
recordings, and nothing dropped them: on the RTX 2070 Super, four chats
at "parallel" 4 with a 32K context filled the card until
cudaGraphInstantiate failed ("out of memory"), and the engine ended.

Where the tails take the rows (tail_by_rows(): Inkling 2), step() now
goes through step_replay():
- each recording's VRAM is what cudaMemGetInfo() lost across its
  cudaGraphInstantiate; together they are held to a budget, a 64th of
  the card from 64 to 256 MiB (128 on an 8 GB card), or
  STRATA_POLY_STEP_GRAPH_MIB.  Past it the recordings launched longest
  ago go (never the step's own), down to three quarters of it;
- an instantiation that fails for memory drops every other step
  recording and tries once more; failing still, the step's work runs
  unrecorded, and no step records for the next 256 steps;
- a line "step recordings: N held, X MiB (Y KiB each)" each time the
  count doubles from 256, for sizing the budget.

The other families' step() records and replays as before (the same
maps, record() and cudaGraphLaunch()).

Class: same bits.  A recording replays the launches it records, and an
unrecorded run makes the same launches with positions by value.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
okada-shogo and others added 6 commits November 23, 2026 13:16
…eem to take

The budget of 45be289 summed what cudaMemGetInfo() lost across each
step recording's instantiation and took the recordings' average off for
each one dropped.  But cudaGraphExecDestroy() gives the driver's memory
back to no cudaMemGetInfo(), and later recordings take the memory it
kept with no loss shown: in the review's replay of the algorithm (an
8 MiB budget, new keys, 20-kernel graphs on the RTX 2070 Super) the sum
stayed at 6 MiB while the card gave 128 MiB and more.  A fixed number
held stayed flat there (50 MiB after 10 cycles of drop and make).

- record_step() holds at most step_cap_ step recordings: 4 a MiB of a
  64th of the card, 256 to 1,024 (512 on an 8 GB card, about 128 MiB at
  the 220-250 KiB a recording measured), or STRATA_POLY_STEP_GRAPHS.
  Past it the ones launched longest ago go (never the step's own), down
  to three quarters.  The size line ("N held, X MiB, Y KiB each") is
  printed only before the first drop, where the sum is right.
- Every drop prints a line: how many, how many held, and the totals made,
  dropped and run unrecorded.
- record() (run()'s and step()'s other recordings) gives the same way on
  an instantiation out of memory: the step recordings are dropped (all
  of them from run(), all but the step's own from step()) and it tries
  once more.  It does so only where step recordings exist (Inkling 2
  with batch slots); every other family fails there as before.
- STRATA_POLY_STEP_RECORD_FAIL=N (tests): every Nth step recording fails
  as if out of memory, so that the unrecorded path runs.
- metal_invalidate_graphs() forgets the step recordings it destroys.

Not covered: an out-of-memory at a recording's first launch, which
ck() still turns into an error.

Class: same bits.

The findings are from the independent review of simplexai-labs#226.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0dd95b8 took the card's picks for a step's rows where bell_on(1)
holds.  card_moe(1), which decides how a token alone is routed, also
wants the card's slot table (d_slots_), room for a token's experts
(card_rows()), no --dump and no --expert-gpu (ecard_), and a layer it
found it cannot route on the card (L.card == 0) goes to the host.  With
--expert-gpu, say, a token alone was routed on the host while the rows
took the card's picks: the same last-bit mismatch the other way round.
The rows now take the card's picks under all of card_moe(1)'s
conditions, and a layer at a time only where L.card is not 0.

Class: same bits as a token alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
load_geometry() took --batch up to 31 (kInkRows - 1), but a step of 32
rows reaches kStageRows, where control3() and the products take the
prompt batch's kernels, the experts go through MMQ and none is routed on
the card: a row would not get the bits it gets alone, and nothing that
large was checked.  --batch 16 and more are now refused with "Inkling 2
takes up to 15 sequences beside the first (--batch 1 to 15)".

--check-stagger: the prompt of sequence j is n >> 3 (K - 1 - j), a shift
of 64 or more for K of 23 and more; the shift stops at 63.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…thers

Setup's small-card flags for Inkling 2 Mini include --tail-skip 4, and
the engine decides that skip over a step's rows, which are several chats'
tokens.  Setup now warns when --parallel 2 or more meets --tail-skip;
docs/BATCHING.md and docs/models/inkling.md say so, the slots' up to 16,
and what each slot's window rings take (about 320 MiB at fp16).
test_setup_inkling.py checks the warning, and that a card holding every
expert gets none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… its kernels

f8edaf3 gave a step's rows the card's picks on every layer whose
L.card is not 0, which includes -1: a layer card_moe() has not tried
yet (prompts of under 32 tokens, then a step of several rows).  Such a
layer would be routed on the host alone if its experts' types have no
card-pick kernel (native_mmvq_ids_supported()), where moe_card() sets
L.card to 0.  It now counts as the card's only where they have one.

The doorbell is set up only where every layer's types have those
kernels, so with today's files this cannot be hit; the test keeps the
rows' rule the same as moe_card()'s even so.

From the independent re-review of simplexai-labs#226.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
f4bfc38 warned only when --parallel was given on this run, so setup
run again without it kept "parallel": 4 from the config before and said
nothing.  The warning now reads the finished config (write_setup_config()'s
after_carry: "parallel" asked or kept, the person's own args), and is not
given for a family that answers one request at a time (on a Mac for
"one_request": "mac").  test_setup_inkling.py checks a second setup run
without --parallel.

From the independent re-review of simplexai-labs#226.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant