Skip to main content

Crate rlx_flow

Crate rlx_flow 

Source
Expand description

Block assembly-line API for RLX model builders.

Re-exports§

pub use blocks::RopeTablesStage;
pub use blocks::BertEncoderLayerSpec;
pub use blocks::BertEncoderLayerStage;
pub use blocks::BertQkvStyle;
pub use blocks::ClsTokenPoolStage;
pub use blocks::NomicEncoderLayerSpec;
pub use blocks::NomicEncoderLayerStage;
pub use blocks::Qwen3DecodeLayerSpec;
pub use blocks::Qwen3DecoderSpec;
pub use blocks::Qwen3DecoderStage;
pub use blocks::VitSelfAttnSpec;
pub use blocks::dinov2_layer_fused;
pub use blocks::nomic_vision_layer_fused;
pub use escape::Emit;
pub use stream::DualStreamStage;
pub use stream::LoadStreamStage;
pub use stream::StoreStreamStage;
pub use stream::dual_stream_stage;
pub use stream::id as stream_id;

Modules§

blocks
escape
Tier-2 escape hatch — custom HIR emission when blocks are not enough yet.
prelude
Common imports for model flow authors.
stream
Named tensor streams — dual-/multi-stream models without IR in recipes.

Structs§

BackendOverrides
Per-backend hint table (env-style toggles without touching IR).
BlockAsLayer
Bridge existing [BlockStage] impls to LayerStage with hidden-only artifacts.
BuiltModel
Result of assembling a model flow.
CompileProfile
Tier-1 compile configuration. Load from *.rlx.toml or use Rust presets.
CpuBackendProfile
DecodeBindings
KV-cache decode inputs bound by crate::blocks::BindDecodeInputsStage.
FlowExtensionPlan
Names of HIR extensions to apply when building this flow (empty = all registered).
FlowState
Cross-stage shared handles (RoPE tables, zero-beta, tied embed, …).
FlowValue
Output of a block stage. Model authors see shape + opaque id only.
FusionProfile
GdnInputSlots
Handles for a [Op::GatedDeltaNet] / carry scan.
GgufPackedLinear
One packed linear weight: quantized bytes + bias.
GgufPackedParams
Compatibility shim: packed GGUF matmul weights (used by some model loaders).
KvCacheContract
KV cache tensor shapes exposed by attention blocks (associated type stand-in).
LayerStack
Stack transformer sub-blocks into one named layer stage.
MapWeights
In-memory weight map for tests and tooling.
MetalBackendProfile
ModelExecutionConfig
Shader-component-style bundle: one object for specialize + compile + cache.
ModelFlow
Block assembly-line builder — tier-0 model author surface.
PassProfile
PluginStage
Named plugin stage (alias over tier-2 custom emission).
PrecisionProfile
SideOutputs
Collects extra graph outputs emitted by side-effect stages (e.g. KV taps).
StageArtifacts
Outputs a layer stage may publish beyond the main hidden tensor.

Enums§

ExecutionPreset
Named compile presets (fusion policy, precision, pass toggles).
FlowStage
One stage in a model flow. Model authors compose these — not HIR ops.
FusionPolicyKind
FusionTargetKind
LayerComposition
Static description of a layer stack for cache keys and recipes.
MixedPrecisionKind
PrecisionKind

Traits§

AttentionStage
Attention block interface: hidden in, hidden out, plus cache contract.
FfnStage
FFN block interface (SwiGLU / MLP).
LayerStage
Layer block with an explicit artifact contract (for new blocks and plugins).
ModelRecipe
Assemble a ModelFlow from config — use for arch-specific presets (LLaMA, Qwen, FLUX, …).
NormStage
Normalization block interface.
WeightSource
Abstract weight source for block emission. Keeps rlx-flow independent of safetensors / GGUF file formats.

Functions§

plugin
plugin_named