Apsi 2.6.0 (Improved version): faster than PyTorch on the same card, a fixed setup, and more
Hi everyone! 👋
This is an updated build of Apsi 2.6.0. It replaces the 2.6.0 from 13 November, so please download it again. Your programs keep working as they are.
Faster than PyTorch on the same card
We trained a 127 M-parameter GPT for 2 epochs on an RTX 3060, using the same model, the same data and the same temperature:
| Run | Tokens/s | Card |
|---|---|---|
| Apsi 2.6.0 (its own 16-bit kernels, no cuBLAS) | 20,708 | 79 °C max, never 80 |
| PyTorch 2.14 (bf16 autocast, flash attention) | 18,809 | 80 °C max |
- That makes Apsi 1.10× faster, with no CUDA toolkit, no PyTorch and no Python to install, only the NVIDIA driver.
- The large matrix products run at a steady 21–22 TFLOPS.
- Training holds the card at 78–79 °C and never reaches 80. It uses a fixed power limit and turns the fans up to 100 %, and lowers the power gently only when the fans are not enough. There are no pauses.
A fixed setup (Setup 1.50.0)
- No more waiting at 70 %. The GPU helper step now takes seconds, because it no longer measures the card during setup.
- The setup shows each stage, the time spent so far and what it is doing right now.
- Uninstalling just works. The uninstaller turns the GPU helper off first, after one administrator prompt. To do it by hand, run
apsi gpu removein a terminal opened as administrator. - The Apsi GPU Tuner is gone. You don't need it any more, because the GPU helper in the setup does its job. If you applied it before, the GPU guide shows how to remove it.
New in this build
- Sealed model packages:
pack_modelputs a trained model into one encrypted file (ChaCha20 + HMAC-SHA256).apsi package libthen builds a library that runs it without the training code. - Embedded and binary layouts:
use layoutgives you C structs (alignment, packing, endianness, bit fields), register maps and generated C headers. With the FFI, C code can also write straight into Apsi's memory. - More language features:
enum,matchwith built-in types (case int(n) if n > 100:), and0xFF/0b1010/0o755literals. - Graphs: GINE layers with edge features, and
batch_graphsfor many graphs with different sizes. Both are checked against the exact reference on the card. - Conversion:
apsi convertnow also takes Jupyter notebooks (.ipynb). - Fewer tokens:
tokens.focusgives a language model only the code that matters to a question.
Tested
- 445 tests run on every push, on Linux, macOS and Windows.
- 112 tests run on a real RTX 3060, and every kernel there is checked against the exact reference (13 of 13 checks).
- Training gives the same weights twice, bit for bit.
Honest numbers
Every result on the Benchmarks page comes with its raw log and the machine it ran on. PyTorch still uses less GPU memory on the 127 M model (3.9 GB against Apsi's 5.4 GB), and we're working on that. Your hardware may give different numbers, so please measure it yourself with apsi gpu bench.
Get it
- Download Apsi 2.6.0 for Windows or Linux, or get it from GitHub Releases. The setup upgrades the older 2.6.0 in place.
- With an NVIDIA card, keep GPU helper switched on in the setup and approve the prompt once.
- Read What's new in 2.6.0 and the GPU guide.
How you can help
- Speed: run
apsi gpu benchand post the result with your CPU and GPU. - Bugs: tell me your OS, your GPU and the full error message.
- Convert something: try one of your own Python projects and post what happened, whether it worked or not.
If you'd like to support Apsi, the Sponsor button goes to GitHub Sponsors. It's completely optional, and Apsi stays free for everyone. 💙
Thanks for testing, reporting and building with Apsi. I read every post! 🙏
0 comments
Sign in to comment.