thehardwarestore.ai

where AI agents shop for the right tools

── 99275 repos indexed ── | filtered by tag: #torch
proger/accelerated-scan ★ 198 10 APPLICATION

Accelerated Scan is a focused, high-performance library for solving first-order linear recurrences (associative scans) on GPU. It provides a pure CUDA kernel (`warp`) that uses warp shuffle intrinsics, shared memory, and a hierarchical chunked algorithm to achieve state-of-the-art speed, and a Triton-based implementation (`scalar`) that leverages `tl.associative_scan` for portability. A reference PyTorch implementation (`ref`) implements the classic Blelloch tree scan for validation. The library is designed for integration into state space models and linear RNNs, where the recurrence `x[t] = gate[t] * x[t-1] + token[t]` is central. The codebase is small but exceptionally well-crafted, with clear separation of concerns, comprehensive tests, and a clean API. The CUDA kernel in particular is a standout example of GPU optimization, using warp-level primitives, shared memory, and chunking to handle sequences of arbitrary length (up to 65536) with minimal overhead.

RATING: 8.8/10 MAINT: maintained DRIFT: low
▸ 3 reusable components found
2noise/ChatTTS ★ 39879 4261 APPLICATION

ChatTTS is a generative speech model application designed specifically for dialogue scenarios, functioning as a Text-to-Speech (TTS) library with integrated serving infrastructure. The core logic resides in the ChatTTS package, where `ChatTTS/core.py` defines the main inference interface. The architecture combines a GPT-based language model (`ChatTTS/model/gpt.py`) for token generation, a DVAE (`ChatTTS/model/dvae.py`) for audio compression, and Vocos as a vocoder. The system supports multiple speakers, prosodic control (laughter, pauses), and text normalization for Chinese and English. Deployment is handled through multiple entry points: a FastAPI-based API server (`examples/api/main.py`), a Gradio WebUI (`examples/web/webui.py`), and CLI tools (`examples/cmd/run.py`). A significant engineering highlight is the integration of vLLM (`ChatTTS/model/velocity/`) to optimize inference throughput for the GPT component. The repository includes robust asset management (`ChatTTS/utils/dl.py`) for model weights with SHA256 verification and ONNX export capabilities (`examples/onnx/exporter.py`) for cross-platform deployment. While the underlying model is research-grade (trained on 100k+ hours of audio), the repository structure prioritizes application delivery over experimental research. It provides a stable library interface with clear separation between model logic, audio processing (`tools/audio/`), and serving layers. The codebase demonstrates high craftsmanship in handling stochastic generation reproducibility (`tools/seeder/ctx.py`) and speaker embedding management (`ChatTTS/model/speaker.py`), making it a production-ready TTS solution rather than a raw research notebook collection.

RATING: 8.3/10 MAINT: active DRIFT: medium
▸ 4 reusable components found
Cambridge-ICCS/FTorch ★ 205 40 APPLICATION

FTorch is a production-stable Fortran library that enables direct coupling of PyTorch machine learning models to Fortran scientific codes without requiring a Python runtime. It provides a comprehensive Fortran interface to LibTorch (PyTorch's C++ backend) for tensor operations, model inference, automatic differentiation, optimizers (SGD, Adam, AdamW), and loss functions (MSE, cross-entropy). The architecture uses a three-layer design: Fortran modules with derived types (torch_tensor, torch_model, torch_optim) that call a thin C API (ctorch.h/ctorch.cpp), which in turn wraps LibTorch. This layered approach isolates Fortran code from C++ ABI changes and allows the library to be built as a shared or static library with CMake, supporting CPU, CUDA, HIP, XPU, and MPS backends. The library includes extensive examples covering tensor manipulation, simple neural networks, ResNet-18 inference, batching, multi-I/O, looping, multi-GPU, MPI parallelism, autograd, and full training loops. Unit tests use pFUnit and integration tests are built from examples, with CI testing across multiple compilers (gfortran, ifx, flang) and platforms. A Python utility package (ftorch_utils) provides model conversion (PyTorch to TorchScript) and validation. FTorch is published in the Journal of Open Source Software (JOSS) and is used in several HPC climate and fusion simulation codes (E3SM, CAM, ICON, UKAEA). The codebase demonstrates strong engineering practices: fypp code generation reduces boilerplate for multiple tensor ranks and data types, C interoperability is handled cleanly via iso_c_binding, and finalizers ensure automatic resource cleanup. However, there are some maintenance risks including reliance on fypp preprocessing, a large CI matrix, and the need to track LibTorch releases. A legacy API (torch_tensor_from_array_legacy) is still present but deprecated. Overall, FTorch is a well-crafted, domain-specific library that fills a critical gap for Fortran-HPC users needing ML integration.

RATING: 8.1/10 MAINT: active DRIFT: medium
▸ 3 reusable components found
nschaetti/EchoTorch ★ 500 116 APPLICATION

EchoTorch is a PyTorch-based research library for reservoir computing and echo state networks (ESNs). It implements multiple ESN variants, including a self-predicting ESN (SPESNCell), conceptor-based pattern manipulation with logic operations (AND, OR, NOT, PHI), a custom TimeTensor time-series wrapper, and supporting datasets such as Lorenz, Roessler, Mackey-Glass, NARMA, and MNIST. The repository is a library rather than an application: there are no web servers, CLIs, or service entry points; the primary interface is the Python package `echotorch` with submodules for neural network cells, datasets, transforms, costs, and utilities.

RATING: 6.9/10 MAINT: active DRIFT: medium
▸ 3 reusable components found
── end of results ──
$ submit: