20 个仓库
Techniques for maximizing memory throughput and minimizing latency on GPU hardware, such as swizzling and double buffering.
Distinguishing note: Candidates refer to OS memory banking, process communication buffers, or AI agent context memory, not hardware-level GPU memory layout optimization.
Explore 20 awesome GitHub repositories matching operating systems & systems programming · GPU Memory Optimizations. Refine with filters or upvote what's useful.
LeetCUDA is a collection of high-performance GPU kernel libraries focusing on memory optimization, activation functions, and attention mechanisms. It serves as a reference library for CUDA kernel implementations, ranging from basic element-wise operations to complex neural network components, and provides Python bindings to integrate these kernels into deep learning workflows. The project is distinguished by its focus on low-level hardware optimizations. This includes the use of tensor cores for half-precision matrix multiplication, asynchronous data pipelining with double buffering, and shar
Implements shared memory swizzling, double buffering, and vectorized access to maximize GPU memory throughput.
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
Reduces GPU memory footprint through gradient checkpointing and offloading optimizer states to secondary storage.
PowerInfer is an inference engine and serving framework designed to run large language models on local hardware. It combines a hybrid CPU-GPU offloader, a quantization tool, and a sparse model optimizer to enable the execution of high-parameter models on consumer-grade devices. The system distinguishes itself through neuron-activation-based offloading, using a predictor model to preload frequent neurons into VRAM while keeping rare neurons in system memory. This hybrid execution model balances workloads between the GPU and CPU based on input patterns to optimize memory access and increase tok
Optimizes memory access by preloading frequent neurons onto the GPU and computing rare ones on the CPU.
FlexLLMGen is an inference engine and runtime designed to run large language models on a single GPU by combining weight compression with tensor offloading. It reduces model weight memory usage by approximately 70% through 4-bit quantization, and stores model parameters, attention cache, and hidden states across GPU, CPU, and disk to fit models larger than available GPU memory. The project distinguishes itself through a throughput-oriented batching approach that processes multiple generation requests together in large batches to maximize throughput on a single GPU. It also supports distributed
Stores model parameters, attention cache, and hidden states across GPU, CPU, and disk to fit models larger than available GPU memory.
FlexGen is an inference engine for large language models designed for high-throughput execution on single or multiple GPUs. It functions as a framework for managing model execution through a combination of memory offloading, weight compression, and pipeline orchestration. The system enables the execution of models that exceed available GPU memory by moving tensors and caches between GPU memory, system RAM, and disk storage. It utilizes 4-bit weight quantization to reduce the memory footprint of model parameters, allowing for increased batch processing capacity. The project covers distributed
Implements a mechanism to move model tensors between GPU memory, system RAM, and disk.
PowerInfer is a high-performance local large language model inference engine and sparse inference framework. It provides a runtime for executing models on consumer-grade hardware, utilizing a GPU acceleration backend to optimize tensor operations for graphics processors. The system distinguishes itself through a sparse inference framework that increases generation speed by skipping computations based on activation sparsity in model weights. It includes a GGUF model converter for transforming weights and metadata into a unified binary format, as well as an OpenAI API compatible server for inte
Offloads model tensors and dense layers to video memory to increase computation speed.
This project is a comprehensive collection of educational examples and reference implementations for building vision and language models using PyTorch. It serves as a deep learning tutorial covering the end-to-end process of developing neural networks, from initial architecture definition to final production deployment. The repository provides detailed guides on implementing a wide range of domain-specific models, including convolutional neural networks for object detection and segmentation, as well as transformer and recurrent architectures for natural language processing. It emphasizes gene
Tracks GPU memory usage relative to input token counts to optimize hardware resource allocation.
This project is a suite of analytical tools for quantifying web performance, specifically designed for benchmarking the rendering speed and memory usage of various JavaScript frameworks. It provides a standardized set of DOM manipulation tests and a comparison tool that uses weighted geometric means to measure efficiency across different web implementations. The benchmark harness distinguishes itself by providing deep analysis of DOM reconciliation strategies, comparing the performance and correctness of keyed versus non-keyed rendering. It also includes a memory profiler for tracking allocat
Monitors memory consumption and overhead specifically for the runtime engine during DOM update cycles.
JerryScript is a lightweight, ECMAScript-compliant JavaScript engine and bytecode compiler designed for resource-constrained devices. It serves as an embedded interpreter and IoT scripting runtime, enabling the execution of JavaScript code within native C applications on hardware with limited memory. The project differentiates itself through a focus on low-memory runtime management, utilizing bytecode precompilation and pre-compiled state snapshots to reduce startup time and memory overhead. It features a C-binding native bridge for bidirectional communication between native code and scripts,
Measures engine overhead by recording memory usage during runtime or termination.
Flash Linear Attention is a training framework and inference engine for sequence models that use linear attention and state space mechanisms, designed to process long contexts with reduced memory and compute overhead. It provides hardware-optimized token mixing layers and fused CUDA kernels that minimize memory bandwidth and launch overhead across different GPU architectures, and includes a causal inference engine that generates text token-by-token using cached hidden states for efficient autoregressive decoding. The project supports building hybrid sequence models that interleave standard at
Runs fused GPU kernels for token mixing operations that minimize memory bandwidth and launch overhead across different GPU architectures.
NCCL 是一个高性能通信库和分布式 GPU 计算框架,专为在单节点或多节点系统中的多个 GPU 之间执行集合和点对点数据交换而设计。它充当 RDMA GPU 传输层和内存编排器,为分布式 GPU 训练和推理提供高带宽的数据和模型梯度同步。 该库的特色在于能够直接从 GPU 内核执行通信原语,将主机 CPU 从关键路径中移除。它利用拓扑感知路径选择来优化数据移动,并采用包括 InfiniBand 和 NVLink 在内的基于 RDMA 的网络传输,以实现设备跨不同物理节点之间的零拷贝内存访问。 该项目涵盖了广泛的集合通信模式,包括归约(Reductions)、广播(Broadcasts)、收集(Gathers)和全对全交换(All-to-all exchanges),以及点对点远程内存访问。它提供全面的通信器管理,用于初始化、分区和调整 GPU 组大小,以及用于注册缓冲区和协调共享设备内存的专用内存管理。 该系统包括一套用于健康跟踪、诊断日志记录和实时事件监控的监控与可观测性工具,以及用于机器学习框架、CUDA Graphs、MPI 和 Python 的集成接口。
Monitors and logs GPU memory usage, distinguishing between persistent and suspendable allocations.
这是一个关于使用 PyTorch 构建神经网络的综合教学资源和课程。它涵盖了深度学习的基本构建块,包括张量操作、自动微分以及模块化神经网络组件的构建。 该仓库是多个专业领域的参考指南。它提供了计算机视觉任务(如图像分类、目标检测和语义分割)的实现细节,以及涉及 Transformer、循环网络和生成模型的自然语言处理工作流。此外,它还包括生成式 AI 的参考资料,专门关注通过扩散模型和对抗网络进行图像合成。 材料延伸至模型优化和部署流水线。它涵盖了通过量化和将模型导出为 ONNX 和 TensorRT 等格式来减小模型大小并提高推理速度的技术。其他能力领域包括用于并行加载的数据工程、使用自定义指标的模型评估,以及开源大语言模型的部署。 该项目主要以一系列 Jupyter Notebook 的形式提供。
Monitors GPU memory usage relative to input length to determine optimal context truncation limits.
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,
ExecuTorch monitors peak and per-operator memory consumption to optimize resource usage on constrained hardware.
oneDNN 是一个深度学习加速库,为神经网络训练和推理提供优化的构建块。它管理跨 CPU 和 GPU 硬件的张量计算,支持执行用于模型训练和神经网络推理优化的高性能原语。 该项目通过硬件特定的内核优化和使用即时编译来针对特定处理器指令集脱颖而出。它支持使用静态和动态量化来执行量化神经网络,以减少内存使用并提高吞吐量。 该库涵盖了广泛的功能,包括卷积、矩阵乘法和循环神经网络执行等深度学习原语。它实现了先进的性能优化,包括操作融合、计算图优化和内存格式管理。通过稳定的 C ABI 和 C++ 包装器提供集成,并支持 SYCL、OpenCL 和外部线性代数库。 该系统包括用于硬件性能分析、原语基准测试和详细执行日志记录的观测工具。
Optimizes memory throughput by managing format propagation and reordering data between CPU and GPU engines.
imapsync is an IMAP mailbox synchronization tool and data migration utility designed to copy and synchronize email messages and folder structures between two IMAP servers. It functions as a migration manager for transferring bulk email accounts between different hosting providers, preserving folder hierarchies and message metadata. The tool is distinguished by its ability to automate the transfer of multiple mailboxes sequentially from delimited lists using administrative credentials or user-specific authentication. It supports advanced authentication methods including OAuth2 and XOAUTH2, and
Saves memory during large folder synchronizations by using unique identifiers instead of full message headers.
Lorax is a GPU-accelerated inference server and multi-adapter engine designed for serving large language models. It functions as a high-throughput system capable of deploying models via Kubernetes and managing the dynamic swapping of Low-Rank Adaptation adapters per request. The server distinguishes itself through multi-adapter dynamic batching, which allows requests using different adapter weights to be processed in a single GPU forward pass. It employs just-in-time adapter loading and weighted adapter merging to maximize throughput and enable multi-tasking without sacrificing performance.
Optimizes throughput by asynchronously prefetching and offloading adapters between GPU and CPU memory.
MIRIX is an AI agent state orchestrator and long-term memory system designed to provide persistent context for large language models. It functions as a multi-modal AI memory pipeline that processes text, voice, and screen captures into structured knowledge stores, including a dedicated screen activity knowledge base. The project distinguishes itself by integrating a multi-modal observation pipeline that monitors desktop activity in real-time to build a searchable history of user actions. It utilizes a multi-tiered memory hierarchy—separating episodic, semantic, procedural, and core stores—and
Provides control over whether incoming information is processed immediately or batched for background memory updates.
llm-compressor is a quantization toolkit and post-training library designed to reduce the memory footprint and size of large language models. It provides a framework for compressing models using weight and activation quantization to enable more efficient deployment. The project distinguishes itself through a distributed quantization framework that utilizes data-parallel processing and disk-based weight offloading to handle massive model checkpoints that exceed available system memory. It includes specialized compressors for diverse architectures, including Mixture-of-Experts, Vision-Language,
Utilizes sequential onloading and disk offloading to quantize models that exceed available system memory.
llm-d is a distributed serving framework designed for large language model inference. It functions as an inference orchestrator and gateway, providing a control plane for deploying model replicas and managing hardware accelerators. The system includes a batch inference scheduler and a cache manager to coordinate request flow and memory utilization. The project is distinguished by a disaggregated serving architecture that separates prefill and decode execution phases across specialized workers to maximize throughput. It employs a hardware-agnostic control plane and tiered cache offloading, mov
Implements tiered cache offloading by moving memory blocks between GPU memory, host RAM, and shared storage for long-context workloads.
RLinf is a distributed reinforcement learning orchestrator and embodied AI training framework. It provides the infrastructure to train vision-language-action models and robotic policies using a combination of reinforcement learning and supervised fine-tuning. The system is designed for scaling workloads across GPU clusters, managing the placement of actors, rollout workers, and environment components. It features a specialized robotics data collection pipeline for gathering teleoperated demonstrations and simulation trajectories into standardized replay buffers, alongside a hardware interface
Manages the movement of weights, gradients, and optimizers between memory tiers to prevent out-of-memory errors.