11# Cake Autoresearch
22
3- Autonomous optimization of inference throughput across models, backends, and kernels .
3+ Autonomous optimization of inference throughput across models, backends, kernels, and network .
44
55## Concept
66
@@ -17,15 +17,18 @@ autoresearch/
1717├── models/ # Model-specific optimization
1818│ ├── text-inference/ # Attention, MLP, cache, transformer blocks
1919│ ├── moe/ # Mixture-of-Experts routing and dispatch
20+ │ ├── tts/ # TTS: diffusion head, DDPM, VAE, vocoder, mel
2021│ └── image-generation/ # FLUX/Stable Diffusion components
2122├── backends/ # Backend-specific GPU/CPU optimization
2223│ ├── cuda/ # NVIDIA CUDA kernels (ops.cu, ops.rs)
2324│ ├── metal/ # Apple Metal shaders (ops.msl)
2425│ └── vulkan/ # Vulkan/wgpu compute shaders (ops.wgsl)
25- └── kernels/ # Kernel-specific fused operation optimization
26- ├── attention/ # Scaled dot-product attention
27- ├── fused-ops/ # silu_mul, rms_norm, add3, add_scaled, etc.
28- └── quantization/ # FP8 dequantization and weight preprocessing
26+ ├── kernels/ # Kernel-specific fused operation optimization
27+ │ ├── attention/ # Scaled dot-product attention
28+ │ ├── fused-ops/ # silu_mul, rms_norm, add3, add_scaled, etc.
29+ │ └── quantization/ # FP8 dequantization and weight preprocessing
30+ └── network/ # Distributed inference protocol
31+ └── protocol/ # Serialization, topology, auth, discovery
2932```
3033
3134Each task directory contains:
@@ -43,11 +46,24 @@ Generated at runtime (gitignored):
4346| ` baseline.txt ` | Baseline benchmark score from ` prepare.sh ` |
4447| ` experiments.tsv ` | Tab-separated experiment log |
4548
49+ ## Branching
50+
51+ Each task uses a ** fixed branch name** matching its directory path:
52+
53+ ``` bash
54+ git checkout -b autoresearch/backends/cuda # CUDA kernels
55+ git checkout -b autoresearch/models/tts # TTS models
56+ git checkout -b autoresearch/network/protocol # Network protocol
57+ # etc.
58+ ```
59+
60+ No date tags — one branch per task. Merge to main when done.
61+
4662## Quick Start
4763
4864``` bash
4965# 1. Pick a task
50- cd autoresearch/kernels/fused-ops
66+ cd autoresearch/network/protocol
5167
5268# 2. Run setup (builds, benchmarks baseline)
5369bash prepare.sh
@@ -81,31 +97,39 @@ bash prepare.sh
8197
8298### Models
8399
84- | Task | Target | Primary Metric | Benchmarks |
85- | ------| --------| ----------------| ------------|
86- | text-inference | Common text model components | Forward pass time | attention, mlp, blocks, cache |
87- | moe | MoE routing and expert dispatch | MoE forward time | moe, expert_provider |
88- | image-generation | FLUX/SD image pipeline | Component time | flux |
100+ | Task | Branch | Target | Benchmarks |
101+ | ------| --------| --------| ------------|
102+ | text-inference | ` autoresearch/models/text-inference ` | Attention, MLP, cache, blocks | attention, mlp, blocks, cache |
103+ | moe | ` autoresearch/models/moe ` | MoE routing and dispatch | moe, expert_provider |
104+ | tts | ` autoresearch/models/tts ` | Diffusion head, DDPM, VAE, vocoder | prediction_head, ddpm, connectors, mel, wav |
105+ | image-generation | ` autoresearch/models/image-generation ` | FLUX/SD pipeline | flux |
89106
90107### Backends
91108
92- | Task | Target | Hardware | Benchmarks |
109+ | Task | Branch | Hardware | Benchmarks |
93110| ------| --------| ----------| ------------|
94- | cuda | CUDA kernels (ops.cu) | NVIDIA GPU | fused ops (GPU path) |
95- | metal | Metal shaders (ops.msl) | Apple Silicon | fused ops (GPU path) |
96- | vulkan | WGSL compute shaders (ops.wgsl) | Vulkan 1.3+ GPU | vulkan benchmarks |
111+ | cuda | ` autoresearch/backends/cuda ` | NVIDIA GPU | fused ops (GPU path) |
112+ | metal | ` autoresearch/backends/metal ` | Apple Silicon | fused ops (GPU path) |
113+ | vulkan | ` autoresearch/backends/vulkan ` | Vulkan 1.3+ GPU | vulkan benchmarks |
97114
98115### Kernels
99116
100- | Task | Target | Primary Metric | Benchmarks |
101- | ------| --------| ----------------| ------------|
102- | attention | Attention implementations | Attention forward time | attention, linear_attn |
103- | fused-ops | Fused activation/norm ops | Per-op latency | bench_utils fused ops |
104- | quantization | FP8/GPTQ dequantization | Dequant throughput | quantization, flux dequant |
117+ | Task | Branch | Target | Benchmarks |
118+ | ------| --------| --------| ------------|
119+ | attention | ` autoresearch/kernels/attention ` | Attention implementations | attention, linear_attn |
120+ | fused-ops | ` autoresearch/kernels/fused-ops ` | Fused activation/norm ops | bench_utils fused ops |
121+ | quantization | ` autoresearch/kernels/quantization ` | FP8/GPTQ dequantization | quantization, flux dequant |
122+
123+ ### Network
124+
125+ | Task | Branch | Target | Benchmarks |
126+ | ------| --------| --------| ------------|
127+ | protocol | ` autoresearch/network/protocol ` | Serialization, topology, auth, discovery | protocol, serialization, discovery, topology, auth |
105128
106129## Prerequisites
107130
108131- Rust toolchain (stable)
109132- ` cargo bench ` support (divan benchmarks)
110133- For backend tasks: appropriate GPU + feature flags (cuda, metal, vulkan)
134+ - For TTS tasks: ` --features vibevoice,luxtts `
111135- No model downloads required — all benchmarks use synthetic tensors
0 commit comments