Experimental API reference#

Alpha APIs ship in the package and may change between releases. Their markers are generated from runtime metadata, not manually assigned website labels. Read experimental usage and lifecycle before enabling them.

SGLang alpha entrypoints#

Explicit alpha integrations; imports do not load SGLang or device libraries.

install_qwen35_nf4(*, mode: str = 'byte-pairs') → None[source]#

Experimental API (alpha)

Added in 0.1.0.dev0. Prepared Qwen3.5-0.8B NF4/BF16 fixture, SGLang 0.5.22, TP1, gfx90a only. API compatibility is not guaranteed. Review the documented validation limits.

Install NF4 admission, checked loading and optional prepared linear dispatch.

Call before constructing SGLang models in each worker. mode is stock, cached-scales or byte-pairs. LoRA remains BF16. This does not select a LoRA backend or install other fusion prototypes. Base weights are immutable during graph replay. Repeated identical installation is harmless; changing the mode in a live process is rejected. Prepared checkpoint receipts and all114 actual projections are checked before serving.

share_qwen35_gdn_storage(layer: Any, *, packed_weight: Any = None) → bool[source]#

Experimental API (alpha)

Added in 0.1.0.dev0. Immutable BF16 Qwen3.5-0.8B GDN parameters must be prepared before graphs. API compatibility is not guaranteed. Review the documented validation limits.

Make original parameters alias an existing packed [8224,1024] owner.

layer exposes in_proj_qkvz and in_proj_ba, optionally LoRA-wrapped. Pass the already loaded packed BF16 weight explicitly, or use the owner’s existing _lf_packed. This operation validates equality and preserves parameter objects/metadata. Returns whether a rebind occurred. It cannot validate whether a previously captured graph still references old storage: callers must invoke it before capture or publishing parameter views.

install_qwen35_gdn(*, packed_checkpoint: bool = False) → None[source]#

Experimental API (alpha)

Added in 0.1.0.dev0. BF16 Qwen3.5-0.8B GDN decode fusion, SGLang 0.5.22, TP1, gfx90a only. API compatibility is not guaranteed. Review the documented validation limits.

Fuse GDN base projections, retain individual LoRA updates and share storage.

Install before model construction in each worker. Decode with csgmv and BF16 [8192,1024]/[32,1024] base weights uses one packed projection, then each original Linear’s LoRA update. Prefill retains the original execution. This installs no consumer, tiny-rank or private benchmark hooks. Projection parameters are immutable after loading; TP, quantized bases and live reload are unsupported. Existing conflicting projection patches are rejected. Set packed_checkpoint=True only for the canonical 114-projection BF16 fixture; it installs the checked loader as well. Leave it false for the original checkpoint layout.

Exact NF4 tensor primitive#

dequantize_nf4(qweight, scales, code, shape: tuple[int, int], *, out=None)[source]#

Experimental API (alpha)

Added in 0.1.0.dev0. Validated on gfx90a with canonical NF4/block64 and BF16 output. API compatibility is not guaranteed. Review the documented validation limits.

Reconstruct exact BF16 weights from contiguous packed NF4 bytes.

qweight contains N*K/2 uint8 bytes (high nibble first), scales N*K/64 FP32 block scales, and code the canonical FP32 16-entry NF4 codebook. All tensors share a ROCm gfx90a device and are contiguous. Shape dimensions are positive multiples of64. Optional out is a nonaliasing contiguous BF16 [N,K] allocation on that device. Immutable inputs and metadata values are the caller’s responsibility during replay. The operation executes on the current PyTorch stream and has no BF16 cache. The marker is metadata-only and adds no per-call warning wrapper.

Stability annotations#

Dependency-free stability annotations for public experimental APIs.

exception ExperimentalAPIWarning[source]#

An explicitly enabled public API has no compatibility guarantee yet.

class ExperimentalInfo(reason: str, since: str, stability: str = 'alpha')[source]#

Stability metadata attached as __experimental_api__.

ExperimentalAPI(*, reason: str, since: str = '0.1.0.dev0', warn: bool = False) → Callable[[F], F][source]#

Document an alpha API, optionally warning once per function per process.

The default returns the original function/class unchanged, so numerical operations gain no call wrapper. warn=True wraps synchronous functions such as installation entrypoints, preserving introspection and emitting one warning per process. It is intentionally unsupported for classes and asynchronous/generator functions; those can use metadata-only annotation. This annotation states API stability, not numerical or hardware certification.