Skip to content

Shared Qwen PLE Table

Feature Introduction

The Shared Qwen PLE Table feature lets independent Qwen3.8-Flash-Next services read one immutable BF16 PLE table from a separate owner process. Each consumer keeps its own request state, TP/DP layout and KV cache, and materializes only the PLE rows selected by its tokens. The table owner holds one copy of the PLE table in host memory and serves consumers through MemFabric BM on A3 or HIXL on A2/A5.

The feature reduces the host-table capacity each consumer must reserve, avoids a private PLE host table per rank, and keeps one owner alive across model restarts. It is available in this vLLM-Ascend release and requires Model Runner V2.

Core Function Description
Shared immutable table One owner loads the BF16 PLE table; consumers attach through the existing shared Engram backends.
Selected-row fetch A consumer fetches only the PLE rows referenced by its current batch and copies them to HBM.
Transport reuse A3 uses MemFabric BM; A2/A5 use the existing HIXL reader.
Unchanged model execution TP/DP collectives, graph replay and KV transfer are unchanged; only PLE storage moves.

Working Principle

checkpoint ──► owner process ──► shared host PLE table
                                     │
                    ┌────────────────┴────────────────┐
                    │                                 │
             A3: MemFabric BM                  A2/A5: HIXL READ
                    │                                 │
                    └───────────────┬─────────────────┘
                                    ▼
                         consumer: selected BF16 rows
                                    │
                                    ▼
                         existing PLE lookup / graph
  1. The owner discovers the PLE layer, width and row count from the checkpoint configuration and safetensors index, then publishes the table.
  2. A consumer attaches once during model construction and records the owner generation and table identity.
  3. At each lookup, the consumer sends the selected row IDs. The owner packs those rows and returns them; no full table is copied to HBM.
  4. The consumer dequantizes or copies the packed rows into its local BF16 result and continues the existing TP/DP and graph path.

Usage Scenarios

Scenario Backend Transport
A3 supernode, BM host memory available a3 MemFabric BM
A2 device RoCE a2 HIXL RoCE
A5 device UB/URMA a5 HIXL UB

This feature applies to a single immutable BF16 PLE layer. It does not cover multiple PLE layers, mutable checkpoints, disk offload or multi-owner sharding in this Qwen integration.

Constraints and Limitations

Category Description
Hardware Atlas 800I A2, Atlas 800 A3 and Ascend 950 (A5). A5 requires device UB resources.
Engine vLLM-Ascend with Model Runner V2.
Model Qwen3.8-Flash-Next (Qwen4ExpForCausalLM / Qwen4ExpForConditionalGeneration) with one BF16 PLE layer.
Checkpoint Immutable checkpoint with BF16 PLE shards. The owner and every consumer must use the same checkpoint identity.
Parallelism HIXL requires ETP=TP and PCP=DCP=1. A3 consumers use their normal TP layout.
Unsupported features Dummy loading, sleep mode, disk offload, speculative decoding, DBO and elastic EP.
Network A trusted fabric reachable by the owner and every consumer. Control traffic is neither authenticated nor encrypted.
Recovery No transparent owner failover. A failed owner or retained lease requires stopping consumers before owner recovery.
Capacity HIXL consumers negotiate a receive buffer; it must cover the largest per-layer selected-row batch.

Feature Usage

Environment Preparation

  • Deploy the model with Model Runner V2 and a positive --shutdown-timeout.
  • Ensure the owner endpoint and the HIXL/BM transport endpoints are reachable from every prefill and decode worker.
  • Use the same immutable checkpoint path on the owner and all consumers.
  • For A2/A5, build or install the matching libengram_hixl.so; the legacy library without engram_hixl_create_v2 is not compatible.
  • For A5, generate the UB resource JSON for each device. A path containing {physical} is expanded with each process's physical device ID.

Usage Example

A3 MemFabric

Start the owner in a supervised process:

python -m vllm_ascend.shared_engram \
  --backend a3 \
  --model /path/to/checkpoint \
  --endpoint OWNER_HOST:29500 \
  --device 0

Wait until the owner prints POOL_READY. Start each consumer with:

vllm serve /path/to/checkpoint \
  --engram-config '{"cpu_offload":true}' \
  --additional-config '{"shared_engram":{"backend":"a3","endpoint":"OWNER_HOST:29500"}}' \
  --shutdown-timeout 120

Merge shared_engram into any existing --additional-config; keep the model's other fields.

A2 HIXL

python -m vllm_ascend.shared_engram \
  --backend a2 \
  --model /path/to/checkpoint \
  --endpoint OWNER_HOST:29500 \
  --engine-endpoint OWNER_HOST:29501 \
  --device 0 \
  --library-path /absolute/path/libengram_hixl.so \
  --listen-port 26666

Consumer:

vllm serve /path/to/checkpoint \
  --engram-config '{"cpu_offload":true}' \
  --additional-config '{"shared_engram":{"backend":"a2","endpoint":"OWNER_HOST:29500","capacity":131072,"library_path":"/absolute/path/libengram_hixl.so"}}' \
  --shutdown-timeout 120

A5 HIXL UB

python -m vllm_ascend.shared_engram \
  --backend a5 \
  --model /path/to/checkpoint \
  --endpoint OWNER_HOST:29500 \
  --engine-endpoint OWNER_HOST:29501 \
  --device 0 \
  --local-comm-res /tmp/ub-{physical}.json \
  --fabric ub

Consumer:

vllm serve /path/to/checkpoint \
  --engram-config '{"cpu_offload":true}' \
  --additional-config '{"shared_engram":{"backend":"a5","endpoint":"OWNER_HOST:29500","capacity":131072,"local_comm_res":"/tmp/ub-{physical}.json"}}' \
  --shutdown-timeout 120

listen_port and local_comm_res are mutually exclusive. Owner and consumers must use the same transport configuration.

Verifying the Feature

  1. The owner prints a JSON line with "stage": "POOL_READY" and the generation.
  2. Each consumer starts normally and its logs contain no PLE host storage line; the PLE parameter is external.
  3. A chat completion through the proxy returns normally, and every prefill/decode worker in the deployment remains healthy.
  4. Stop consumers before the owner. Normal shutdown returns the owner's active session count to zero.

Configuration Parameters

Owner

Parameter Description
--backend a3 (MemFabric BM), a2 (HIXL RoCE) or a5 (HIXL UB).
--model Immutable checkpoint directory.
--endpoint Owner control address reachable by every consumer.
--engine-endpoint HIXL engine address; required for A2/A5.
--device Owner NPU device index.
--store-url A3 MemFabric store URL; defaults to an available port on the endpoint host.
--shard-index, --shard-count A3 static owner sharding; consumers then pass endpoints in shard order.
--generation Shared generation for A3 sharded owners.
--library-path HIXL native library path.
--listen-port HIXL listen port; mutually exclusive with --local-comm-res.
--local-comm-res A5 UB resource JSON; supports {physical}.
--fabric HIXL fabric: roce (default) or ub.

Consumer

Field Description
shared_engram.backend Must match the owner: a3, a2 or a5.
shared_engram.endpoint / endpoints One owner address, or an ordered list for A3/A2/A5 sharding.
shared_engram.capacity HIXL selected-row capacity; must cover the largest layer batch per rank.
shared_engram.library_path HIXL native library path for A2/A5.
shared_engram.listen_port HIXL listener; mutually exclusive with local_comm_res.
shared_engram.local_comm_res A5 UB resource JSON.
engram_config.cpu_offload Must be true; enables host PLE storage.

Tuning Suggestions

For HIXL, set capacity from the maximum tokens in one lookup multiplied by the PLE heads handled by one rank, and keep it below 262144. The validated 4096-token A2 full-model configuration uses 131072; the default 65536 fails the capacity check in that topology.

The consumer registers one receive buffer per worker. A larger capacity increases host-pinned staging memory on the owner; size it for the real batch limit rather than the largest possible value.

FAQs

Shared PLE HIXL row capacity is insufficient

Increase shared_engram.capacity, or lower max_num_batched_tokens. The value must cover max_total_tokens × ngram_heads for the rank.

HIXL RegisterMem rc=503900

On A2, register the buffer with PYTORCH_NPU_ALLOC_CONF=expandable_segments:False and retry. Capacity 131072 is validated with this setting.

engram_hixl_create_v2 is missing

Use the rebuilt or image-provided libengram_hixl.so. The older NFS library exposes only engram_hixl_create and is not compatible with this consumer.

Consumers start but the model reports a missing PLE table

Confirm that the consumer and owner use the same checkpoint and generation, and that no consumer was started with dummy loading or sleep mode. Restart consumers cleanly before retrying the owner.