Brunobkr/llama.cpp_AlgMor24_github
ΩFFFΣLLIa • llama.cpp • AlgMor24 ██████╗ ███████╗███████╗███████╗██╗ ██╗ ██╗ █████╗ ██╔═══██╗██╔════╝██╔════╝██╔════╝██║ ██║ ██║██╔══██╗ ██║ ██║█████╗ █████╗ █████╗ ██║ ██║ ██║███████║ ██║ ██║██╔══╝ ██╔══╝ ██╔══╝ ██║ ██║ ██║██╔══██║ ╚██████╔╝██║ ██║ ███████╗███████╗███████╗██║██║ ██║ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝╚══════╝╚═╝╚═╝ ╚═╝ High-Performance LLM / VLM Inference & Autonomous Agentic Ecosystem… See the full description on the dataset page: https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github.
03.1k
1from __future__ import annotations2 3from .base import ModelBase, TextModel, gguf4 5 6@ModelBase.register("OrionForCausalLM")7class OrionModel(TextModel):8 model_arch = gguf.MODEL_ARCH.ORION9 10 def set_vocab(self):11 self._set_vocab_sentencepiece()12 13 def set_gguf_parameters(self):14 head_count = self.hparams["num_attention_heads"]15 head_count_kv = self.hparams.get("num_key_value_heads", head_count)16 17 ctx_length = 018 if "max_sequence_length" in self.hparams:19 ctx_length = self.hparams["max_sequence_length"]20 elif "max_position_embeddings" in self.hparams:21 ctx_length = self.hparams["max_position_embeddings"]22 elif "model_max_length" in self.hparams:23 ctx_length = self.hparams["model_max_length"]24 else:25 raise ValueError("gguf: can not find ctx length parameter.")26 27 self.gguf_writer.add_file_type(self.ftype)28 self.gguf_writer.add_tensor_data_layout("Meta AI original pth")29 self.gguf_writer.add_context_length(ctx_length)30 self.gguf_writer.add_embedding_length(self.hparams["hidden_size"])31 self.gguf_writer.add_block_count(self.block_count)32 self.gguf_writer.add_feed_forward_length(self.hparams["intermediate_size"])33 self.gguf_writer.add_head_count(head_count)34 self.gguf_writer.add_head_count_kv(head_count_kv)35 # note: config provides rms norm but it is actually layer norm36 # ref: https://huggingface.co/OrionStarAI/Orion-14B-Chat/blob/276a17221ce42beb45f66fac657a41540e71f4f5/modeling_orion.py#L570-L57137 self.gguf_writer.add_layer_norm_eps(self.hparams["rms_norm_eps"])38 