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
Verification
Refs: #346, #336, #335.
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):
<F>NetworkDef.ktBitNetNetworkDef.kt<F>NetworkLoader.ktBitNetNetworkLoader.kt<F>WeightLoader.ktBitNetPackedGgufLoader.kt; generic path reuses llama's sharedDecoderGgufWeightLoader<F>RuntimeWeights.kt+<F>TensorNamesDecoderGgufWeights+LlamaModelMetadata; names live inBitNetGGUFNameResolver.kt<F>ConfigParserdecoderMetadataFromGgufis the #346 outcome, not drift<F>Ingestioninllm-runtime/k<f>llm-runtime/kbitnetexistsTasks
BitNetPackedGgufLoader→BitNetWeightLoader(+ API dump)BitNetRuntimeWeights.kt: family weight containers +BitNetTensorNames— may delegate internally to the shared decoder containers, but the public surface follows the templatellm-runtime/kbitnetwith aBitNetIngestionfacade mirroringllm-runtime/kllamaVerification
kbitnetingestion round-trip test.Refs: #346, #336, #335.