Skip to content

[bitnet] Full #346 conformance: BitNetWeightLoader/RuntimeWeights naming + llm-runtime/kbitnet facade #359

Description

@michalharakal

Motivation

#346 names the BitNet module as "the first greenfield instantiation of the template", but the folded-in module (PR #353) deviates from the convention on several rows. Since BitNet is meant to be the module new families copy, it should exemplify the template fully.

Current deviations (Apertus is the reference shape per #346):

#346 row BitNet today
<F>NetworkDef.kt ✅ BitNetNetworkDef.kt
<F>NetworkLoader.kt ✅ BitNetNetworkLoader.kt
<F>WeightLoader.kt ❌ BitNetPackedGgufLoader.kt; generic path reuses llama's shared DecoderGgufWeightLoader
<F>RuntimeWeights.kt + <F>TensorNames ❌ reuses DecoderGgufWeights + LlamaModelMetadata; names live in BitNetGGUFNameResolver.kt
<F>ConfigParser ✅-by-design — shared decoderMetadataFromGguf is the #346 outcome, not drift
Runtime facade <F>Ingestion in llm-runtime/k<f> ❌ no llm-runtime/kbitnet exists

Tasks

  • Rename BitNetPackedGgufLoader → BitNetWeightLoader (+ API dump)
  • BitNetRuntimeWeights.kt: family weight containers + BitNetTensorNames — may delegate internally to the shared decoder containers, but the public surface follows the template
  • New module llm-runtime/kbitnet with a BitNetIngestion facade mirroring llm-runtime/kllama
  • Anything deliberately kept shared documented as a justified deviation in a PR against Common structure and naming convention for model family modules #346, per that issue's own rule

Verification

Refs: #346, #336, #335.

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