CoolFace
Modelpublic

Felipe97/llama-cpp-compiled

sourceHugging Faceupdated 2d agoView on Hugging Face
0likes1.1kdownloads
maincoder.py16 linesDownload Raw Back to conversion
1from __future__ import annotations2 3from .base import ModelBase, TextModel, gguf4 5 6@ModelBase.register("MaincoderForCausalLM")7@ModelBase.example("Maincode/Maincoder-1B")8class MaincoderModel(TextModel):9    model_arch = gguf.MODEL_ARCH.MAINCODER10 11    def set_gguf_parameters(self):12        super().set_gguf_parameters()13 14        if (head_dim := self.hparams.get("head_dim")) is not None:15            self.gguf_writer.add_rope_dimension_count(head_dim)16