Model reference · open weights

bitnet-b1.58-4T

LLMs microsoft Text gen 2 builds Open weights 21k dl/mo

bitnet-b1.58-4T is an open-weight language model from microsoft. bitnet-b1.58-2B-4T (INT4) weighs 1.2 GB; the smallest configuration that runs it is RTX 3060 12 GB.

For self-hosting, compare this build's requirements below with the GPU you plan to rent.

  • BitNet b1.58 2B4T is a text-generation model developed by Microsoft Research that uses native 1.58-bit weights and 8-bit activations.
  • It contains approximately 2 billion parameters, supports a context length of 4096 tokens, and is trained on 4 trillion tokens.
  • The model is released under the MIT license and is primarily designed for English language tasks.

Summary of the microsoft/bitnet-b1.58-2B-4T model card, 2026-10-01

What it is

Released bymicrosoft
Released2025-04-15
Parameters850M
VRAM1.2 GB for the weights

What it runs on

Memory and cards for bitnet-b1.58-2B-4T (INT4)

1.2 GBweights, file size
77 MBcache per 1K tokens
659 MBruntime overhead, at least
4,096 tokenscontext max
CardRequests at onceContext maxMemory
4K each
RTX 3060 12 GB31all 4K11.6 GB
RTX 4060 Ti 16 GB43all 4K15.4 GB
RTX 3090 24 GB68all 4K23.4 GB
RTX 4090 24 GB68all 4K23.4 GB
RTX 5090 32 GB92all 4K31.0 GB
L40S 48 GB133all 4K44.0 GB
A100 80 GB242all 4K78.2 GB
H100 80 GB230all 4K78.1 GB
RTX PRO 6000 Blackwell 96 GB280all 4K93.8 GB
DGX Spark (GB10) 128 GB unified323all 4K107 GB
H200 141 GB420all 4K138 GB
B200 180 GB540all 4K176 GB
Memory needed at each load
Requests at once4K tokens each
12.2 GB
53.4 GB
84.4 GB
166.9 GB
3211.9 GB
6422.0 GB

One card, with vLLM's small-card settings.

Builds

Sizes, precisions & builds

BuildParamsPrecisionWeightsSmallest setup
bitnet-b1.58-2B-4T (above) ↗ 850MINT4 1.2 GBRTX 3060 12 GB
bitnet-b1.58-2B-4T-gguf ↗ GGUF 1.2 GBRTX 3060 12 GB

From the model card

What microsoft says about bitnet-b1.58-4T

Read the model card

This repository contains the weights for BitNet b1.58 2B4T, the first open-source, native 1-bit Large Language Model (LLM) at the 2-billion parameter scale, developed by Microsoft Research.

Trained on a corpus of 4 trillion tokens, this model demonstrates that native 1-bit LLMs can achieve performance comparable to leading open-weight, full-precision models of similar size, while offering substantial advantages in computational efficiency (memory, energy, latency).

➡️ Technical Report: BitNet b1.58 2B4T Technical Report

➡️ Official Inference Code: microsoft/BitNet (bitnet.cpp)

Model Variants

Several versions of the model weights are available on Hugging Face:

Model Details

  • Architecture: Transformer-based, modified with BitLinear layers (BitNet framework).
    • Uses Rotary Position Embeddings (RoPE).
    • Uses squared ReLU (ReLU²) activation in FFN layers.
    • Employs subln normalization.
    • No bias terms in linear or normalization layers.
  • Quantization: Native 1.58-bit weights and 8-bit activations (W1.58A8).
    • Weights are quantized to ternary values {-1, 0, +1} using absmean quantization during the forward pass.
    • Activations are quantized to 8-bit integers using absmax quantization (per-token).
    • Crucially, the model was trained from scratch with this quantization scheme, not post-training quantized.
  • Parameters: ~2 Billion
  • Training Tokens: 4 Trillion
  • Context Length: Maximum sequence length of 4096 tokens.
    • Recommendation: For optimal performance on tasks requiring very long contexts (beyond the pre-training length or for specialized long-reasoning tasks), we recommend performing intermediate long-sequence adaptation/training before the final fine-tuning stage.
  • Training Stages:
    1. Pre-training: Large-scale training on public text/code and synthetic math data using a two-stage learning rate and weight decay schedule.
    2. Supervised Fine-tuning (SFT): Fine-tuned on instruction-following and conversational datasets using sum loss aggregation and specific hyperparameter tuning.
    3. Direct Preference Optimization (DPO): Aligned with human preferences using preference pairs.
  • Tokenizer: LLaMA 3 Tokenizer (vocab size: 128,256).

How to Use (with transformers)

VERY IMPORTANT NOTE ON EFFICIENCY

Please do NOT expect performance efficiency gains (in terms of speed, latency, or energy consumption) when using this model with the standard transformers library, even with the required fork.

The current execution paths within transformers do not contain the specialized, highly optimized computational kernels required to leverage the advantages of the BitNet architecture. Running the model via transformers will likely result in inference speeds and energy usage comparable to, or potentially worse than, standard full-precision models within this framework on both CPU and GPU.

While you might observe reduced memory usage due to the quantized weights, the primary computational efficiency benefits are not accessible through this standard transformers usage path.

For achieving the efficiency benefits demonstrated in the technical paper, you MUST use the dedicated C++ implementation: bitnet.cpp.

Requirements

pip install git+https://github.com/huggingface/transformers.git@096f25ae1f501a084d8ff2dcaf25fbc2bd60eba4

Example

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "microsoft/bitnet-b1.58-2B-4T"

# Load tokenizer and model
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    torch_dtype=torch.bfloat16
)

# Apply the chat template
messages = [
    {"role": "system", "content": "You are a helpful AI assistant."},
    {"role": "user", "content": "How are you?"},
]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
chat_input = tokenizer(prompt, return_tensors="pt").to(model.device)

# Generate response
chat_outputs = model.generate(**chat_input, max_new_tokens=50)
response = tokenizer.decode(chat_outputs[0][chat_input['input_ids'].shape[-1]:], skip_special_tokens=True) # Decode only the response part
print("\nAssistant Response:", response)

How to Use (with bitnet.cpp)

Please refer to the bitnet.cpp GitHub repository for detailed compilation steps, usage examples, and command-line options.

Evaluation

BitNet b1.58 2B4T was evaluated against leading open-weight full-precision LLMs of similar size. Below are the key results (all models are instruction-tuned versions):

BenchmarkLLaMA 3.2 1BGemma-3 1BQwen2.5 1.5BSmolLM2 1.7BMiniCPM 2BBitNet b1.58 2B
Memory (Non-emb)2GB1.4GB2.6GB3.2GB4.8GB0.4GB
Latency (CPU Decoding)48ms41ms65ms67ms124ms29ms
Energy (Estimated)0.2

Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms