25 repositorios
Techniques to manage and optimize key-value caches in transformer models to improve inference speed and memory efficiency.
Distinct from KV Cache Quantization: The candidates focus on specific variants like quantization or rolling caches; this covers the general optimization capability.
Explore 25 awesome GitHub repositories matching artificial intelligence & ml · KV Cache Optimizations. Refine with filters or upvote what's useful.
Moves intermediate activations to slower storage and spreads KV cache across nodes for large-scale clusters.
InternLM is a large language model and a comprehensive suite of weights designed for text generation and complex reasoning. It functions as an inference engine for serving responses, a fine-tuning framework for adjusting model weights, and a platform for building autonomous AI agents. The system is capable of processing long-context input sequences up to one million tokens for document analysis. It employs chain-of-thought reasoning to solve knowledge-intensive tasks by generating intermediate logic steps before producing a final answer. The project covers model weight optimization through s
Includes KV cache optimization to avoid redundant computations and increase token generation speed during inference.
LMCache is a distributed key-value cache manager and tiering system designed to accelerate large language model inference. It functions as a tiered storage layer that offloads tensors from GPU memory to CPU RAM, local disks, or remote object stores, enabling the reuse of cached prefixes across different inference sessions and serving engines. The system differentiates itself through a disaggregated prefill-decode model, which separates prompt processing from token generation by transferring caches between distributed compute nodes. It utilizes peer-to-peer orchestration to share and retrieve
Saves GPU cycles by offloading key-value caches from GPU memory to CPU RAM or other devices.
This project is a collection of educational resources and technical guides focused on the development and implementation of large language models. It provides a comprehensive curriculum covering transformer architectures, training methods, and deployment strategies. The materials provide detailed instructions for building autonomous agents using reasoning loops and tool integration, as well as guides for fine-tuning models through supervised learning and preference optimization. It also includes tutorials for constructing retrieval augmented generation pipelines and implementing transformer m
Optimizes key-value caches to increase sampling speed during autoregressive generation.
Directs incoming inference requests to GPUs that already hold relevant cached context, minimizing redundant recomputation.
Genkit is an open-source framework for building AI-powered applications. It provides a unified interface for connecting to hundreds of generative AI models from multiple providers, enabling text, image, audio, and video generation through a single API. The framework structures multi-step AI interactions—including chat, retrieval-augmented generation, tool use, and agentic workflows—as composable, traceable flows with built-in streaming and state management. The framework distinguishes itself through a comprehensive developer toolkit that includes a command-line interface and a local developer
Automatically caches common prompt prefixes to reduce token costs on repeated inputs.
Dynamo is a distributed inference orchestration platform designed for large language models. It functions as a system to coordinate prefill and decode phases across GPU nodes, utilizing a multi-backend runtime adapter to connect engines like vLLM and TensorRT-LLM through a unified block-oriented memory interface. An OpenAI-compatible API server provides the frontend for integration with existing tools and clients. The project is distinguished by its disaggregated serving architecture, which separates prompt processing and token generation onto independent GPU pools to optimize throughput and
Routes inference requests to GPUs based on KV cache affinity to avoid redundant computation.
Helicone is an AI gateway and observability platform designed to intercept, manage, and monitor interactions with large language models. By acting as a reverse-proxy, it provides a centralized layer for routing requests across multiple AI providers, allowing developers to maintain consistent application logic while gaining deep visibility into model performance, usage, and costs. The platform distinguishes itself through a robust suite of traffic management and prompt engineering tools. It enables policy-driven control, including automatic failover between providers, rate limiting, and edge-b
Caches prompt and conversation history to reduce inference latency and costs.
Torchtune is a PyTorch-native library for fine-tuning, aligning, and quantizing large language models. It provides a configurable training pipeline orchestrated through YAML recipes, with CLI overrides and component swapping, distributed training via FSDP2, memory optimizations, and parameter-efficient fine-tuning methods like LoRA, DoRA, and QLoRA. The library distinguishes itself through its YAML-driven configuration system that defines all training parameters and instantiates components from config files, with full CLI override capability for any field or component at launch time. It suppo
Moves activations to CPU during forward pass and retrieves them for backward to reduce GPU memory.
Torchtune is a PyTorch-native library for fine-tuning, aligning, and quantizing large language models. It provides a config-driven system for instantiating components, orchestrating distributed training, and managing parameter-efficient fine-tuning with quantization support, all through YAML-based configurations and command-line overrides. The library distinguishes itself through its comprehensive post-training workflow orchestration, combining supervised fine-tuning, preference optimization (DPO, PPO, GRPO), knowledge distillation, and quantization-aware training in a single configurable pip
Offloads intermediate activations from GPU to CPU during forward pass to save VRAM.
tailwind-merge is a utility library that resolves conflicting Tailwind CSS class strings when combining multiple sets of classes. It automatically detects and removes conflicting utility classes, keeping only the last class from each group that modifies the same CSS property, while preserving non-conflicting and non-Tailwind classes unchanged. The library handles complex conflict scenarios including modifier-order resolution, arbitrary value type detection, postfix modifier semantics, and asymmetric conflicts where one class group removes preceding classes from other groups but not vice versa
Performs expensive setup computations once and reuses them across merge calls for faster execution.
KServe is a Kubernetes-native platform for deploying and serving machine learning models as scalable inference services. It supports both generative AI models, including large language models, and traditional predictive models from frameworks such as TensorFlow, PyTorch, Scikit-Learn, XGBoost, and ONNX. The platform manages the full lifecycle of model deployments, including revision tracking, canary rollouts, A/B testing, and automatic rollbacks, and provides serverless scale-to-zero capabilities for cost-efficient resource management. KServe distinguishes itself through a standardized infere
Offloads key-value cache from GPU memory to CPU or disk to reduce memory usage during long-context inference.
KServe is an open platform for deploying and serving generative and predictive AI models on Kubernetes. It defines inference services as custom resources with declarative YAML specifications, enabling a Kubernetes-native approach to model deployment and lifecycle management. The platform leverages Knative-based serverless scaling for automatic scale-to-zero and revision management, and supports a pluggable serving runtime architecture that maps model formats to containerized execution environments. KServe distinguishes itself through model-aware autoscaling that scales replicas based on token
Moves key-value cache data from GPU to CPU memory to free GPU resources and serve larger models.
Shimmy es un motor de inferencia y servidor de modelos de lenguaje grandes local que carga y sirve pesos en formato GGUF. Se distribuye como un runtime binario único escrito en Rust, proporcionando un entorno independiente para ejecutar modelos sin dependencias de runtime externas. El proyecto utiliza WebGPU para aceleración por hardware, permitiendo que los kernels de cómputo del modelo se ejecuten a través de diversos hardware gráficos mediante una interfaz estandarizada. Cuenta con un servidor local que implementa una capa de API compatible con OpenAI, permitiendo que las aplicaciones interactúen con modelos locales a través de endpoints REST estandarizados. La memoria y el rendimiento se gestionan mediante la compresión de caché de clave-valor cuantizada para reducir el uso de VRAM de la GPU y el escalado de embedding rotatorio para extender la ventana de contexto del modelo. El sistema también incluye descubrimiento automático de archivos de modelo para escanear y registrar pesos compatibles desde el almacenamiento local. El servidor se gestiona a través de una interfaz de línea de comandos dedicada para controlar operaciones y verificar la generación del modelo.
Optimizes LLM memory through KV cache compression and context window extension.
ExecuTorch is a lightweight C++ runtime for deploying PyTorch models on mobile, embedded, and edge hardware. It provides an ahead-of-time compilation pipeline that exports, quantizes, and lowers model graphs into compact serialized programs, then executes them through a minimal runtime with hardware acceleration and on-device large language model inference capabilities. The project distinguishes itself through a hardware accelerator delegate system that partitions model subgraphs and offloads computation to specialized backends including NPUs, GPUs, and DSPs from Apple, Arm, Intel, MediaTek,
Enables key-value caching and scaled dot-product attention to accelerate autoregressive generation.
GLM-4.5 is a multimodal large language model and advanced reasoning system. It functions as an AI coding assistant, an autonomous AI agent, and a multimodal content generator capable of processing and generating text, images, audio, and video within a single unified system. The project is distinguished by its deep reasoning capabilities, utilizing chain-of-thought processing to solve complex mathematical, logical, and technical problems. It features an agentic architecture that allows for autonomous task execution, long-horizon goal planning, and the ability to interact with external tools an
Implements context-aware KV caching to lower token costs and improve response times for repeated prompts.
LightLLM is a high-performance serving framework for deploying and executing large language models. It functions as a multi-GPU inference engine and server capable of handling dense architectures, mixture-of-experts designs, and multimodal models that process both text and images. The system is distinguished by its specialized support for Mixture-of-Experts models using expert parallelism and fused kernels. It implements structured text generation through deterministic state machines and pushdown automata to enforce precise output formats. To optimize throughput, the framework employs specula
Allocates and deallocates memory for key-value caches on a per-token basis to prevent memory fragmentation.
This project is a Python software development kit and framework for building applications that integrate with large language models. It serves as a multimodal content generator and vector embedding library, enabling the production and editing of text, images, audio, and video. The toolkit provides specialized capabilities for adapting base models through supervised and reinforcement training. It further distinguishes itself by offering tools for orchestrating complex workflows, including stateful chat sessions, the enforcement of structured output via schemas, and the integration of external
Implements context caching for prompt and conversation history to improve response speed.
FastVideo is a comprehensive system for accelerated video generation, serving as a video generation inference engine, a video diffusion training framework, and a modular pipeline orchestrator. It provides a distributed transformer optimizer and a distillation toolkit designed to reduce denoising steps and model complexity to increase frame rates. The project distinguishes itself through specialized acceleration techniques, including joint distillation and sparse attention training. It implements low-step video generation and weight quantization to FP8 or FP4 precision to increase throughput a
Accelerates denoising by reusing cached noise prediction differences to skip redundant model passes.
Neuraloperator is a library for learning mappings between infinite-dimensional function spaces, serving as a tool to accelerate physics simulations and partial differential equation solving. It implements resolution-invariant models and spectral neural networks that can produce consistent predictions regardless of the input grid resolution or spatial discretization. The framework incorporates physics-informed neural networks that enforce physical constraints and differential equations through specialized loss functions. It utilizes Fourier transforms and spectral projections to process multid
Moves intermediate activation values from graphics memory to system RAM to enable high-resolution training.