microsoft / microsoft/BitNet

Native binary wire format for ternary weights — NativeTernary

Open
#534 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
40.3k
Forks
3.7k
PR merge metrics
No merged PRs in 30d

Description

Hi BitNet team,
I am an independent researcher and have published a paper proposing a native binary wire format specifically designed for ternary weights {-1, 0, +1}.
The problem: BitNet b1.58 operates natively in ternary but stores weights in GGUF — a container format designed for floating-point data. There is no native wire format purpose-built for ternary weights.
NativeTernary solves this:

Each weight maps to exactly one 2-bit pair: {00}=-1, {01}=0, {10}=+1
Layer boundaries encoded as {11} (2 bits), tensor boundaries as {1111} (4 bits), model section boundaries as {111111} (6 bits) — built directly into the stream
Decoder: 2-bit register + level counter. 10 lines of code. Zero lookup tables
Stateless and resilient to bitstream corruption

Links:

arXiv: https://arxiv.org/abs/2604.03336
GitHub: https://github.com/sm45118/nativeternary

C reference implementation is in progress. Would genuinely value technical feedback from the team, and happy to discuss integration.
Maharshi Savdhariya
IIT Bombay | IIM Udaipur

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the issue's arXiv paper and the linked NativeTernary repository, then compare the proposal with BitNet's existing weight and model serialization paths. A maintainer decision on whether the format fits BitNet and a defined integration target would be needed before implementation can be considered done.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, cpp
Domain
ai, machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.