Skip to content

Independent reconstruction and validation of the BitNet b1.58 2B4T I2_S GGUF #690

Open

Description

@buzquin

Independent reconstruction and validation of the BitNet b1.58 2B4T I2_S GGUF

Purpose

This report documents an independent investigation of the Microsoft BitNet b1.58 2B4T model, concentrating on the relationship between the Hugging Face checkpoint, its packed ternary weights, the I2_S representation in GGUF, and the behavior of the resulting model during CPU inference.

The investigation involved inspecting the checkpoint and GGUF data, examining the conversion implementation, reconstructing the GGUF, and testing the resulting model.

This report records the observations and results of that work. It does not claim that a particular upstream defect has been conclusively identified.

1. Reconstruction

The investigation used the checkpoint in:

models/BitNet-original/

The model was converted to an I2_S GGUF using the BitNet conversion tooling.

The resulting file was:

BitNet-reconverted/ggml-model-i2_s.gguf

Its measured size was:

1,187,288,192 bytes

The conversion also produced a log file:

conversion.log (31,524 bytes)

The resulting file was recognized as a GGUF model and was subsequently used for CPU inference.

2. Examination of packed weights

An important part of the investigation was understanding the relationship between the checkpoint's packed ternary weights and their representation in GGUF.

I2_S stores four ternary values per byte. The values represent -1, 0, and +1. The packed data is followed by a 32-byte trailer containing the scale and additional bytes.

For the layer 0 MLP down-projection, the checkpoint contains:

  • model.layers.0.mlp.down_proj.weight_scale
  • Shape: (1,)
  • Data type: torch.bfloat16
  • Value: 2.15625

The unpacked ternary weights were examined independently. Their first nonzero value was 1.0, and their mean absolute value was approximately 0.6178638.

The corresponding GGUF tensor has a packed data region of 4,423,680 bytes, with an additional 32-byte trailer.

The scale found in that trailer was:

2.163161277770996

This is consistent with the checkpoint's bfloat16 scale after rounding to bfloat16 precision. The two values should therefore not be treated as evidence of an incorrect scale.

A further observation was that the 28 bytes following the float32 scale were nonzero. This is consistent with the behavior described in issue #632, concerning leftover bytes in I2_S tensor trailers.

3. Conversion and serialization observations

Inspection of the conversion implementation and the corresponding GGUF data was necessary to distinguish actual weight data from the additional trailer bytes.

In particular, the packed ternary values and the scale must be considered separately. Comparing the entire tensor buffer byte-for-byte without accounting for the trailer can produce misleading conclusions.

The investigation also examined the I2_S dequantization implementation in the llama.cpp source, including dequantize_row_i2_s() and the associated CPU quantized matrix operations.

The purpose was to establish how the packed values are interpreted during inference, rather than relying solely on the apparent shape or size of the GGUF data.

4. Inference tests

The reconstructed model was successfully run using CPU inference.

However, its responses to some elementary evaluation tasks were disappointing.

When asked what valuable work a 1-bit LLM could perform, the model claimed that it had only two possible states, "1" and "0", and that its capabilities were essentially limited to text generation and binary pattern recognition.

This is a fundamental misunderstanding of 1-bit quantization. The restriction applies to weight representation; it does not mean that the model's activations, computations, or outputs are limited to two states.

In another test, the model was asked to evaluate a binary-art example consisting of an 80-bit sequence. The sequence was standard 8-bit ASCII encoding of:

I love you

The model produced generic commentary about binary patterns and visual arrangements, but did not recognize or decode the ASCII text.

These tests demonstrate limitations in the observed behavior of the reconstructed model. They do not establish that the conversion process caused those limitations.

5. Relationship to existing issues

This investigation overlaps with several existing reports:

These reports provide relevant context for interpreting the reconstruction work. This report does not claim to supersede or contradict their findings.

6. Conclusions

This investigation documents an independent reconstruction of the BitNet b1.58 2B4T model in I2_S GGUF format, examination of its packed ternary weights and scale data, and successful execution using CPU inference.

The work also exposed important distinctions between successful file conversion, correct interpretation of the packed weight representation, and satisfactory model behavior.

The behavioral tests produced inconsistent results, including a fundamental misunderstanding of 1-bit quantization and failure to interpret a straightforward ASCII-encoded binary message. These results are recorded as observations, not as proof that the conversion process caused the limitations.

This report is submitted as a record of the reconstruction work and its findings. No response or follow-up is requested.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions