alt.freeweights.text / bitnet-b1.58-2B-4T-bf16
From: microsoft <huggingface.co/microsoft>Newsgroups: alt.freeweights.textSubject:

bitnet-b1.58-2B-4T-bf16

Date: 2026-11-15Commit: 2766813Signed: 2DC28CC7B26A283B ✓

Text generation model with 2.4B parameters. Safetensors weights, 4.83 GB in all. Published by microsoft under MIT.

2.4B params4.83GBbitnet-b1.58-2B-4T-bf16safetensorspermissive
FactsParams2.4BSize4.83 GBFormatssafetensorsTasktext generationLicenseMITFrom sourcepermissive
$ fw get microsoft/bitnet-b1.58-2B-4T-bf16
# manifest sha256 84394a76fa3f… · 4.83 GB · 10 files
$ fw verify ./bitnet-b1.58-2B-4T-bf16 microsoft/bitnet-b1.58-2B-4T-bf16
From sourceHosted (signed)microsoft/bitnet-b1.58-2B-4T-bf16Last check: 2026-11-15 03:21 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Runs withAIBrixBentoMLCTranslate2ExLlamaV2ExLlamaV3exofastllmFlashInfergpu-unlockKTransformersLitServeLMCacheLMDeployLocalAImistral.rsMLC LLMMooncakeSGLangText Generation WebUItinygradTransformersTriton Inference ServervLLMXinferenceFine-tune withAccelerateAlignment HandbookAxolotlColossal-AIDeepSpeedEasyR1FlashAttentionH2O LLM StudioJAXKerasLiger KernelLitGPTLLaMA-FactoryMegatron-LMms-swiftnanotronOLMo-coreOpenRLHFOumiPEFTPyTorch Lightningsd-scriptsSimpleTunerTorchTitantorchtuneTransformer EngineTRLUnslothverlConvert withAQLMAutoRoundCore ML ToolsExecuTorchGPTQModelLLM CompressormergekitNeural CompressorOliveONNXOptimum QuantoOptimumsafetensorsTensorRT Model OptimizertorchaoEvaluate withAutoevalsDeepEvalEvaluateHELMLightEvallm-evaluation-harnessOpenCompassOpikRagassimple-evalsSWE-benchTruLensWeaveScan withAgentDojoAI Fairness 360DeepTeamDetoxifyFairlearngarakGiskardGuardrailsMCP ScannerModelScanNeMo GuardrailspicklescanpromptfooWorks withAgent Development KitAG2Google AI Edge GalleryAiderany-llmAnythingLLMBAMLbrowser-useCAMELHugging Face Chat UIChatboxCherry StudioClineCodex CLICogneeCrewAIDeerFlowDSPyEnchantedGemini CLIGitHub MCP ServergooseGPT ResearcherGradioGraphitiGuidanceHollamaInstructorKilo CodeLangflowLangGraphLiteLLMLlamaIndexLLMLocalAGILoLLMs WebUIMCP Python SDKMem0MetaGPTNextChatOllama JavaScriptOllama PythonOpenAI Agents SDKopencodeOpenHandsotermOutlinesPage AssistPlaywright MCPPortkey AI GatewayPrivateGPTQwen CodeRWKV RunnerSemantic KernelsmolagentsStrands AgentsVaneXGrammar

Overview

Size
4.83 GB
Weights
4.83 GB (safetensors)
Parameters
2.4B
Formats
safetensors
Task
text generation
License
MIT (permissive)
Files
10, each with a sha256
Publisher
microsoft
Added
2026-11-15
Section
alt.freeweights.text
Lineage

Original release from the publisher.

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-15 03:21 UTCpassed

Model card

From the publisher at commit 2766813. Shown as plain text with links; images open at the publisher.

BitNet b1.58 2B4T - Scaling Native 1-bit LLM#

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.258J0.186J0.347J0.425J0.649J0.028J
Training Tokens (Pre-train)9T*2T**18T11T1.1T4T
ARC-Challenge37.8038.4046.6743.5244.8049.91
ARC-Easy63.1763.1376.0162.9272.1474.79
OpenbookQA34.8038.8040.8046.0040.2041.60
BoolQ64.6574.2278.0475.7880.6780.18
HellaSwag60.8057.6968.2871.7170.8168.44
PIQA74.2171.9376.1276.1276.6677.09
WinoGrande59.5158.4862.8368.9861.8071.90
CommonsenseQA58.4842.1076.4163.5571.7471.58
TruthfulQA43.8038.6646.6739.9041.4145.31
TriviaQA37.6023.4938.3745.9734.1333.57
MMLU45.5839.9160.2549.2451.8253.17
HumanEval+31.1037.2050.6028.0043.9038.40
GSM8K38.2131.1656.7945.114.4058.38
MATH-50023.0042.0053.0017.6014.8043.40
IFEval62.7166.6750.1257.9136.8153.48
MT-bench5.436.406.125.506.575.85
Average44.9043.7455.2348.7042.0554.19

*LLaMA 3.2 1B uses pruning & distillation.

**Gemma-3 1B uses distillation.

License#

The model weights and code are released under the MIT License.

Disclaimer#

This model is intended for research and development purposes. While efforts have been made to align it using SFT and DPO, it may still produce outputs that are unexpected, biased, or inaccurate. Please use responsibly.

Data Summary#

https://huggingface.co/microsoft/bitnet-b1.58-2B-4T-bf16/blob/main/data_summary_card.md

Files

10 files · 4.83 GBWeights 4.83 GB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 10 files with their sha256
FileSizesha256
.gitattributes1.52 KB11ad7efa24975ee4b0c3c3a38ed18737f0658a5f75a0a96787b576a78a023361
LICENSE1.07 KB646f8936b8ddcd14e13e578ff6857e368780b0d1a4f6066bee89211923a373e2
README.md8.94 KBa11bf9a3ca3c96cc342918a26b87909e9fd902b3db257c010623b4b0ff695481
config.json843 B9dbdfeeb39d0ffd0700389b2ec2dde891ff66c5b111d40d7899ef608b9820f62
data_summary_card.md3.86 KBf01a3d0be163354a5054617275ce980538a2b65d07f661084ae6761636dc9849
generation_config.json199 Baf34a37cd006fd230106fcefc6bfdc1f775503aee05a80c174ccc5c6594f7054
model.safetensors4.83 GB529637ff6dab1f5890767356928693f69ffe61d3b6040a43de9306b37bfd5ae1
special_tokens_map.json73 B462d91939dbc37178aa5a3eae7068d1990ccc92e09f288cc71f42cdf139d69cc
tokenizer.json9.09 MBe134af98b985517b4f068e3755ae90d4e9cd2d45d328325dc503f1c6b2d06cc7
tokenizer_config.json50.8 KBd27b698683435b0b0dd544a591a30196b2b63f5fd4c8c64b9060a84dc185386f
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
2766813946 pinned now2026-11-15 03:21 UTC10 files · 4.83 GB

Use it

$ fw get microsoft/bitnet-b1.58-2B-4T-bf16
# manifest sha256 84394a76fa3f… · 4.83 GB · 10 files
$ fw verify ./bitnet-b1.58-2B-4T-bf16 microsoft/bitnet-b1.58-2B-4T-bf16
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/microsoft/bitnet-b1.58-2B-4T-bf16.json --dir ./bitnet-b1.58-2B-4T-bf16 $ python3 fw.py verify ./bitnet-b1.58-2B-4T-bf16 ./microsoft__bitnet-b1.58-2B-4T-bf16.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download microsoft/bitnet-b1.58-2B-4T-bf16 --revision 276681394656abdadb8e80e5b2c3db5e5d7fcaff --local-dir ./bitnet-b1.58-2B-4T-bf16
transformersLoad the weights in Python.
import os os.environ["HF_ENDPOINT"] = "https://freeweights.allternit.com" from transformers import AutoModelForCausalLM, AutoTokenizer tok = AutoTokenizer.from_pretrained("microsoft/bitnet-b1.58-2B-4T-bf16", revision="276681394656abdadb8e80e5b2c3db5e5d7fcaff") model = AutoModelForCausalLM.from_pretrained("microsoft/bitnet-b1.58-2B-4T-bf16", revision="276681394656abdadb8e80e5b2c3db5e5d7fcaff", device_map="auto")
vLLMServe an OpenAI-compatible API.
$ HF_ENDPOINT=https://freeweights.allternit.com vllm serve microsoft/bitnet-b1.58-2B-4T-bf16 --revision 276681394656abdadb8e80e5b2c3db5e5d7fcaff

License

Name
MIT License
Id
MIT
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-15
Text in
LICENSE
Text sha256
646f8936b8ddcd14e13e578ff6857e368780b0d1a4f6066bee89211923a373e2
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: microsoft <huggingface.co/microsoft>Newsgroups: alt.freeweights.textSubject: bitnet-b1.58-2B-4T-bf16Date: 2026-11-15Commit: 2766813Signed: 2DC28CC7B26A283B ✓
Upstream
microsoft/bitnet-b1.58-2B-4T-bf16
Pinned commit
276681394656abdadb8e80e5b2c3db5e5d7fcaff
Manifest
bitnet-b1.58-2B-4T-bf16.json · .minisig
Manifest sha256
84394a76fa3f3ebb2ec751505a9d10e6abffe0ea0073687c8ea268e81ea9bbe0
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 03:21 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/microsoft/bitnet-b1.58-2B-4T-bf16.json $ curl -O https://freeweights.allternit.com/manifests/microsoft/bitnet-b1.58-2B-4T-bf16.json.minisig $ minisign -Vm bitnet-b1.58-2B-4T-bf16.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

No related models in this catalog.Nothing here lists this model as its parent, and it names no parent.
Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download microsoft/bitnet-b1.58-2B-4T-bf16
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. bitnet-b1.58-2B-4T-bf16.json. Provenance. Takedown history: none.
From: laion <huggingface.co/laion>Subject: a2-rl-e2egit_large-50-32B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_e2egit-large-15-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_e2egit-v2-10-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_pymethods2test-large-80-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_unitsyn-python-large-10-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_mix_h2_language_proportional-65-8B