Skip to content

Latest commit

 

History

History
46 lines (38 loc) · 2.78 KB

README.md

File metadata and controls

46 lines (38 loc) · 2.78 KB

Framework guides

Start with the job you need to implement. Public headers define the exact API; these guides explain integration, ownership and numerical contracts.

Job Guide Main components
Register a model and load weights Model loading Spec-backed model, TensorSource, BackendWeightStore
Prepare, cache and release graphs Graph lifecycle ExecutionContext, PreparedGraph, GraphWorkspace, ConstantTensorCache
Compose neural blocks Neural modules Attention, FFN, convolution, transformer blocks
Execute a causal transformer Causal decoder CausalDecoderRuntime
Execute a DiT or iterative sampler DiT and sampling DitRuntime, DeviceDenoiserRuntime, FlowSamplerRuntime
Execute routed experts MoE engine MoeEngine, MoePreparedGraph, placement/eviction policies
Assemble streaming audio Streaming audio StreamingAudioController, session bases, chunkers
Prepare waveform features Audio frontends Mel frontends, resampling, reference preprocessing
Process images/video or reuse portrait architecture Vision Media helpers, graph modules, vision runtimes
Select component execution implementations Execution plans ComponentExecSpec, parse_exec_plan
Select a model variant/task implementation Internal routing ModelRouteTable
Reuse an encoder, conditioner or codec runtime Reusable runtimes T5, Qwen audio, RoPE encoder, CLAP, Vocos, Mimi
Resample, chunk, merge or retain cached objects Shared helpers SOXR/sinc, text/audio chunkers, overlap-add, CacheSlots
Persist reusable bytes Disk cache DiskCache

Guide format

Every component guide follows the same sections:

  1. Purpose and boundary
  2. Public API
  3. Integration example
  4. Ownership and lifecycle
  5. Data and mathematical contracts
  6. Configuration and backends
  7. Errors and limitations
  8. Callers and validation

Examples are small integration functions with explicit external inputs, not standalone model implementations. They demonstrate API use; source links and linked tests provide the implementation and validation context. A guide does not claim a model/backend combination passed merely because a shared API exists.

Adding documentation

Document important reused components here rather than listing every module. Keep API details beside public declarations; use this template to explain how components work together. Link to real callers and independent tests. Preserve model-specific preprocessing, state and precision boundaries in the model guide.