Skip to main content

rlx_flow/
lib.rs

1// RLX — versatile ML compiler + runtime.
2// Copyright (C) 2026 Eugene Hauptmann, Nataliya Kosmyna.
3
4//! Block assembly-line API for RLX model builders.
5
6pub mod blocks;
7mod composite;
8mod context;
9mod dsl;
10pub mod escape;
11mod execution;
12mod extension;
13mod flow;
14mod layer;
15mod plugin;
16mod profile;
17mod recipe;
18mod side;
19mod stage;
20mod stage_contract;
21mod stage_interfaces;
22pub mod stream;
23mod value;
24mod weight;
25
26pub mod prelude;
27
28pub use blocks::RopeTablesStage;
29pub use blocks::{
30    BertEncoderLayerSpec, BertEncoderLayerStage, BertQkvStyle, ClsTokenPoolStage,
31    NomicEncoderLayerSpec, NomicEncoderLayerStage, Qwen3DecodeLayerSpec, Qwen3DecoderSpec,
32    Qwen3DecoderStage, VitSelfAttnSpec, dinov2_layer_fused, nomic_vision_layer_fused,
33};
34pub use composite::LayerComposition;
35pub use context::{DecodeBindings, FlowState, GdnInputSlots};
36pub use escape::Emit;
37pub use execution::{ExecutionPreset, ModelExecutionConfig};
38pub use extension::FlowExtensionPlan;
39pub use flow::{BuiltModel, ModelFlow};
40pub use layer::LayerStack;
41pub use plugin::{PluginStage, plugin, plugin_named};
42pub use profile::{
43    BackendOverrides, CompileProfile, CpuBackendProfile, FusionPolicyKind, FusionProfile,
44    FusionTargetKind, MetalBackendProfile, MixedPrecisionKind, PassProfile, PrecisionKind,
45    PrecisionProfile,
46};
47pub use recipe::ModelRecipe;
48pub use side::SideOutputs;
49pub use stage::FlowStage;
50pub use stage_contract::{BlockAsLayer, LayerStage, StageArtifacts};
51pub use stage_interfaces::{AttentionStage, FfnStage, KvCacheContract, NormStage};
52pub use stream::{
53    DualStreamStage, LoadStreamStage, StoreStreamStage, dual_stream_stage, id as stream_id,
54};
55pub use value::FlowValue;
56pub use weight::{MapWeights, WeightSource};