Skip to main content

Module qwen

Module qwen 

Expand description

Caller-buffered Qwen vector and Hyper-Connection arithmetic.

Modules§

hyper_connection
Qwen4Exp four-stream Hyper-Connection vector operations.
numerics
Small caller-buffered numerical kernels used by the Qwen4Exp decoder.
ple
Trained PLE n-gram row selection over caller-owned history and output. No table I/O, layer admission, residual arithmetic or full model execution. Kernel operations and the borrowed view allocate nothing. A custom projection trait implementation is external code and must be qualified separately.

Enums§

QwenNumericError

Functions§

add_assign
Add update into state in place, avoiding a temporary residual vector.
add_into
Copy a supplied vector into an output buffer and add a second vector. This is useful where the decoder must preserve a pre-norm residual separately.
group_rms_norm_in_place
In-place variant for a transient stream buffer whose unnormalized values are not needed by the caller after the operation. Same pre-folded gamma semantics as group_rms_norm_into.
group_rms_norm_into
Normalize each Hyper-Connection stream independently with RMSNorm. The GGUF converter pre-folds the zero-centered (1 + weight) scale into the stored gamma, so the checkpoint bytes multiply directly — callers must not add a further bias (llama.cpp build_hc_mix).
inject_stream_update
Add a block update into each Hyper stream. inject_gate is the sigmoid output of the streamed HC inject projection; Qwen scales it by two.
mix_streams_into
Form the token-mixer or MoE input from the gated average of Hyper streams. mix_gate is the sigmoid output of the streamed HC up-projection.
rms_norm_into
Apply Qwen RMSNorm with a separately stored scale vector.