nx_f32_qwen_encoder.nx
buildroot/runtime/nx_f32_qwen_encoder.nx
about
nx_f32_qwen_encoder.nx -- stack the sovereign Qwen layer into the FULL encoder forward.
sd-server -> Nishi migration: the text encoder is n_layers of nx_f32_qwen_layer applied in sequence
(Qwen3-4B = 36 layers). This drives that stack (ping-pong buffers). Output = the final hidden states =
the real prompt embeddings that feed the DiT (cap_embedder) AND, exposed as chat, the companion -- the
shared-LLM reuse, sovereign. This is the encoder analogue of nx_f32_rectflow_denoise (which stacks the
DiT block). Real use passes per-layer weights; this gate loops one weight set to prove the stack mechanism.
license_tier: ORIGINAL
dependencies 5 imports · 0 importers
imports: nx_syscalls.nxnx_f32.nxnx_f32_div.nxnx_f32_cvt.nxnx_f32_qwen_layer.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 14 | const K_MAGIC_1000000: i64 = 1000000 |
functions
| 16 | func nx_f32_qwen_encoder(x: *i64, n_tokens: i64, hidden: i64, n_q_heads: i64, n_kv_heads: i64, head_dim: i64, ffn_dim: i64, |
| 54 | func nx_f32_qwen_encoder_layers(x: *i64, n_tokens: i64, hidden: i64, n_q_heads: i64, n_kv_heads: i64, head_dim: i64, ffn_dim: i64, |
| 82 | func main() -> i64 |