BitNet3-8B-Converted / modeling_bitnet.py
ejbejaranos's picture
Upload folder using huggingface_hub
4d061f7 verified
raw
history blame contribute delete
350 Bytes
from transformers import PreTrainedModel
from .configuration_bitnet import BitNetConfig
from .quantization import BitLinear
from .linear_to_bitlinear import replace_linears_in_hf
class BitNetModel(PreTrainedModel):
config_class = BitNetConfig
def __init__(self, config):
super().__init__(config)
replace_linears_in_hf(self)