Repository navigation
perf(gdn): use fast mode by default for Qwen3.5 on SM120 GPUs - #114
marcinbrzezanski wants to merge 2 commits into
Conversation
Reviewer's GuideThis PR changes Qwen3.5’s implicit mode selection to use the Fast backend on allowlisted SM90 and SM120 GPUs when FLA is importable, adds regression tests for the selection matrix, and documents the native Windows SM120 setup, validation, and performance results. Sequence diagram for default Qwen3.5 serving modesequenceDiagram
participant User
participant Server
participant GDN as gdn_graph
participant GPU
participant FLA
User->>Server: start without --mode
Server->>GDN: default_fast()
GDN->>GPU: is_available()
GPU-->>GDN: SM90 or SM120
GDN->>FLA: fla_rule()
FLA-->>GDN: importable
GDN-->>Server: true
Server-->>User: select fast
User->>Server: send Qwen3.5 request
Server-->>User: successful response
Flow diagram for automatic Qwen3.5 backend selectionflowchart TD
A[Qwen3.5 recurrent model] --> B{CUDA available}
B -->|No| E[eager]
B -->|Yes| C{SM90 or SM120}
C -->|No| E
C -->|Yes| D{FLA importable}
D -->|No| E
D -->|Yes| F[fast]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="basal/gdn_graph.py" line_range="105" />
<code_context>
- return (torch.cuda.is_available() and torch.cuda.get_device_capability()[0] == 9 and fla_rule() is not None)
+ """Whether Qwen3.5 defaults to fast on an allowlisted CUDA capability with importable fla.
+ Checked on H100 (sm90) and RTX 5060 Ti (sm120); other capabilities default to eager."""
+ return (torch.cuda.is_available() and torch.cuda.get_device_capability() in ACCELERATED_ARCHITECTURES and fla_rule() is not None)
</code_context>
<issue_to_address>
**Explicit CPU selection is ignored**
When the caller omits `--mode`, selects `--device cpu`, and runs on SM90 or SM120 with FLA importable, `main()` does not pass `a.device` to `default_mode()`, so this returns `fast` on an allowlisted GPU even when the caller selected `--device cpu`. `Server` then constructs the graph backend without that device override, and the model uses CUDA instead of CPU; startup can fail or use a GPU the caller intended to avoid.
Account for an explicit device override when choosing the default mode, or preserve the requested device when selecting the fast backend.
</issue_to_address>|
Thank you, Marcin! This PR shipped in basal 2.8.0 with your authorship: basal-omni-pico started without Your commits, with ours on top (style, GB10 and B200 in the default-mode tests, and a release note that names the answers that move):
Closing as merged into 2.8.0. |
Qwen3.5 models currently default to
eageron SM120, despite the working Fast backend. This change enables automaticfastselection when FLA is importable, alongside the existing SM90 support.Validation on an RTX 5060 Ti 16 GB under native Windows confirmed that Fast starts with compilation enabled, serves requests successfully, passes the synthetic agreement gate, and delivers substantial throughput improvements over Eager.
Performance:
eager,fast-nocompile, andfast: 27 runs, all with zero request errors.fast-nocompileacross all three workloads.Correctness and integration:
eager-fp32: gate passed over 420 readouts, with 99.52% top-1 agreement. Both disagreements were near ties.tests/test_recurrent.py: 67 passed, 3 skipped.--modeselectedfast;/v1/modelsconfirmed the mode and a control request succeeded.The change adds SM120 to the CUDA capability allowlist, tests selection with and without FLA, and documents the Windows environment and benchmark results.
Benchmark provenance:
8e80d3eba0fd0bff8195e39c928ceac9194c8b82(2.5.3).Remek/basal-omni-pico, revision923233bee50579e8d1a22419f14b5cacceb6e38e.eager,fast-nocompile,fast, with--batches default.--n-seq 20 --n-conc 80 --concurrency 4 --seed 0.--synthetic,--questions-per-request): (512, 1), (512, 5), (1500, 5).Summary by Sourcery
Enable automatic Fast mode for Qwen3.5 on validated SM90 and SM120 GPUs when FLA is importable.
New Features:
faston SM120 GPUs when FLA is available, alongside SM90 support.Enhancements:
Documentation:
Tests: