Skip to main content

vllm-ascend-a8w4-compact

Installer for the A8W4 MSD compact active-expert descriptor kernel patch for grouped_matmul_swiglu_quant_v2 in vLLM-Ascend's custom_transformer vendor. It removes the O(E) expert-list scans from the 4-bit MoE GEMM on Ascend 910B and is safe under TP2.

Tested with Qwen3.5-35B-A3B W4A8 (GDN-W8A8 variant), 2x910B3, TP2.

Why an installer

The compiled artifact is a partial vendor package that contains only grouped_matmul_swiglu_quant_v2. Putting it first on ASCEND_CUSTOM_OPP_PATH shadows the other custom ops (notably the GDN ops of W4A8-GDN models) and makes engine initialization fail. This package therefore:

  1. locates your full in-tree custom_transformer vendor,
  2. copies it to ~/.cache/vllm_ascend_a8w4_compact/custom_transformer,
  3. replaces only the grouped_matmul_swiglu_quant_v2 kernel directory (and its kernel config JSON) with the rebuilt one,
  4. keeps the in-tree liboptiling.so (the patch changes no host tiling).

The resulting directory is a full 43-op vendor package and is exactly where the a8w4_compact plugin looks by default.

Requirements

  • Ascend 910B3 (aarch64), CANN 9.1 runtime
  • vLLM-Ascend HUST tree with the a8w4_compact plugin (VLLM_ASCEND_A8W4_COMPACT support)
  • Qwen3.5-35B-A3B W4A8 model (the W4A8-GDN-W8A8 variant was benchmarked)

Install

pip install vllm-ascend-a8w4-compact
a8w4-compact check          # inspect platform, plugin and installation state
a8w4-compact install        # merge into the full in-tree vendor
a8w4-compact env            # print the environment variables

Then start vLLM in the environment that has:

export VLLM_ASCEND_A8W4_COMPACT=1
# only needed if you installed to a non-default --opp-dir:
# export VLLM_ASCEND_A8W4_COMPACT_OPP=<opp-dir>/custom_transformer

The plugin prepends the package to ASCEND_CUSTOM_OPP_PATH; verify with:

python -m vllm_ascend.plugins.a8w4_compact
# expect: active: True, note: using rebuilt vendor package at ...

Options

a8w4-compact install --vendor /path/to/vllm_ascend/_cann_ops_custom/vendors/custom_transformer
a8w4-compact install --opp-dir /custom/opp --force
a8w4-compact install --skip-platform-check   # not recommended

install refuses a vendor with fewer than 10 ops (a partial package) because it would shadow the other custom ops.

Evidence

This package ships the kernel, build/merge scripts, probes and reproduction tooling. Measured benchmark evidence is maintained in the organization's benchmark evidence repository rather than in this source repository; see that repository for the C1/C16 comparison and kernel-level timings. Reproduce it with scripts/benchmark_tp2_c1c16.sh and validation/probe_kernel.py (paths printed by a8w4-compact assets).

What is inside

a8w4-compact assets

prints a directory with:

  • kernel/op_kernel/ - the five patched headers,
  • patches/0004-a8w4-msd-tp2-safe-compact.patch - complete diff vs the stock vendor source,
  • patches/history/ - earlier experiments (phase-1 is TP2-unsafe; do not use),
  • docs/ - results, build/merge notes, phase-1 post-mortem,
  • scripts/ - build, merge, smoke and C1/C16 benchmark references,
  • validation/ - profiler probes and the bit-exact comparison.

The bundled bundles/a8w4_compact_910b_cann9.1.tar.gz is the prebuilt partial operator package (aarch64, CANN 9.1, 910B).

Uninstall

rm -rf ~/.cache/vllm_ascend_a8w4_compact
unset VLLM_ASCEND_A8W4_COMPACT VLLM_ASCEND_A8W4_COMPACT_OPP

Build from source

For a different CANN version or platform, apply patches/0004-a8w4-msd-tp2-safe-compact.patch to the vllm-ascend tree and build with scripts/build_partial.sh; then merge with scripts/merge_full_vendor.sh as described in docs/build-and-merge.md.

License

The installer code is Apache-2.0. The bundled kernel package and patched sources derive from the vLLM-Ascend custom_transformer vendor and retain their Huawei copyright and CANN Open Software License headers. See NOTICE.

Metadata

Release files for vllm-ascend-a8w4-compact 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vllm-ascend-a8w4-compact 0.1.0
File Size Uploaded Provenance Actions
vllm_ascend_a8w4_compact-0.1.0.tar.gz 951.8 kB With provenance Details for vllm_ascend_a8w4_compact-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for vllm-ascend-a8w4-compact 0.1.0
File Interpreter ABI Platform Actions
vllm_ascend_a8w4_compact-0.1.0-py3-none-any.whl Python 3 none any Details for vllm_ascend_a8w4_compact-0.1.0-py3-none-any.whl

Total release size: 1.9 MB

Release files / vllm_ascend_a8w4_compact-0.1.0.tar.gz

Download URL vllm_ascend_a8w4_compact-0.1.0.tar.gz
Size 951.8 kB
Tags Source
SHA-256 checksum
How to use checksums
51f8d73a5534e0f4b8c936f2204730550808a7e3842fa4531823a9993caa2559
BLAKE2b-256 checksum
How to use checksums
b98b7925fae26faa1d892869fdbf0268f421f04fa07596dd83dcbee9cb6be117
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

Release files / vllm_ascend_a8w4_compact-0.1.0-py3-none-any.whl

Download URL vllm_ascend_a8w4_compact-0.1.0-py3-none-any.whl
Size 968.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1f108ae9f76357a69a842fb7534d5200b524ff48e7aea6e57eb84e6651d0188e
BLAKE2b-256 checksum
How to use checksums
37245753872378235a43488ef850f065244838450349d93d4c2f35c039dd1600
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

Security for vllm-ascend-a8w4-compact 0.1.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for vllm_ascend_a8w4_compact-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page