Foundry
Pure C machine learning framework
Everything Python ML frameworks do, rebuilt from scratch in C. Zero dependencies. Embeddable anywhere — from desktop apps to bare metal.
Why Foundry
ML frameworks shouldn't require a Python runtime, a package manager, or a cloud account.
The Problem
Modern ML tools are built on layers of Python abstractions. Training a model means installing PyTorch, CUDA toolkits, tokenizers, and dozens of transitive dependencies. Deploying means shipping a Python runtime or converting to a different format entirely.
None of this complexity is inherent to the math. It's an artifact of the tooling.
The Solution
Foundry implements the core building blocks of machine learning — tensors, quantization, tokenization, model loading, training, and inference — as embeddable C libraries. One compilation step, one binary, runs anywhere.
No interpreter. No virtual environment. No dependency hell.
What's Inside
11 modules covering the full ML pipeline.
Tensors
N-dimensional arrays with broadcasting, slicing, and full arithmetic.
Quantization
Q4, Q8, and F16 formats for compact model storage and fast inference.
Tokenization
BPE tokenizers compatible with major model families.
Model Loading
GGUF and safetensors format support for loading pretrained weights.
Training
AdamW optimizer, gradient computation, and LoRA adapter fine-tuning.
Inference
Text generation with sampling, temperature, and top-k/top-p control.
Audio
FFT, STFT, and mel spectrogram processing for speech models.
Image
Resize, normalize, and preprocess images for vision models.
Accelerators
CPU today. CUDA, Metal, and Vulkan backends planned.
Built for Embedding
Foundry powers our inference engines, our GPU multiplexer, and our IDE's local AI features. It's designed to be linked into other programs — not run as a standalone service.