Back to directory

Meganeura

A portable Rust library for neural network training and inference that runs on Vulkan and Metal through blade-graphics instead of CUDA, compiling models to specialized WGSL shaders with automatic graph rewriting.

Meganeura

Meganeura trains and runs neural networks on the GPU without any CUDA dependency, using the blade-graphics library for Vulkan on Linux, Windows and Android and Metal on Apple platforms, with Mesa's Lavapipe providing a software Vulkan target for headless continuous integration. Defining a graph and calling a single build-session function handles automatic differentiation, graph rewriting through bounded equality saturation, WGSL shader specialization, Naga parsing and validation, and GPU dispatch.

At around 50,000 lines of Rust and WGSL, the project automatically composes shaders based on kernel archetypes such as pointwise, reduction, matmul, convolution and attention operations, and can produce a single self-contained binary of about 12 megabytes for deployment. The project describes its own performance as roughly half that of vendor-native machine learning stacks today, trading some raw speed for a uniform graph, autodiff, compiler and runtime stack that covers both training and inference across desktop and edge-class Vulkan and Metal devices; optional features add Hugging Face downloads, built-in models such as SmolLM2 and Whisper, and GGUF weight loading.

More in Models

See all 405
  • mini-AGI

    github.com

    A continual learning language model that trains from scratch on a single 8 GB VRAM GPU, assembling its own architecture and adapting its size to the hardware and data available rather than shipping as a fixed pretrained model.

  • An open-source contrastive-embedding pipeline that maps technical CVE vulnerability descriptions to formal cybersecurity compliance controls in NIST SP 800-53 and CMMC, published with its model generation, fine-tuning and evaluation code.

  • peekaboolean

    github.com

    A small vision-language model, fine-tuned with LoRA on a 500-million-parameter backbone, that answers typed multiple-choice, ordinal-score and yes/no questions about an image with calibrated probabilities, in about 400 milliseconds on a laptop.