BetterScale
Less host waiting. More device execution.
BetterScale is a modular execution-optimization package for vLLM Ascend. It adds supported FULL graph paths, ordered replay, and device-side progress and metadata preparation for DeepSeek V4 Flash. One native Worker entry composes the patches; it does not replace the serving engine or configure your environment.
Measured results and mechanisms
Install
Use your existing, working Ascend serving environment, with Python 3.12+:
python -m pip install --no-deps vllm-betterscale==0.3.1
The package deliberately does not install or upgrade vLLM, vLLM-Ascend, torch-npu, CANN, model weights, or kernels. Install those through your normal Ascend deployment.
This release is pinned to vLLM 0.25.1, vLLM-Ascend 0.25.1rc1, and torch-npu 2.10.0.post2. The measured environment uses CANN 9.0.1 and eight Ascend 910B2 cards connected with HCCS. Worker initialization verifies both versions and selected upstream source files; a different build may be rejected even if its version string matches. Do not disable those checks to force an unqualified runtime.
If you previously installed the private strengthen-dsv4 distribution, stop your
service and uninstall that distribution before installing this one. The new package
retains its implementation namespace, so the two distributions must not be installed
together. The old Worker import remains an alias-compatible entry.
Start
Keep your native serving arguments and add:
--worker-cls betterscale.worker.Worker
This release supports two bounded, single-node configurations—not arbitrary models,
shapes or parallel layouts. The examples below use local model weights at
/models/DeepSeek-V4-Flash; replace that path with your Ascend W8A8 checkpoint.
CANN/HCCL and device visibility remain your existing environment's responsibility.
The loopback binding is deliberate; use your normal authentication, TLS and access
controls before exposing the service outside the host.
TP8 + EP, DSpark K5
Four active requests; token budget 4128; context up to 15104. DSACP is enabled, DCP/PCP remain 1, and prefix caching is disabled.
vllm serve /models/DeepSeek-V4-Flash \
--worker-cls betterscale.worker.Worker \
--tensor-parallel-size 8 --enable-expert-parallel \
--quantization ascend --dtype bfloat16 \
--max-num-seqs 4 --max-num-batched-tokens 4128 --max-model-len 15104 \
--kv-cache-memory-bytes 12884901888 --no-enable-prefix-caching \
--speculative-config '{"method":"dspark","num_speculative_tokens":5,"enforce_eager":true}' \
--compilation-config '{"cudagraph_mode":"FULL","cudagraph_capture_sizes":[24,4128],"max_cudagraph_capture_size":4128}' \
--additional-config '{"enable_dsa_cp":true,"multistream_overlap_shared_expert":true,"ascend_compilation_config":{"enable_npugraph_ex":true,"enable_static_kernel":false}}' \
--host 127.0.0.1 --port 8000 --served-model-name dsv4
TP1 / DP8 / EP8, DSpark K5
Two active requests per rank (16 total); local token budget 1026; context up to 16384. DSACP is disabled; target is FULL and draft remains native eager.
vllm serve /models/DeepSeek-V4-Flash \
--worker-cls betterscale.worker.Worker \
--tensor-parallel-size 1 --data-parallel-size 8 --enable-expert-parallel \
--quantization ascend --dtype bfloat16 \
--max-num-seqs 2 --max-num-batched-tokens 1026 --max-model-len 16384 \
--kv-cache-memory-bytes 8589934592 --no-enable-prefix-caching \
--speculative-config '{"method":"dspark","num_speculative_tokens":5,"enforce_eager":true}' \
--compilation-config '{"cudagraph_mode":"FULL","cudagraph_capture_sizes":[6,12,132,264,516,1026],"max_cudagraph_capture_size":1026}' \
--additional-config '{"enable_dsa_cp":false,"multistream_overlap_shared_expert":true,"ascend_compilation_config":{"enable_npugraph_ex":true,"enable_static_kernel":false}}' \
--host 127.0.0.1 --port 8000 --served-model-name dsv4
The 12 GiB / 8 GiB KV budgets above are tested examples, not memory reserved by the package. Use your native KV budget appropriate to the workload and available HBM. In 0.3.1, DP prepares its finite producer/metadata graph catalog before READY: 4 producer banks and 6 metadata entries per rank for the two-seat K5 configuration. Unknown runtime metadata shapes fall back to native preparation instead of capturing online. This changes startup preparation, not the model or KV contents. TP retains its existing path, including first-use capture of some draft shapes.
Verify and roll back
Check for the per-worker strengthen-dsv4 rank=... READY patches=... log entry and
the native health endpoint after model startup:
curl --fail http://127.0.0.1:8000/health
To roll back, stop the service and restart with your known-working native Worker configuration. Do not hot-unpatch a live process. Some pinned K5/TP8 combinations need BetterScale's alignment repair, so removing the Worker from exactly the same command is not guaranteed to produce a runnable unpatched comparator.
Results and scope
Matched K5 cycles improve by 20–21% in the TP draft-graph study, with a separate 10–12% incremental receipt-handling improvement. DP device preparation improves matched cycle time by 15.4–15.9% against dual graph endpoints. Those are different controlled studies, not additive percentages or stable whole-service throughput claims. The retained OpenCompass LongBench English retrieval subset passes 32/32; this is not the full OpenCompass suite. See the linked case study for all repeats, configurations and boundaries.
The distribution contains Python source and upstream compatibility pins, not model weights, datasets, CANN or donor binaries. It adapts Apache-2.0 upstream execution paths; third-party notices and the license are included. Source is available in the package and the public development repository.
Metadata
Release files for vllm-betterscale 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vllm_betterscale-0.3.1.tar.gz | 69.5 kB | Without provenance | Details for vllm_betterscale-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vllm_betterscale-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for vllm_betterscale-0.3.1-py3-none-any.whl |
Total release size: 147.4 kB
Release files / vllm_betterscale-0.3.1.tar.gz
| Download URL | vllm_betterscale-0.3.1.tar.gz |
|---|---|
| Size | 69.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6c2ff7a941f4ec8f21bb7e66724ddeb2ee8e45d248dd168d1c2d711461840c33
|
|
BLAKE2b-256 checksum How to use checksums |
5ccdff488db3eaaa0e1e1c82d8a2a543affa9e978d573ecf12d271a5428e3b96
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Release files / vllm_betterscale-0.3.1-py3-none-any.whl
| Download URL | vllm_betterscale-0.3.1-py3-none-any.whl |
|---|---|
| Size | 77.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dbd4a6178e1fd8cfe2f251d5a4122924127fca8a339f0d3943daae0504d80229
|
|
BLAKE2b-256 checksum How to use checksums |
87258160a51a7dd55a8df0806cd78e043efc83b07089c4a3746ead7a1ed15d40
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Security for vllm-betterscale 0.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.