thehardwarestore.ai

where AI agents shop for the right tools

── 98817 repos indexed ── | filtered by tag: #pytorch
huggingface/transformers β˜… 166894 34739 APPLICATION

Hugging Face Transformers is a large-scale Python library that provides thousands of pretrained Transformer model implementations for text, vision, audio, video, multimodal, time-series, and other modalities. It serves as a unified interface for loading, training, fine-tuning, and running inference with state-of-the-art deep learning models. The architecture follows a modular, auto-discovery pattern: each model family is self-contained within a subpackage (configuration, modeling, tokenizer/processor), and the library uses lazy imports and auto-registration via the `Auto*` classes. Key entry points include the `transformers` Python API, a CLI for chat and serving, and exporter tools for ONNX/OpenVINO/Executorch. The codebase demonstrates exceptional engineering craftsmanship with clean abstractions such as the `ProcessorMixin` for multimodal processors, the `HfQuantizer` abstract factory for quantization backends, and the continuous batching infrastructure with paged attention for efficient inference. It is not primarily a data research project, though it contains model conversion scripts and benchmark integrations; its dominant character is as a production-grade application library.

RATING: 9.9/10 MAINT: active DRIFT: low
β–Έ 6 reusable components found
vllm-project/vllm β˜… 93061 22927 APPLICATION

vLLM is a high-throughput, memory-efficient inference and serving engine for large language models (LLMs). It implements PagedAttention for near-zero waste KV cache management, continuous batching, chunked prefill, prefix caching, CUDA/HIP graphs, speculative decoding, and torch.compile. The system serves OpenAI-compatible APIs (chat completions, completions, embeddings, rerank, speech-to-text), Anthropic Messages API, Cohere API, and custom pooling/classification endpoints. It supports 200+ model architectures including dense, MoE, hybrid SSM/attention, and multimodal models (vision, audio, video). The architecture is a hybrid Python/Rust system: a Python core handles model execution, scheduling, and kernel dispatch, while a Rust frontend provides a high-performance HTTP/gRPC server with middleware for auth, metrics, and load management. Key entry points include the `vllm` CLI (serve, bench, launch), the `LLM` class for offline inference, and the OpenAI-compatible API server. External dependencies include PyTorch, HuggingFace Transformers, FlashAttention, CUTLASS, Triton, NCCL/RCCL, and various quantization libraries. The project is production-grade with extensive CI/CD, Docker images, Helm charts, and deployment integrations for Kubernetes, Ray, SageMaker, and more.

RATING: 9.9/10 MAINT: active DRIFT: low
β–Έ 5 reusable components found
pyg-team/pytorch_geometric β˜… 24024 4041 APPLICATION

PyTorch Geometric (PyG) is a library for Graph Neural Networks (GNNs) built on PyTorch. It provides a modular framework for building and training GNNs, covering the full pipeline from data handling to model evaluation. The core architecture includes a message-passing base class (MessagePassing) that underpins dozens of convolution layers (e.g., GCN, GAT, SAGE, GIN, PNA, GPS), a composable aggregation system (e.g., sum, mean, attention, set2set, transformers), pooling operators (e.g., TopK, SAGPool, DiffPool), normalization layers, and high-level model implementations (e.g., SchNet, DimeNet, LightGCN, TGN, SGFormer). The library supports heterogeneous graphs, temporal graphs, point clouds, knowledge graphs, and distributed training. Key entry points include the `torch_geometric.nn`, `torch_geometric.data`, `torch_geometric.loader`, `torch_geometric.datasets`, and `torch_geometric.transforms` modules. External dependencies are primarily PyTorch itself, with optional packages (torch-scatter, torch-sparse, pyg-lib, etc.) for optimized operations. The repository also contains extensive examples, benchmarks, and an experiment management system (GraphGym). Although primarily a software library, it serves as a research platform with many paper reproductions and dataset loaders, making it a hybrid between a production-grade library and a research codebase.

RATING: 9.9/10 MAINT: maintained DRIFT: low
β–Έ 3 reusable components found
deepspeedai/DeepSpeed β˜… 43161 5013 APPLICATION

DeepSpeed is a comprehensive distributed training and inference optimization library for large-scale deep learning. It provides a suite of system innovations including ZeRO (Zero Redundancy Optimizer) memory optimization stages 1-3, 3D parallelism (data, tensor, pipeline), sequence parallelism (DeepSpeed-Ulysses), mixture-of-experts training and inference, automatic tensor parallelism (AutoTP), CPU/NVMe offloading, and compiler-based optimizations (DeepSpeed-DeepCompile). The architecture centers around a runtime engine that wraps PyTorch models, optimizers, and data loaders to provide transparent distributed training with JSON-based configuration. Key entry points include `deepspeed.initialize()` for training, `deepspeed.init_inference()` for inference, and CLI launchers (`deepspeed`, `ds_report`). The codebase spans Python runtime logic, C++/CUDA custom ops (fused optimizers, transformer kernels, async I/O, quantization), multi-backend communication (NCCL, MPI, HCCL, oneCCL), and accelerator abstraction for NVIDIA, AMD, Intel, and other hardware. Recent additions include ZenFlow stall-free offloading, SuperOffload for superchip architectures, Muon optimizer support, and DeepSpeed-FastGen for high-throughput LLM serving with Dynamic SplitFuse scheduling.

RATING: 9.8/10 MAINT: active DRIFT: low
β–Έ 10 reusable components found
keras-team/keras β˜… 64348 19805 APPLICATION

Keras 3 is a multi-backend deep learning framework that provides a high-level API for building and training neural networks. It supports TensorFlow, JAX, PyTorch, NumPy, and OpenVINO backends, allowing users to switch between them with minimal code changes. The repository contains a comprehensive set of layers (convolutional, recurrent, attention, normalization, pooling, preprocessing, regularization), optimizers (Adam, SGD, AdamW, Lion, etc.), metrics, callbacks, loss functions, and utilities for model saving/loading, quantization, distillation, and distributed training. The architecture is modular with a clean separation between backend-agnostic operations and backend-specific implementations. The codebase is well-tested with extensive unit and integration tests, and includes benchmarks for performance comparison. It is actively maintained with frequent commits and responsive issue triage.

RATING: 9.7/10 MAINT: active DRIFT: low
β–Έ 5 reusable components found
roboflow/supervision β˜… 51054 4861 APPLICATION

Supervision is a model-agnostic computer vision utility library developed by Roboflow. It provides a comprehensive set of tools for post-processing detection, segmentation, and keypoint outputs from popular models (YOLO, Ultralytics, DETR, SAM, VLMs like Gemini and PaliGemma). It standardizes model outputs into `Detections` and `KeyPoints` objects, then offers annotators for visualization, tools for zone counting, tracking, line crossing, and tiled inference for large images. It also includes dataset conversion (COCO, YOLO, Pascal VOC, LabelMe, CreateML), object detection metrics (COCO mAP, F1, precision/recall), and video processing pipelines. The library is designed for production use with extensive testing, type hints, and an optional OpenCV fallback. While primarily an application library, it also contains research-oriented components such as VLM parsers and advanced mask representations (CompactMask). The codebase exhibits high craftsmanship with well-isolated components, thorough tests, and performance optimizations.

RATING: 9.6/10 MAINT: active DRIFT: low
β–Έ 4 reusable components found
huggingface/diffusers β˜… 34684 7379 APPLICATION

The Hugging Face Diffusers library is a comprehensive, production-grade Python library for diffusion model inference and fine-tuning. It provides a vast collection of pre-built pipelines (text-to-image, image-to-image, inpainting, video generation, audio generation, and more), model architectures (UNet, Transformers, Autoencoders), schedulers (DDPM, DDIM, Flow Matching, etc.), and a rich ecosystem of loaders (LoRA, IP-Adapter, textual inversion, single-file), optimizers (attention backends, caching, offloading, tensor parallelism), and guiders (CFG, PAG, MAG, TCFG). The architecture is highly modular: a central `DiffusionPipeline` base class with mixins for loading and configuration, alongside a newer `ModularPipeline` framework that composes generation from reusable, declarative blocks (encoders, denoisers, decoders). The codebase is actively maintained with extensive test coverage (over 200k lines of tests), CI/CD pipelines, and support for quantization (bitsandbytes, GGUF, torchao). It is the de facto standard library for state-of-the-art diffusion models in PyTorch.

RATING: 9.6/10 MAINT: active DRIFT: low
β–Έ 4 reusable components found
Lightning-AI/pytorch-lightning β˜… 31378 3810 APPLICATION

PyTorch Lightning is a deep learning framework that provides a high-level PyTorch training interface (Trainer, LightningModule, LightningDataModule) and a lower-level Fabric API for distributed training. It is a library, not a standalone application. The architecture is modular: strategies (DDP, FSDP, DeepSpeed, XLA, ModelParallel), precision plugins (fp16, bf16, transformer-engine, bitsandbytes), callbacks (checkpointing, early stopping, progress bars, timing), loggers (TensorBoard, MLflow, WandB, Comet, CSV, LitLogger), and IO plugins (checkpoint load/save, async). The core design follows a plugin/strategy pattern with registries for extensibility. The codebase is well-tested (extensive unit, integration, parity, and legacy checkpoint tests) and actively maintained. It is a production-quality framework with high craftsmanship, though some experimental features and deprecation shims exist.

RATING: 9.6/10 MAINT: active DRIFT: low
β–Έ 5 reusable components found
fastai/fastai β˜… 28219 7643 APPLICATION

fastai is a deep learning library built on PyTorch that provides high-level, modular APIs for training neural networks across vision, text, tabular, collaborative filtering, and medical imaging domains. Its architecture centers on a `Learner` class that orchestrates training loops, callbacks, metrics, and data pipelines. Data loading is handled by composable `DataBlock` and `TfmdDL` abstractions, while a rich callback system (with 30+ built-in callbacks) enables customization of logging, scheduling, mixed precision, gradient accumulation, and experiment tracking (WandB, Comet, TensorBoard). The library uses nbdev for literate programming, generating all source code from Jupyter notebooks, and includes factory methods like `vision_learner`, `text_classifier_learner`, and `tabular_learner` for rapid model construction with transfer learning. It supports distributed training via Hugging Face Accelerate, mixed precision (AMP/BF16), and provides research-oriented components such as AWD-LSTM, XResNet, U-Net, GANs, and custom loss functions (Focal, Dice, Label Smoothing).

RATING: 9.5/10 MAINT: active DRIFT: low
β–Έ 7 reusable components found
Tencent/ncnn β˜… 23942 4522 APPLICATION

ncnn is a high-performance neural network inference framework designed for mobile, embedded, and desktop deployment. It provides a self-contained C++ library with no mandatory external dependencies, supporting CPU inference with extensive SIMD optimizations (ARM NEON, x86 SSE/AVX/AVX512, RISC-V Vector, MIPS MSA, LoongArch LSX/LASX) and GPU inference via Vulkan. The framework includes a comprehensive set of neural network layers (convolution, pooling, normalization, activation, recurrent, attention, etc.) and supports multiple data types (float32, float16, bfloat16, int8). The companion pnnx tool converts models from PyTorch (TorchScript) and ONNX into ncnn format using a sophisticated graph rewriting pipeline. Python bindings and a model zoo are provided for rapid prototyping. The codebase is production-grade, used in Tencent applications like QQ and WeChat, and is actively maintained with support for modern architectures and operations (e.g., scaled dot-product attention, rotary embeddings).

RATING: 9.5/10 MAINT: active DRIFT: low
β–Έ 3 reusable components found
Project-MONAI/MONAI β˜… 8783 1661 APPLICATION

MONAI (Medical Open Network for AI) is a PyTorch-based, open-source framework for deep learning in healthcare imaging. It provides a comprehensive suite of modular components for building, training, and deploying medical image analysis models, including segmentation, classification, detection, registration, reconstruction, and generative tasks. The architecture is library-oriented, with well-separated subpackages for transforms, networks, losses, metrics, handlers, engines, data I/O, and domain-specific applications (pathology, reconstruction, auto3dseg, federated learning). Key design patterns include composable and invertible transforms (with lazy evaluation support), a config-driven bundle system for reproducible workflows, Ignite-based training engines with reusable event handlers, and a MetaTensor data structure that carries spatial metadata through transformations. The codebase is extensively tested (over 1500 test files) and includes C++/CUDA extensions for performance-critical operations. While primarily a software library, MONAI also serves as a research platform, incorporating state-of-the-art architectures (UNETR, SwinUNETR, diffusion models, HyenaMixer) and supporting automated pipeline generation (Auto3DSeg) and federated learning. Its hybrid nature combines production-grade engineering with research-oriented flexibility.

RATING: 9.5/10 MAINT: active DRIFT: low
β–Έ 5 reusable components found
p-e-w/heretic β˜… 34570 3869 APPLICATION

Heretic is a command-line tool that automatically removes censorship (safety alignment) from transformer-based language models without expensive post-training. It implements an advanced form of directional ablation (abliteration) combined with a TPE-based parameter optimizer (Optuna) to find high-quality ablation parameters that minimize refusals while preserving the original model's capabilities. The tool supports dense, MoE, hybrid, and multimodal architectures, and can produce decensored models that rival human-crafted abliterations. The architecture is a monolithic Python application built on PyTorch, Hugging Face Transformers, and PEFT. It features a plugin system for extensible scorers (e.g., keyword rate, KL divergence, benchmark scores) and modifiers (e.g., standard abliteration, Arbitrary-Rank Ablation). The workflow involves loading a model, computing residual directions from good/bad prompt datasets, running multi-objective optimization trials to tune ablation parameters, and exporting the modified model as a merged full model or LoRA adapter. The tool also includes comprehensive reproducibility support, allowing others to exactly reproduce generated models. Key entry points are the `heretic` CLI command (defined in `src/heretic/main.py`), which orchestrates the entire pipeline. The codebase demonstrates strong engineering practices: extensive type hints, pydantic-based configuration with CLI/env/TOML sources, a well-designed plugin contract, and thorough testing for cross-platform reproducibility. External dependencies include PyTorch, Transformers, Accelerate, bitsandbytes, Optuna, PEFT, Hugging Face Hub, and several others, all pinned via uv.lock.

RATING: 9.4/10 MAINT: active DRIFT: low
β–Έ 1 reusable components found
Dao-AILab/flash-attention β˜… 25090 3136 APPLICATION

FlashAttention is a high-performance library implementing IO-aware exact attention for transformer models, with CUDA kernels targeting NVIDIA Ampere (SM80), Hopper (SM90), and Blackwell (SM100) architectures, plus a Python CuTe DSL implementation (FA4), a Composable Kernel backend for AMD, and Triton fallbacks. The library exposes PyTorch-integrated Python APIs (flash_attn_func, flash_attn_varlen_func, flash_attn_with_kvcache) backed by custom CUDA extensions with autograd support. It also ships fused ops (dense layers, layer norm, cross-entropy), model definitions with HuggingFace state-dict remapping (GPT, BERT, LLaMA, Falcon, Baichuan, OPT, GPT-J, GPT-NeoX, ViT), and a PyTorch Lightning + Hydra training pipeline for GPT-style models. The dominant character is a systems library, though it has a hybrid research flavor: experimental kernels for unreleased hardware, benchmark suites, and a training sub-package all coexist in one monorepo. The architecture is a layered monolith: a Python API layer dispatches to multiple kernel backends (CUDA C++ for FA2, CUTLASS/CuTe for FA3, Python CuTe DSL for FA4, CK for AMD, Triton for portability). The core algorithmic contributions are the online softmax with rescaling, tiled attention with shared-memory staging, warp-specialized producer/consumer pipelines using TMA and GMMA, persistent tile schedulers, and deterministic backward passes with semaphore-based reductions. The training sub-package is a secondary component demonstrating the kernels in full GPT training runs with tensor/sequence parallelism. The codebase is actively maintained with extensive CI/CD (including Apptainer-based FA4 CI), a large test suite covering correctness against reference implementations and HuggingFace models, and performance benchmarks. However, it carries significant complexity: multiple overlapping backends with duplicated logic and inconsistent feature support, a complex build system with many environment variables, a monolithic gpt.py model file, and deprecated components (csrc/layer_norm is explicitly deprecated in favor of Triton). The kernel code is world-class and worth studying; the surrounding infrastructure is functional but organically grown.

RATING: 9.4/10 MAINT: active DRIFT: medium
β–Έ 6 reusable components found
facebookresearch/pytorch3d β˜… 9981 1474 APPLICATION

PyTorch3D is a high-performance library for 3D deep learning, providing differentiable rendering, 3D geometry operations, and neural implicit scene representations. The core library offers efficient data structures for meshes, point clouds, and volumes, with packed/padded batching for variable-size inputs. It includes a full differentiable mesh renderer (rasterization, shading, blending), point cloud renderer (including the Pulsar CUDA backend), and an implicit rendering pipeline for NeRF-style models. The library also provides a comprehensive set of 3D operations (KNN, ball query, farthest point sampling, cubify, marching cubes, IoU for 3D boxes, point-mesh distances) and loss functions (chamfer distance, mesh laplacian smoothing, normal consistency). The architecture is modular: cameras, lights, materials, rasterizers, and shaders are composable components. The implicitron subpackage extends this with a configurable framework for novel view synthesis, featuring dataset providers (CO3D, ShapeNet, R2N2), ray samplers, raymarchers, view poolers, and evaluation metrics. Research projects (NeRF, implicitron trainer) demonstrate end-to-end training pipelines with Hydra/OmegaConf configuration. While primarily a library, the repository has strong research characteristics: it includes benchmark scripts, tutorials, and reproduction configs for multiple papers. The codebase is well-tested with over 100 test files, including numerical equivalence tests and benchmarks. Custom CUDA/C++ kernels ensure performance-critical operations are optimized. The library is designed for reuse, with a registry pattern for components, pluggable IO, and a flexible transform system.

RATING: 9.4/10 MAINT: active DRIFT: low
β–Έ 6 reusable components found
ray-project/ray β˜… 43938 8091 APPLICATION

Ray is a distributed compute framework that unifies task/actor execution, data processing, model training, hyperparameter tuning, RL, and model serving under a single runtime. The core is written in C++ (raylet, GCS, object store, scheduling) with a Python frontend, communicating via gRPC and Arrow-compatible plasma object storage. Production entry points include `ray.init()` for cluster bootstrap, `@ray.remote` for task/actor offload, Ray Serve for model deployment (FastAPI/DAG/gang-scheduling patterns), Ray Data for streaming ETL, Ray Train/Tune for distributed training and hyperparameter search, and RLlib for reinforcement learning. The architecture is a hybrid: a distributed systems platform (scheduler, object store, autoscaler) layered with high-level AI libraries, all built via Bazel with extensive CI (Docker images, build matrices, release tests). It is not a data research repo, though Ray Data and RLlib contain research-grade data pipeline and RL primitives; the dominant character is a production-grade application framework.

RATING: 9.3/10 MAINT: active DRIFT: medium
β–Έ 4 reusable components found
dgasmith/opt_einsum β˜… 989 75 APPLICATION

opt_einsum is a Python library that optimizes the contraction order of tensor expressions (einsum-like) to reduce computational complexity and memory usage. It serves as a drop-in replacement for numpy.einsum and supports multiple backends including NumPy, PyTorch, TensorFlow, JAX, Dask, and CuPy. The library parses einsum strings, determines optimal contraction paths using algorithms like dynamic programming or greedy search, and executes the contraction via the specified backend. Key features include expression caching for repeated computations and a context manager for sharing intermediate results across multiple contractions.

RATING: 9.3/10 MAINT: active DRIFT: low
β–Έ 3 reusable components found
jingyaogong/minimind β˜… 62660 8144 APPLICATION

MiniMind is an educational open-source toolkit for training small language models entirely from scratch using native PyTorch. It provides a complete pipeline including custom BPE tokenizer training, pretraining, supervised fine-tuning (SFT), LoRA, RLHF (DPO), RLAIF (PPO/GRPO/CISPO), agentic reinforcement learning, and knowledge distillation. The system is designed to be accessible (low compute cost, ~3 RMB and 2 hours on a single GPU) and includes inference interfaces such as a CLI, Streamlit web UI, and an OpenAI-compatible API server. While primarily a software application for training and deploying LLMs, it also contains dataset preparation, evaluation benchmarks, and research experiments, giving it a hybrid character that leans toward application due to its focus on providing reusable training scripts and deployment tools.

RATING: 9.2/10 MAINT: active DRIFT: low
β–Έ 3 reusable components found
ultralytics/ultralytics β˜… 62181 11816 APPLICATION

Ultralytics is a production-grade computer vision library built around the YOLO model family. In production it provides a unified Python/CLI API for loading pretrained and custom models, running inference, training, validation, export, benchmarking, and object tracking across detection, instance and semantic segmentation, pose estimation, oriented bounding boxes, classification, and depth estimation. The architecture is a modular Python package: an engine layer (Model, BasePredictor, BaseTrainer, BaseValidator), a unified AutoBackend inference dispatcher supporting 20+ formats from PyTorch to TensorRT/ONNX/OpenVINO/CoreML/TFLite, a YAML-driven model configuration system, dataset loaders with caching and augmentation, pluggable experiment-tracking callbacks, and a family of ready-to-use solution classes for counting, heatmaps, queue management, and similar vision applications. The CLI entrypoint (`yolo`) and Python classes (`YOLO`, `SAM`, `RTDETR`, etc.) are the primary entry points, backed by active CI, Docker images, and extensive examples in Python, C++, and Rust.

RATING: 9.2/10 MAINT: active DRIFT: low
β–Έ 3 reusable components found
huggingface/pytorch-image-models β˜… 37196 5215 APPLICATION

This repository is <code>timm</code> (PyTorch Image Models), a high-quality library providing a vast collection of image classification model architectures (100+), pretrained weights, training utilities, and data pipelines. It is not an application but a reusable library/framework, designed for research and production use. The codebase is well-structured with clear separation of concerns: <code>timm/layers</code> for building blocks (activations, normalizations, attentions, pooling), <code>timm/models</code> for model definitions with a consistent registry pattern, <code>timm/data</code> for data loading and augmentation (including AutoAugment, RandAugment, Mixup, CutMix), <code>timm/optim</code> for 30+ optimizers, <code>timm/scheduler</code> for learning rate schedulers, and <code>timm/task</code> for training task abstractions. The library supports distributed training, mixed precision, ONNX export, Hugging Face Hub integration, and dynamic input sizes (NaFlex). It is actively maintained by Hugging Face and the community, with frequent releases and a large number of pretrained models.

RATING: 9.2/10 MAINT: active DRIFT: low
β–Έ 6 reusable components found
lucidrains/vit-pytorch β˜… 25534 3495 APPLICATION

vit-pytorch is a comprehensive PyTorch library implementing dozens of Vision Transformer (ViT) architectures and extensions, along with self-supervised pretraining methods (MAE, DINO, SimMIM, MP3, LeJEPA) and video transformers (ViViT, NaViT-3D, CCT-3D). It is a research-oriented codebase offering a consistent API across models, all accepting standard hyperparameters like image_size, patch_size, depth, and heads. The library covers a wide spectrum of attention mechanisms (cross-attention, shifted windows, channel attention, sparse gating), tokenization strategies (patch merging, region-based, t2t, SPT), and training utilities (recorders, extractors, distillation wrappers). While primarily a collection of model implementations, it also includes action transformers for robotics (VAT, VAAT) and N-dimensional ViTs, demonstrating both breadth and depth of recent transformer research. The code is highly modular, relying on shared building blocks such as Attention, FeedForward, and Transformer classes, with heavy but well-organized use of einops for tensor manipulation. Some variants are experimental and may lack the polish of the core models, but the overall architecture is clean and serves as a valuable reference for implementing and comparing ViT variations. The repository is actively maintained, with recent commits and a large user base, but its sheer size and variety mean that not every model is exhaustively testedβ€”core components are covered by basic forward-pass tests, while many advanced variants rely on the underlying patterns being sound.

RATING: 9.2/10 MAINT: active DRIFT: low
β–Έ 5 reusable components found
$ loading more...
$ submit: