AodhML The language for intelligent systems
A programming language purpose-built for AI/ML development. Native tensor types, first-class model abstractions, and a type system that understands the shape of your data.
import "std:tensor"
import "std:io"
// Define a model architecture
type Linear = struct {
weights: Tensor<f32>,
bias: Tensor<f32>,
}
fn forward(x: Tensor<f32>, layer: Linear) -> Tensor<f32> {
return matmul(x, layer.weights) + layer.bias
}
fn main() {
let input = Tensor::zeros([1, 784])
let layer = Linear {
weights: Tensor::randn([784, 256]),
bias: Tensor::zeros([256]),
}
let output = forward(input, layer)
println("Output shape: ", output.shape())
}
Built for the age of intelligence
Native Tensors
Tensor types are first-class citizens, not library imports. Shape-checked at compile time, optimized at runtime.
Shape-Safe Types
The type system tracks tensor dimensions. Catch shape mismatches before you run a single epoch.
Zero-Cost Abstractions
High-level model definitions compile down to efficient IR. No Python overhead, no GIL battles.
Gradients as First-Class
Automatic differentiation is built into the language semantics, not bolted on as an afterthought.
Device-Agnostic
Write once, run on CPU, GPU, or TPU. Device placement is explicit but not painful.
Self-Documenting
Types tell the story. The compiler generates documentation from your code, not comments.
Get AodhML running in seconds
curl -fsSL https://aodhml.dev/install.sh | bash
aodh --version
curl -fsSL https://aodhml.dev/install.sh | bash
# Or using your package manager:
# apt install aodhml # Debian/Ubuntu
# pacman -S aodhml # Arch
# dnf install aodhml # Fedora
irm https://aodhml.dev/install.ps1 | iex
aodh --version
git clone https://github.com/aodhml/aodhml.git
cd aodhml
make build
sudo make install
Your first AodhML program
Initialize a project
aodh init my-project
cd my-project
Write some code
fn main() {
let greeting = "Hello, AodhML!"
println(greeting)
let tensor = Tensor::from([[1.0, 2.0], [3.0, 4.0]])
println("Shape: ", tensor.shape())
}
Run it
$ aodh run src/main.aodh
Hello, AodhML!
Shape: [2, 2]
See AodhML in action
Tensor Broadcasting
Element-wise operations with automatic broadcasting across dimensions.
Neural Network Layer
Define a custom layer with shape-safe parameter initialization.
Training Loop
A minimal training loop with gradient descent and loss tracking.
Shape-Safe Inference
The compiler catches tensor shape mismatches at compile time.
Designed for clarity
type Point = struct {
x: f64,
y: f64,
}
fn distance(a: Point, b: Point) -> f64 {
let dx = b.x - a.x
let dy = b.y - a.y
return sqrt(dx*dx + dy*dy)
}
Structs & Types
Named struct types with field access. Immutable by default, explicit when mutable.
fn process(data: Tensor<f32>)
-> Result<Tensor<f32>, Error> {
let normalized = normalize(data)?
let filtered = filter(normalized)?
return Ok(filtered)
}
Error Handling
Explicit Result types with the ? propagation operator. No hidden exceptions.
fn train<T: Differentiable>(
model: T,
data: Dataset<f32>,
epochs: u32,
) -> T {
for epoch in 0..epochs {
let loss = model.step(data)
println("Epoch ", epoch, ": loss=", loss)
}
return model
}
Generics & Traits
Parametric polymorphism with trait bounds. Train any model that implements Differentiable.
Try AodhML in your browser
Click "Run" to execute your code
Browser execution backend is pending — this is a UI previewWhere we're headed
Foundation
- Lexer & Parser
- Basic type system
- Scalar types & arrays
- Functions & control flow
- CLI toolchain
Tensor Core
- Tensor type implementation
- Basic tensor operations
- Shape inference
- CPU backend
Model Layer
- Model type abstractions
- Layer definitions
- Parameter management
- Serialization
Autodiff
- Automatic differentiation
- Gradient computation
- Optimizer primitives
- Loss functions
GPU & Beyond
- GPU execution backend
- CUDA/ROCm support
- Distributed training
- Quantization