Top all-time · #14277
Compilade's Blog
Personal blog · compilade.net/blogprogrammingsystems
Compilade's Blog is a personal blog at compilade.net about programming and systems. Since 2024, 5 different Hacker News readers have linked it 5 times, most often “How to pack ternary numbers in 8-bit bytes”. The last post was in 2024, but the archive is still widely read.
Too few sampled comments (3) to say how often HN recommends it.?
Why HN links it
Explains how to pack ternary weights (trits) into bytes, such as 5 trits per byte, which is relevant to low-bit LLMs like BitNet. HN readers link it as a clear explainer of the technique.
Summarised by Claude from a sample of 3 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.
Welcome to my custom-built personal website about programming-related stuff!
Most-linked posts?
- How to pack ternary numbers in 8-bit bytes5 people · 5 mentions · first linked 2024-12-05
What Hacker News says?
https://compilade.net/blog/ternary-packing is a good explainer (previous discussion https://news.ycombinator.com/item?id=42329307 )
Comment linking /blog/ternary-packing
on “Microsoft researchers developed a hyper-efficient AI model that can run on CPUs”Submitted How to pack ternary numbers in 8-bit bytes as a story · 91 points
HN discussionThis model maps weights to ternary values {-1, 0, 1} (aka trits). One trit holds log(3)/log(2) ≈ 1.58 bits of information. To represent a single trit by itself would require 2 bits, but it is possible to pack 5 trits into 8 bits. This article explains it well: https://compilade.net/blog/ternary-packing By using 4 ternary weights per 8 bits, the model is not quite as space-efficient as it could be in terms of informa…
Comment linking /blog/ternary-packing
on “BitNet b1.58 2B4T Technical Report”Submitted How to pack ternary numbers in 8-bit bytes as a story · 1 points
HN discussionpacking multiple trits together e.g. 5 trits (243 states) into a byte gives 1.6 bits per trit: https://compilade.net/blog/ternary-packing
Comment linking /blog/ternary-packing
on “Bonsai 27B (1-bit LLM): The First 27B-Class Model to Run on a Phone”