21 repositorios
Techniques for reducing VRAM usage during model training or inference.
Distinguishing note: Focuses on VRAM reduction for generative models.
Explore 21 awesome GitHub repositories matching artificial intelligence & ml · Memory Optimization. Refine with filters or upvote what's useful.
LLaMA-Factory is a comprehensive suite for dataset preparation, model fine-tuning, memory optimization, and standardized API deployment. It provides a unified platform for the supervised and reward-based fine-tuning of large language models and vision-language models. The framework includes a specialized toolkit for training vision-language models and a model serving interface that deploys trained models through high-performance APIs. It utilizes precision tuning and quantization techniques to reduce the hardware requirements and memory footprint of large models. The system covers data pipel
Optimizes VRAM usage during training and inference through precision tuning and quantization.
ControlNet is a framework for structural image generation that extends pre-trained diffusion models with neural network architectures designed for precise spatial control. By injecting structural guidance directly into the latent-space denoising process, the system enables users to enforce geometric or semantic constraints on generated outputs while maintaining style consistency. The framework distinguishes itself through a weight-locked copying mechanism that preserves the integrity of the original model while introducing new control signals. It supports multi-condition synthesis, allowing f
Reduces video memory consumption to enable larger batch sizes on limited hardware.
WeClone is an end-to-end framework designed for the creation, training, and deployment of personalized conversational AI digital twins. By fine-tuning large language models on individual chat history, the platform enables the replication of unique communication styles, speech patterns, and conversational habits. The system manages the entire lifecycle of these digital avatars, from initial data preparation to final integration into messaging platforms for real-time interaction. The platform distinguishes itself through a comprehensive suite of data processing utilities that prepare raw messag
Implements memory optimization techniques like quantization and batch size adjustment to fit large models into limited hardware memory.
Handy is a local speech-to-text automation tool designed to convert spoken audio into text and inject it directly into active desktop applications. By running machine learning models entirely on the host hardware, it provides a private, offline-first environment for dictation and command execution. The system functions as a background service that manages microphone input, transcription state, and text output, enabling hands-free typing across various software environments. The project distinguishes itself through a modular pipeline that integrates local language models for post-transcription
Frees system memory by unloading transcription models after periods of inactivity.
Stable Diffusion WebUI Forge is a web-based interface and inference engine designed for the generation of AI media. It functions as a platform for executing diffusion-based models, providing a centralized environment to manage image preprocessors, custom generation logic, and hardware-accelerated sampling. The project distinguishes itself through a neural network patching framework that allows for the modification of model layers and the application of spatial conditioning during inference. By injecting custom logic and adapters directly into the network, users can influence output behaviors
Minimizes video memory consumption to allow high-resolution models to run on hardware with limited capacity.
kohya_ss is a graphical user interface and workbench for fine-tuning diffusion models, specifically designed for Stable Diffusion. It provides a suite of tools for training generative AI models, including specialized interfaces for creating Low-Rank Adaptation weights and training ControlNet spatial control networks. The project distinguishes itself through integrated VRAM usage optimization and hardware acceleration, featuring specific support for Intel GPUs via XPU-accelerated libraries. It implements parameter-efficient training methods and memory-saving techniques like gradient checkpoint
Minimizes VRAM consumption using techniques like gradient checkpointing and caching to prevent out-of-memory errors.
Axolotl is a distributed training orchestrator and fine-tuning framework for large language models, multimodal systems, and quantized models. It provides a structured environment for specializing pre-trained models through full parameter updates or low-rank adaptation, as well as aligning model outputs with human expectations via preference tuning pipelines and reward modeling. The system distinguishes itself through a configuration-driven pipeline that manages preprocessing and training workflows via a single file for reproducibility. It implements high-throughput optimizations such as multi
Reduces VRAM requirements during training through quantization and reduced-precision fine-tuning.
Airllm is a framework designed to execute and fine-tune large language models on consumer-grade hardware. By employing layer-wise model decomposition and memory-efficient loading techniques, the engine enables the operation of massive models that would otherwise exceed available system or video memory. The project distinguishes itself through a suite of optimization strategies that balance memory footprint with performance. It utilizes block-wise weight quantization and asynchronous layer prefetching to reduce resource consumption and hide data transfer latency. Additionally, the framework su
Reduces VRAM usage for large models using attention optimizations and parameter-efficient techniques to enable execution on consumer hardware.
Intel XPU LLM Acceleration Library is a toolkit designed to accelerate large language model inference and finetuning on Intel CPUs, GPUs, and NPUs. It provides a distributed inference engine for scaling models across multiple accelerators, a multimodal model runtime for vision and speech tasks, and a low-bit model quantization tool for converting weights into INT4, FP8, and GGUF formats. The project features a parameter-efficient finetuning framework that enables model adaptation using QLoRA and DPO on Intel hardware. It distinguishes itself by providing specialized optimizations for Intel XP
Reduces memory usage during first token generation to support longer context windows.
HybridCLR is a hybrid C# execution engine and assembly loader designed for Unity. It provides a system for hot-updating C# logic across all platforms at runtime without requiring the application to be rebuilt or reinstalled. The project is distinguished by its mixed-mode execution, which runs unmodified code at native speed while using a high-performance interpreter for updated functions. It includes a generic type resolver that allows hot-updated code to use generic classes and functions regardless of whether they were pre-instantiated in the main binary. To protect proprietary source code,
Completely unloads existing assemblies from memory to allow for clean replacement of updated code.
sd-scripts is a suite of utilities designed for fine-tuning generative models, preprocessing datasets, and converting model weights. It provides a collection of scripts for executing Stable Diffusion training through methods such as DreamBooth, textual inversion, and full fine-tuning, alongside a framework for creating and managing Low-Rank Adaptation weights. The project features specialized capabilities for model weight conversion between different architectures and precision formats. It includes tools for merging adaptation weights into base models, extracting weights from trained models,
Reduces VRAM requirements during training and inference through block swapping, mixed precision, and latent caching.
gpt-fast es un motor de inferencia de transformadores de PyTorch diseñado para la generación de texto utilizando una implementación de librería de tensores nativa. Proporciona un runtime para ejecutar modelos de lenguaje grandes sin necesidad de extensiones externas en C++. El proyecto implementa decodificación especulativa para acelerar la generación utilizando un modelo borrador pequeño para la predicción de tokens y un modelo más grande para la verificación. Optimiza aún más el rendimiento a través de una etapa de pre-llenado compilada y una librería de paralelismo de tensores multi-GPU que fragmenta capas lineales a través de múltiples unidades de procesamiento gráfico. La eficiencia de la memoria se gestiona a través de un runtime cuantizado que soporta pesos int8 e int4 y cuantización de tensores agrupados. El sistema también incluye herramientas para la parametrización de arquitectura, tokenización de texto y evaluación de precisión de modelos utilizando arneses estandarizados.
Offers a high-performance implementation that optimizes the prefill stage through model compilation.
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
Adjusts the number of workers dedicated to prefill and decode phases separately based on real-time metrics.
DeepSeek-VL2 es un modelo de lenguaje grande multimodal y sistema de visión-lenguaje diseñado para analizar escenas visuales y generar texto descriptivo. Funciona como un modelo de respuesta a preguntas visuales y fundamentación visual (visual grounding), capaz de extraer información de documentos y localizar objetos o regiones específicas dentro de imágenes basadas en descripciones textuales. El proyecto utiliza una arquitectura de mezcla de expertos (mixture-of-experts) para procesar entradas combinadas de imagen y texto. Está optimizado para la inferencia mediante prellenado incremental, lo que reduce los requisitos de memoria de GPU en el hardware. El modelo cubre el análisis de datos multimodal y la comprensión de documentos visuales, incluyendo la interpretación de gráficos y diseños. Realiza inferencia visual y fundamentación para hacer coincidir consultas textuales con el contenido visual correspondiente.
Reduces GPU memory consumption during the initial prompt prefill stage via incremental processing.
FlashInfer is a library of high-performance GPU kernels purpose-built for accelerating large language model inference. It provides optimized implementations for attention operations (including flash attention, page attention, multi-head latent attention, and cascade attention) using paged key-value caches, fused kernel composition, and just-in-time compilation. The library also includes specialized kernels for mixture-of-experts layers, block-scaled low-precision quantization (FP8, FP4), and distributed collective communication. What distinguishes FlashInfer is its fused all-reduce communicat
Implements fused batch prefill kernels for variable-length sequences with ragged page tables.
Llama-swap es un orquestador de inferencia local y puerta de enlace API para modelos de lenguaje de gran tamaño. Funciona como un proxy de la API de OpenAI que gestiona el ciclo de vida de múltiples servidores de modelos locales, iniciándolos y deteniéndolos automáticamente para intercambiar modelos según los identificadores de las solicitudes entrantes. El proyecto destaca por su intercambio dinámico de modelos y optimización de hardware. Utiliza un control de concurrencia basado en matrices para definir qué modelos pueden ejecutarse simultáneamente y emplea una política de desalojo basada en costes para eliminar servidores inactivos de la memoria según los costes relativos de los recursos. El sistema proporciona una gestión integral de modelos, incluyendo alias de identificadores, filtrado de solicitudes y la ejecución de comandos de ciclo de vida para contenedores o máquinas virtuales. También incluye herramientas de observabilidad como un entorno de pruebas visual para modelos, monitorización del rendimiento del sistema en tiempo real y funciones de seguridad como verificación de claves API y cifrado TLS. Las actualizaciones de configuración se gestionan mediante recarga dinámica, que monitoriza el sistema de archivos en busca de cambios sin necesidad de reiniciar manualmente.
Removes inactive models from memory after a specific timeout period to free up system resources.
CTranslate2 is a C++ inference engine and runtime for Transformer models, designed to execute models on both CPU and GPU with optimizations for speed and memory efficiency. It functions as a model format converter, quantization tool, and REST API server, enabling deployment of neural machine translation, automatic speech recognition, and text generation models. The engine distinguishes itself through a suite of runtime optimizations including layer fusion, weight-matrix quantization, batch-by-length grouping, and a caching allocator that reuses GPU memory. It supports tensor-parallel model di
Releases GPU memory by moving a loaded model to CPU or fully unloading it, then reloads it later on demand.
This project is a headless large language model inference engine and server manager designed for local deployments. It provides a developer toolkit and API gateway that allows for the management of model lifecycles and inference tasks without a graphical user interface. The system enables the deployment of model engines across different operating systems, cloud environments, or CI pipelines. It includes a command-line interface for bootstrapping development projects and automating the orchestration of loading and unloading model binaries based on specific workflow needs. The toolset covers i
Removes a loaded model from memory to free resources, optionally unloading all models at once.
FastDeploy is a high-performance deployment framework for large language models, vision models, and multimodal models. It provides the infrastructure to launch model services that process combined image, video, and text inputs, exposing these capabilities through a standardized, OpenAI-compatible API for chat and text completions. The project distinguishes itself through advanced inference pipeline engineering and GPU optimization. It employs speculative decoding, tensor parallelism, and a disaggregated execution model that separates prefill and decode phases across different hardware resourc
Splits large input sequences into smaller subtasks to prevent memory errors during the initial prefill stage.
mini-sglang is a collection of tools for large language model inference, serving as an OpenAI-compatible inference server, a memory-efficient prefill engine, and a tensor parallelism runtime. It also functions as a local batch processing engine for offline benchmarking and ablation studies. The project focuses on acceleration and memory management through a KV cache manager that reuses precomputed caches for shared request prefixes. It handles large model workloads by distributing tasks across multiple GPUs and manages peak memory consumption by splitting long input sequences into smaller chu
Implements chunked prefill execution to maintain a constant memory ceiling during initial sequence processing.