For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Mojo module
varlen_causal_conv1d
Causal Conv1D with variable length sequence support (vLLM interface).
This module implements causal 1D convolution operations that support variable length sequences using cumulative sequence lengths (cu_seqlens), compatible with the vLLM inference interface.
Key Functions: - causal_conv1d_varlen_fwd_cpu: CPU forward pass for varlen sequences - causal_conv1d_varlen_fwd_gpu: GPU forward pass for varlen sequences
vLLM Interface: - x: (dim, cu_seq_len) for varlen - sequences concatenated left to right - query_start_loc: (batch + 1) int32 - cumulative sequence lengths - cache_indices: (batch) uint32 - indices into conv_states - has_initial_state: (batch) bool - whether to use initial state - conv_states: (..., dim, width - 1) - states updated in-place - activation: None or "silu" or "swish" - pad_slot_id: int - for identifying padded entries
comptime values
PAD_SLOT_ID
comptime PAD_SLOT_ID = Int32(-1)
Structs
-
VarlenConvIO: Owner of the forward-path DRAM reads/writes for varlen causal conv1d.
Functions
-
causal_conv1d_varlen_fwd_cpu: Forward pass for causal conv1d with variable length sequences. -
causal_conv1d_varlen_fwd_gpu: Launches the causal conv1d forward kernel with variable length sequences.