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 typing import Callable, TYPE_CHECKING4 5if TYPE_CHECKING:6 from torch import Tensor7 8from .base import ModelBase, gguf9 10from .llama import LlamaModel11from .qwenvl import Qwen2VLVisionModel12 13 14@ModelBase.register("Sarashina2VisionForCausalLM")15class Sarashina2VLTextModel(LlamaModel):16 model_arch = gguf.MODEL_ARCH.LLAMA17 18 @classmethod19 def filter_tensors(cls, item: tuple[str, Callable[[], Tensor]]) -> tuple[str, Callable[[], Tensor]] | None:20 name, gen = item21 if name.startswith("llm."):22 name = name.replace("llm.", "", 1)23 elif name.startswith("norm."):24 return None25 return super().filter_tensors((name, gen))26 27 28@ModelBase.register("Sarashina2VisionForCausalLM")29class Sarashina2VLVisionModel(Qwen2VLVisionModel):30 def __init__(self, *args, **kwargs):31 super().__init__(*args, **kwargs)32 self.global_config['model_type'] = "qwen2_vl"33 