Skip to content

Commit 7399ab7

Browse files
committed
style(gdn): the SM120 default's two blank lines, a wrapped condition, GB10 and B200 in the default-mode tests
The review's nits of the SM120 default: two blank lines before _decoder_config, the 130-character condition of default_fast wrapped, a comment on ACCELERATED_ARCHITECTURES and the SERVING.md line wrapped. The default-mode matrix also checks that sm121 (GB10) and sm100 (B200), where no gate ran, stay eager.
1 parent a8fcba2 commit 7399ab7

3 files changed

Lines changed: 12 additions & 7 deletions

File tree

‎basal/gdn_graph.py‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,10 @@
5151
# the decoders this forward implements: Qwen3.5 text models (dense MLP) of these layer kinds
5252
GDN_MODEL_TYPES = ("qwen3_5_text", "qwen3_5")
5353
GDN_LAYERS = {"linear_attention", "full_attention"}
54+
# the CUDA capabilities on which a Qwen3.5 model without --mode gets fast (with fla): where its gate passed
5455
ACCELERATED_ARCHITECTURES = {(9, 0), (12, 0)}
5556

57+
5658
def _decoder_config(model_dir, strict=False):
5759
"""config.json of a model directory, the decoder part (text_config of a multimodal wrapper); None if unreadable
5860
(strict: one that exists but cannot be read or parsed raises instead)."""
@@ -105,9 +107,11 @@ def refused(quant=None, state_cache_gb=0, prefix=False, batches="default", lean=
105107

106108

107109
def default_fast():
108-
"""Whether Qwen3.5 defaults to fast on an allowlisted CUDA capability with importable fla.
109-
Checked on H100 (sm90) and RTX 5060 Ti (sm120); other capabilities default to eager."""
110-
return (torch.cuda.is_available() and torch.cuda.get_device_capability() in ACCELERATED_ARCHITECTURES and fla_rule() is not None)
110+
"""Whether a Qwen3.5 model gets --mode fast without --mode: on a capability of ACCELERATED_ARCHITECTURES with fla
111+
importable. Checked on H100 (sm90) and RTX 5060 Ti (sm120); other capabilities (sm121, GB10, among them) get
112+
eager."""
113+
return (torch.cuda.is_available() and torch.cuda.get_device_capability() in ACCELERATED_ARCHITECTURES
114+
and fla_rule() is not None)
111115

112116

113117
def _rms(x, w, eps):

‎docs/SERVING.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ benchmarking a GPU.
3333
(2.3.2 refused them): the graph engine keeps each request state's recurrent state beside its keys and values and
3434
continues every question from it (one row per question and option order in the branch pass), with fla
3535
(flash-linear-attention) for the Gated DeltaNet layers. Without `--mode` they run `fast` on sm90 and sm120 when
36-
fla is importable, `eager` elsewhere (checked on H100 and
37-
[RTX 5060 Ti](HARDWARE.md#basal-omni-pico-on-rtx-5060-ti-sm120-native-windows)). fla picks each kernel's launch config by
38-
timing, and a different pick rounds differently: on the H100 80 GB and the RTX PRO 6000 Blackwell `fast` and
36+
fla is importable, `eager` elsewhere (checked on the H100 and the
37+
[RTX 5060 Ti](HARDWARE.md#basal-omni-pico-on-rtx-5060-ti-sm120-native-windows)). fla picks each kernel's launch
38+
config by timing, and a different pick rounds differently: on the H100 80 GB and the RTX PRO 6000 Blackwell `fast` and
3939
`eager` take configs recorded on that GPU instead (the ready line says `fla configs pinned`), so every start gives
4040
the same answers. On another GPU the first start times them (`fla configs timed`) and keeps its picks in
4141
`~/.cache/basal/fla/`; later starts take those (`fla configs kept`) and answer as the first start did, while a start

‎tests/test_recurrent.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,8 @@ def resolve(name, revision=None, metadata_only=False):
188188

189189

190190
@pytest.mark.parametrize("cc, fla, mode", [((9, 0), True, "fast"), ((9, 0), False, "eager"), ((8, 0), True, "eager"),
191-
((12, 0), True, "fast"), ((12, 0), False, "eager")])
191+
((12, 0), True, "fast"), ((12, 0), False, "eager"),
192+
((12, 1), True, "eager"), ((10, 0), True, "eager")]) # GB10, B200: not gated
192193
def test_default_mode_of_qwen35_on_cuda(monkeypatch, qwen35, cc, fla, mode):
193194
"""Without --mode: choose fast only for an allowed CUDA capability with importable fla."""
194195
monkeypatch.setattr(server_module, "resolve", lambda name, revision=None, metadata_only=False: name)

0 commit comments

Comments
 (0)