Download conversion/maincoder.py from Brunobkr/llama.cpp_AlgMor24_github: direct link, hf CLI and curl.
- Browser
- Download file 409 Bytes
-
https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github/resolve/9f63da05cd17e144eb118af61a784286378961ba/conversion/maincoder.py
- Command line
-
hf download hf://datasets/Brunobkr/llama.cpp_AlgMor24_github@9f63da05cd17e144eb118af61a784286378961ba/conversion/maincoder.py
-
curl -L -o maincoder.py https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github/resolve/9f63da05cd17e144eb118af61a784286378961ba/conversion/maincoder.py
409 Bytes
| from __future__ import annotations | |
| from .base import ModelBase, TextModel, gguf | |
| class MaincoderModel(TextModel): | |
| model_arch = gguf.MODEL_ARCH.MAINCODER | |
| def set_gguf_parameters(self): | |
| super().set_gguf_parameters() | |
| if (head_dim := self.hparams.get("head_dim")) is not None: | |
| self.gguf_writer.add_rope_dimension_count(head_dim) | |