Apsi
โ† Community

Apsi 2.6.2: large models on one card, training that learns from itself, servers ready for production

Hi everyone! ๐Ÿ‘‹

Apsi 2.6.2 is out. It's a patch of 2.6.0 that makes large models fit on one card, lets training learn from the model's own output, and makes stopped runs resume exactly. Your programs keep working as they are. 2.6.0 stays available on the download page.

Large models on one 12 GB card

We trained a 155 M-parameter model on an RTX 3060 (12 GB). It has three graph encoders, a mixture-of-experts router and an 18-layer decoder, and it reads graphs of 6,144 nodes and sequences of 3,072 tokens:

Run Card memory
Apsi 2.6.2, the whole model at full size 6.8 GB of 12 GB
  • Activation recompute (recompute="auto", the default on a card): only the blocks that don't fit are computed again in backward. The weights come out the same to the last bit as keeping everything.
  • The plan follows the data: when a larger batch or graph comes along, Apsi plans the memory again before running it, so the card doesn't fill up halfway through a run.
  • Half the optimizer's memory: adamw(state="bf16") keeps both moments in bfloat16 with stochastic rounding. That saves 4 bytes per weight, and the update is still computed in float32.
  • More layers on the card: memory_slots, mask_rows, gated_delta and pick_rows now run as card kernels, with no copies to the processor and back on every step.

Training that learns from itself, and resumes exactly

  • Batches made while training: put record(later=fn) in the batch list and it runs when training reaches it. training_params() gives you the weights of that moment, which is reinforcement learning from the model's own samples, in plain Apsi.
  • Exact resume: state=record(get=, set=) puts your program's own state into the checkpoint, next to the random generators. 5 steps + resume + 5 steps gives the same loss as 10 steps in one go (difference below 1e-9).
  • Every part with its own optimizer: parameter groups with their own learning rate, betas, decay and clipping; parts that step after every batch; steps of their own length (accumulate=0).

Servers ready for production

  • app.group("/api/v1"): versioned APIs; groups nest and take WebSockets too.
  • app.compress(): gzip for text, HTML, JSON, JS, CSS and SVG, for clients that accept it.
  • app.ready(): answers 503 once the server starts stopping, so load balancers move traffic away first. /health now also reports the uptime.

Also new

  • Your own GPU kernels as layers: gpu_layer(forward, backward, init, out) runs your @gpu kernels inside a model the trainer trains.
  • Several outputs, one loss on the card: card_loss(...) with per-label weights and scaled batches.
  • Other programs' model files: models.named_tensors saves and reads a model under another program's tensor names.
  • Raw strings r#"..."# (regexes, Windows paths, other languages' code), and pymodule() to ship Python inside your .apsi files.
  • New example: examples/47_train_your_llm.apsi (a tokenizer, a LLaMA / Qwen3-style decoder, training and text written by the model).

Tested

  • 656 tests run on every push (507 toolchain + 149 Apsi), on Linux, macOS and Windows, Python 3.12โ€“3.14.
  • On a real RTX 3060, every kernel agrees with the exact reference, and the card's GPU tests pass (90 passed, 2 skipped).
  • Training the same model on the card and on the processor gives the same losses.

Honest numbers

Everyday code runs as fast as 2.6.0: the same programs on one GitHub runner come out at 1.01ร— (within run-to-run noise). This release is about memory and features, not raw speed. Every result on the Benchmarks page comes with its raw log and the machine it ran on. Your hardware may give different numbers, so please measure it yourself with apsi gpu bench.

Get it

Download Apsi 2.6.2 for Windows or Linux, or get it from GitHub Releases. With an NVIDIA card, keep the GPU helper switched on in the setup and approve the prompt once. Read What's new in 2.6.2, Training and the GPU guide.

How you can help

  • Speed: run apsi gpu bench and post the result with your CPU and GPU.
  • Large models: tell us the biggest model you got training on your card, and how much memory it took.
  • Bugs: tell me your OS, your GPU and the full error message.

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! ๐Ÿ™

GitHub: https://github.com/ATECTechnologies/apsi

1 0 Report

0 comments

Sign in to comment.