Ferrotensor

About

Ferrotensor trains, fine-tunes and runs language models on your own GPU. It is an open-source Rust framework with its own WGSL kernels, which run through Vulkan, Metal and DX12, on NVIDIA GPUs and Apple silicon.

Why it exists

Training tools seldom aim at a laptop, a consumer card or an integrated GPU, and the code between the Python API and the GPU is hard to read.

Ferrotensor takes another route. The same kernels run through Metal on a Mac and through Vulkan or DX12 on Windows and Linux, and cargo build is the whole toolchain. The tests check op gradients against finite differences on the CPU, GPU results against a CPU device, and the LoRA loss and gradients against PyTorch autograd, so a result on one GPU can be compared with a result on another.

What is measured so far

Every number on this site comes from a run with its commands, machine and commit written down. It has been tested on an NVIDIA A10G, an Apple M2 and software Vulkan in CI. There are no results from AMD or Intel GPUs, and none from DX12 on a real GPU. CI also runs the GPU tests through DX12 on WARP, a software adapter, and through Metal on a virtualised Apple GPU. Other GPUs are untested, and reports are welcome.

  • SmolLM2-1.7B fine-tuned with LoRA on one NVIDIA A10G (24 GB): 8,142 MiB of peak GPU memory in 0.7, and 5,313 MiB with --checkpoint-blocks.
  • Held-out loss within 0.004 of PyTorch + PEFT on the same A10G with the same recipe (the code in 0.7.1, 19 Nov 2026). A step is faster than in eager PyTorch and slower than in compiled PyTorch.
  • SmolLM2-135M fine-tuned with LoRA on an Apple M2 (8 GB) with a 0.4 build.

The full tables are in the LoRA walkthrough and the benchmarks. What it cannot do yet is listed under Not there yet on the home page.

Where it is going

The aim is training on more kinds of hardware: AMD and Intel cards, a browser tab through WebGPU, and edge boards such as NVIDIA Jetson, with the training data staying on the device. The roadmap lists the steps and which of them are measured.

Who writes it

Ferrotensor is written and maintained by Yashaswin Sharma Puranik, a computer science student at Woxsen University in Hyderabad, India. He designs and writes the kernels, the autograd, the LoRA trainer, the Python bindings and this site. The code is on GitHub and released on crates.io and PyPI.

Get in touch

Licence and citation

Ferrotensor is free to use under MIT or Apache-2.0, at your option. For research, the repository's CITATION.cff has the reference.