30 dépôts
Techniques for reducing memory consumption during deep learning model training.
Distinct from Memory Optimization Strategies: Distinct from general Memory Optimization Strategies: focuses specifically on deep learning training techniques like gradient checkpointing and fused operations.
Explore 30 awesome GitHub repositories matching data & databases · Training Memory Optimizers. Refine with filters or upvote what's useful.
Swin-Transformer is a deep learning framework designed for training and deploying hierarchical vision transformer models. It serves as a research library and toolkit for computer vision tasks, providing the infrastructure to build models that replace standard convolution operations with sliding window self-attention mechanisms. By utilizing a multi-scale feature hierarchy, the framework enables the processing of visual data at varying resolutions and spatial scales. The project distinguishes itself through its implementation of shifted window partitioning, which facilitates global information
Reduce memory footprint during model training by applying gradient checkpointing, fused operations, and efficient data caching strategies to keep resource consumption within hardware limits.
Swift is a toolkit for the full-parameter and parameter-efficient fine-tuning of large language and multimodal models. It functions as a multimodal model trainer for text, image, video, and audio data, and includes specialized tools for model compression and reinforcement learning from human feedback. The framework provides an alignment toolkit for optimizing model behavior using preference learning algorithms and reinforcement learning. It integrates parameter-efficient fine-tuning methods to adapt models with minimal memory and compute requirements, alongside utilities for reducing hardware
Optimizes attention and sequence data handling to reduce video memory consumption during long-text training.
MNN is a high-performance inference engine and framework designed for on-device machine learning. It provides a comprehensive environment for executing, optimizing, and deploying neural network models directly on mobile and resource-constrained edge devices. The framework distinguishes itself through a robust model optimization toolkit that supports quantization, compression, and structural graph manipulation to minimize memory footprint and maximize execution speed. It features a modular architecture that abstracts hardware-specific backends, allowing models to run efficiently across diverse
Configures low-precision inference modes to reduce memory footprint and improve execution speed.
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
Lowers VRAM requirements during training through quantization, low-rank adaptations, and reduced-precision fine-tuning.
This project is a quantized fine-tuning framework for large language models. It implements a low-rank adaptation library and a four-bit quantizer to reduce the GPU memory requirements needed to train large models. The framework utilizes four-bit quantization and low-rank adapters to enable model training on consumer-grade hardware. It further reduces the memory footprint through double quantization and a paged optimizer that offloads states to system RAM. The system supports distributed training across multiple GPUs to handle larger parameter scales and includes utilities for custom dataset
Ships a paged optimizer that offloads states to system RAM to handle memory spikes and reduce GPU requirements.
OpenRLHF is a training framework and alignment library designed for reinforcement learning from human feedback across distributed GPU clusters. It provides tools for aligning large language models and multimodal vision-language models using algorithms such as PPO, GRPO, and DPO. The framework distinguishes itself through a distributed inference engine that overlaps sample rollout with training to increase throughput. It supports scaling to models exceeding 70 billion parameters via parameter sharding and handles long-context sequences through ring-attention sequence parallelism. The project
Optimizes memory on small clusters by colocating model components and sharing resources via sleep-mode.
Sana is a framework for high-resolution image and video synthesis based on a linear diffusion transformer. It provides a toolkit for the training, fine-tuning, and execution of text-to-image and text-to-video models, as well as a video generative world model capable of simulating physical environments with precise spatial control. The project is distinguished by its use of linear complexity layers to handle high resolutions and its support for long-form, minute-length video generation in real time. It implements a two-stage inference paradigm that separates structural generation from visual t
Lowers training memory usage by offloading unused components to the system processor and utilizing 8-bit optimizers.
bitsandbytes is a quantization library for large language models that reduces memory footprints using k-bit quantization. It provides a framework for 4-bit low-rank adaptation, tools for 8-bit model compression, and memory-efficient optimizer extensions for PyTorch. The project enables the training of large models on limited hardware through 4-bit quantization and low-rank adaptation weights. It also facilitates faster inference by compressing models to 8-bit precision using vector-wise quantization. The library covers a range of memory optimization capabilities, including optimizer memory r
Implements memory-efficient optimizers using block-wise quantization to maintain full precision performance.
bitsandbytes is a deep learning quantization tool and library designed to reduce the memory footprint of large language models. It serves as a GPU memory optimizer and quantization framework, compressing model weights and features to 8-bit and 4-bit precision to enable inference and training on hardware with limited memory. The project provides a framework for low-rank adaptation, allowing the fine-tuning of quantized models by combining 4-bit weights with small trainable matrices. It further distinguishes itself through memory paging, which moves optimizer states between CPU and GPU memory t
Reduces GPU memory footprint for large language models via weight and feature quantization.
Ce projet est un framework de détection d'objets PyTorch qui implémente l'architecture Faster R-CNN. Il sert de modèle de vision pour prédire des boîtes englobantes précises autour de multiples objets dans des images et des flux vidéo en direct. Le système est optimisé pour l'entraînement multi-GPU afin de réduire le temps requis pour la convergence du modèle. Il utilise une conception accélérée par GPU pour gérer l'entraînement et l'inférence de réseaux de détection complexes. Le framework couvre le cycle de vie complet de la détection d'objets, y compris l'entraînement de réseaux personnalisés et l'inférence pour les images statiques et les flux vidéo en temps réel. Il inclut des capacités pour la validation des performances du modèle en utilisant des jeux de données standardisés, ainsi que des optimisations d'entraînement telles que le regroupement basé sur le rapport d'aspect et les charges de travail distribuées.
Implements throughput improvements through aspect-ratio-based grouping and multi-image batching to optimize training speed.
This project is a comprehensive educational curriculum and structured learning path covering the full lifecycle of large language models. It provides a guided progression through the theory, architecture, training, and deployment of these models. The curriculum includes specialized guides on transformer architecture, model training tutorials, and frameworks for designing autonomous agents. It also provides dedicated resources for studying model safety and ethics. The material covers a wide range of technical capabilities, including distributed training strategies, parameter-efficient fine-tu
Details the use of AdaFactor to reduce training memory via low-rank momentum approximations.
Provides comprehensive training memory optimization through state partitioning and offloading.
DeepSpeedExamples is a collection of reference implementations and scripts for training, fine-tuning, and executing inference on large-scale AI models using DeepSpeed optimization. It provides a distributed model training guide and practical workflows for adapting large language models through memory-efficient techniques. The repository includes specialized implementations for pipeline parallelism to handle models exceeding single GPU memory and a suite of examples for ZeRO memory optimization to reduce per-device overhead. It also features standardized test suites for benchmarking the throug
Implements mechanisms to move optimizer states from GPU memory to system RAM to support massive scales.
Tensorpack est un framework de réseau de neurones TensorFlow de haut niveau et une bibliothèque de recherche conçue pour construire et entraîner des modèles de deep learning. Il fournit une collection d'architectures de réseaux de neurones reproductibles pour la vision par ordinateur, les tâches génératives, l'apprentissage par renforcement et le traitement du langage naturel. Le projet se distingue par un pipeline de données de deep learning spécialisé qui utilise du Python pur pour le chargement et le streaming de données en parallèle. Il inclut un orchestrateur d'entraînement multi-GPU pour distribuer les charges de travail via des stratégies de parallélisme de données et un toolkit d'interprétabilité dédié pour visualiser la saillance des modèles et les cartes d'activation. Le framework couvre un large éventail de capacités, incluant des pipelines de vision par ordinateur pour la détection d'objets et la segmentation sémantique, la modélisation de séquences pour la parole et le texte, et le développement d'agents d'apprentissage par renforcement. Il fournit également des outils d'optimisation de modèle pour la quantification des poids et l'entraînement en faible précision, ainsi que des utilitaires pour reproduire des articles de recherche académique et convertir des poids de modèles Caffe legacy.
Reduces memory usage by training convolutional neural networks with limited bitwidth for weights and gradients.
Tensorpack est un framework d'entraînement TensorFlow haute performance et un toolkit de deep learning distribué. Il fournit une suite d'outils pour construire et entraîner des réseaux de neurones avec un accent sur la vitesse d'exécution et la flexibilité architecturale. Le projet sert de suite d'optimisation de réseaux de neurones, implémentant des modèles d'exécution à haute efficacité pour réduire la surcharge d'entraînement. Il fonctionne comme un pipeline de chargement de données parallèle, utilisant la parallélisation automatisée pour maximiser le débit lors du traitement de grands jeux de données. Le toolkit couvre l'entraînement distribué sur plusieurs GPU et clusters de calcul en utilisant des stratégies de parallélisme de données. Ses capacités incluent le traitement de jeux de données à grande échelle et l'optimisation des performances pour augmenter le débit d'entraînement.
Reduces training overhead and increases throughput using high-efficiency execution patterns.
Liger-Kernel is a collection of pre-built fused Triton kernels and patching utilities designed to accelerate large language model training. It provides drop-in kernel replacements for common LLM operations such as RMSNorm, cross-entropy loss, and attention, enabling increased throughput and reduced memory usage while preserving bitwise-exact gradients. The project serves as a toolkit for composing custom model architectures from individual optimized kernels and for patching pre-existing models with minimal code changes. The project distinguishes itself through its ability to perform runtime m
Provides fused kernels that cut memory usage by up to 80% during preference alignment fine-tuning.
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
Quantizes optimizer state dictionaries using 8-bit or paged optimizers to lower GPU memory consumption.
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
Combines packing, compilation, and activation checkpointing to reduce memory and increase training throughput.
RF-DETR is a Python library for training and deploying object detection, instance segmentation, and keypoint detection models built on a vision transformer architecture. It provides a unified command-line interface and Python API for the full workflow, from fine-tuning pretrained checkpoints on custom datasets to running inference on images, video files, and live camera streams. The project supports training on datasets in COCO or YOLO format, with automatic format detection and configurable augmentation pipelines. Models can be exported to ONNX, TFLite, or TensorRT for deployment across edge
Reduces GPU memory by re-computing activations in the backward pass instead of storing them.
Composer est un framework d'entraînement distribué PyTorch conçu pour mettre à l'échelle des modèles de grande taille sur des clusters GPU multi-nœuds. Il fonctionne comme un entraîneur de grands modèles de langage, un optimiseur de modèle distribué et un gestionnaire de cycle de vie d'entraînement. Le projet se différencie en tant que bibliothèque de régularisation pour le deep learning, fournissant des techniques d'optimisation spécialisées telles que Sharpness Aware Minimization, MixUp et CutMix pour améliorer la généralisation des modèles. Il distingue davantage son flux d'entraînement par l'utilisation du warmup de longueur de séquence, du gel progressif des couches et du checkpointing d'état fragmenté pour la récupération de modèles à grande échelle. Le framework couvre une large surface de capacités, incluant l'orchestration de l'entraînement distribué, la gestion du matériel en précision mixte et le streaming de données cloud-native. Il fournit également des outils étendus de surveillance et d'observabilité pour les diagnostics de mémoire GPU, la détection de divergence d'entraînement et le suivi du débit. Le projet inclut un lanceur en ligne de commande pour automatiser l'exécution de tâches d'entraînement multi-GPU sur plusieurs nœuds.
Lowers the peak memory footprint by freeing training metric memory immediately after loss calculation.