← All projects
Project record1 mention
Originally shared on Hacker News

ttf

An optimizer and training method for ternary LLMs that reduces training memory from 16 bytes to 1 byte or less per weight, enabling training of 10-20B parameter models on consumer GPUs (a 27B fit on a single 24GB 3090). Includes repos for training, for converting existing models such as Qwen 3.8 27B and Qwen Flash Next to compact GGUFs, and for running converted models, plus a paper. Code is open for non-commercial use.

Last shared For People who want to train their own 10-20B parameter LLMs on consumer GPUs.
01 / The problem

What it addresses

Training with AdamW requires ~16 bytes of VRAM per weight, and even ternary training (BitNet) keeps full precision weights during training, so the same amount of memory is still needed, preventing training of large LLMs on consumer GPUs.

02 / Source history

Shared over time

Each entry reflects what was shared on that date. Details may have changed since then.

  1. ttf

    An optimizer and training method for ternary LLMs that reduces training memory from 16 bytes to 1 byte or less per weight, enabling training of 10-20B parameter models on consumer GPUs (a 27B fit on a single 24GB 3090). Includes repos for training, for converting existing models such as Qwen 3.8 27B and Qwen Flash Next to compact GGUFs, and for running converted models, plus a paper. Code is open for non-commercial use.

    Problem: Training with AdamW requires ~16 bytes of VRAM per weight, and even ternary training (BitNet) keeps full precision weights during training, so the same amount of memory is still needed, preventing training of large LLMs on consumer GPUs.

    Audience: People who want to train their own 10-20B parameter LLMs on consumer GPUs.

    Posted by @gladia-solaria · Original source ↗

    Source text · @gladia-solaria · · Source ↗

    I focused on training ternary networks bcs BitNet (Ma et al.) shows they match full precision quality in large scales.

    Source text · @gladia-solaria · · Source ↗

    The problem is BitNet also keeps the full precision weights during training which means you still need to use the same amount of memory.

    Source text · @gladia-solaria · · Source ↗

    I got this down from 16 bytes to 1 byte or even less per weight.

    Source text · @gladia-solaria · · Source ↗

    For you, this means, you can train your own 10-20B parameter models on your consumer GPUs. I fitted 27B model training on a single 24GB 3090 and a 23B model on a 16GB GPU.

    Source text · @gladia-solaria · · Source ↗

    I have also been working on converting existing models and training them.

    Source text · @gladia-solaria · · Source ↗

    The code is open for non-commercial use.

    Source text · @gladia-solaria · · Source ↗

    The core repo for training: https://github.com/oguzeldereli/ttf-ternary

    Source text · @gladia-solaria · · Source ↗

    The repo for conversion: https://github.com/oguzeldereli/ttf-conversion

    Source text · @gladia-solaria · · Source ↗

    Repo for running models trained by ttf: https://github.com/oguzeldereli/ttf-home

    Source text · @gladia-solaria · · Source ↗

    GGUF for a converted Qwen 3.8 27B with adapters (around 8 GB): https://huggingface.co/oguzeldereli/ttf-Qwen3.8-27B-GGUF

    Source text · @gladia-solaria · · Source ↗

    GGUF for a converted Qwen 3.8 Flash Next (around 40.4GB): https://huggingface.co/oguzeldereli/ttf-Qwen3.8-Flash-Next-GGUF

    Source text · @gladia-solaria · · Source ↗

    Full paper: https://github.com/oguzeldereli/ttf-ternary/blob/main/paper/ttf_paper1_training.pdf