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.
LLaMA-Factory is a production-grade, unified framework for fine-tuning, evaluating, and serving 100+ large language and multimodal models. It provides a CLI (`llamafactory-cli`), a Gradio web UI (LLaMA Board), and an OpenAI-compatible API server. The architecture is monolithic but highly modular, built on Hugging Face Transformers/TRL/PEFT with optional integration of vLLM, SGLang, DeepSpeed, FSDP, Megatron Bridge, and hardware-specific backends (CUDA, ROCm, NPU, XPU). Training pipelines support full-parameter, LoRA, QLoRA, freeze-tuning, and alignment methods (DPO, PPO, KTO, etc.) with extensive data processing (multimodal, packing, streaming, template-based formatting). The codebase features a plugin system (v1) for kernels, quantization, distributed backends, and batching strategies, though it maintains a parallel legacy (v0) path. Reusable components include dataset processors, chat template hierarchy, multimodal plugin architecture, custom trainer callbacks, and batching strategy plugins. While the framework is actively maintained and well-tested, it suffers from some technical drift due to a dual-codebase structure, hardcoded model registries, version pinning, and fragile monkey-patching in distributed integrations.
This repository is the official companion code for the book *Build a Large Language Model (From Scratch)* by Sebastian Raschka (105k+ stars). It provides a step-by-step, educational implementation of GPT-2 and its modern variants (Llama 3, Qwen3, Gemma 3/4, Olmo3) entirely in PyTorch, organized by book chapters (2–7 plus appendices). The codebase is a mix of Jupyter notebooks for interactive learning and Python modules that form a reusable pip package (`llms-from-scratch`), accompanied by extensive CI/CD pipelines, unit tests, and performance analysis scripts. Architecturally, the core is a modular transformer library that includes tokenization (BPE, tiktoken, custom), multi-head attention with multiple variants (GQA, MLA, SWA, DSA, cross-layer KV sharing), feedforward blocks, normalization (LayerNorm, RMSNorm), and LoRA. The code supports pretraining from scratch, classification finetuning (spam, IMDB), instruction finetuning (with/without LoRA), and preference tuning (DPO). It can load pretrained weights from OpenAI, Hugging Face, and local checkpoints. The package exposes clean interfaces (`GPTModel`, `generate`, `train_model_simple`) and includes bonus materials for KV cache implementations, mixture-of-experts, memory estimators, and user interfaces (Chainlit). While primarily educational, the code exhibits production-quality patterns: isolated attention modules, configurable model architecture, well-structured training loops, and robust weight loading with shape validation. The repository is actively maintained with recent commits, cross-platform support (Linux, macOS, Windows), and a strong emphasis on reproducibility (fixed seeds, deterministic settings, environment definitions via pixi/uv/conda). Duplication exists across bonus notebooks and a few hardcoded paths, but the core package and test suite are well-coordinated.
TinyLLaVA Factory is a modular Python framework for building, training, evaluating, and serving small-scale Large Multimodal Models (LMMs). It provides a pluggable architecture with separate components for vision towers (CLIP, SigLIP, DINOv2), language models (Phi, TinyLlama, Gemma, Qwen2, etc.), and connectors (MLP, QFormer, Resampler), all accessible via factory registries. The training pipeline supports two-stage pretraining (alignment) and finetuning with full, LoRA, or QLoRA recipes using DeepSpeed. It includes a comprehensive evaluation suite for standard benchmarks (VQA, GQA, SQA, POPE, MMMU, etc.) and a Gradio-based web demo. The codebase is well-organized and follows clean architectural patterns, though many modules are tightly coupled to the internal framework. It is actively maintained, with recent additions like a visualization tool and support for new models.
FreakWAN is a LoRa-based wide-area network (WAN) messaging system designed for ESP32 and T-ECHO devices. It implements a fully distributed, open chat network independent of internet or cellular infrastructure. The system supports plaintext and encrypted messaging, group chats, media sharing (small images), sensor data collection, and includes features like duty cycle tracking, automatic retransmission with ACK suppression, and neighborhood discovery via HELLO messages. The codebase is written in MicroPython (with a C port for T-ECHO) and is entirely self-contained, relying only on standard libraries. Architecturally, the application runs as a single asyncio event loop with multiple tasks for periodic message sending, HELLO advertising, serial input handling, and optional IRC/Telegram bot integration. The radio layer is abstracted behind SX1276 and SX1262 drivers, and the display uses a terminal-like Scroller view with splash screen and status icons. The protocol layer defines message types (Data, Ack, Hello, Ping, Pong) and supports encryption via AES-CBC with HMAC integrity. The repository is well-structured, with clear separation of concerns and reusable components that can be extracted for other projects.
Image MetaHub is a local-first Electron desktop application for organizing, browsing, and re-generating AI-generated images. It indexes media files in place (no uploads, no moving files) and extracts structured metadata — prompts, models, LoRAs, samplers, seeds, workflows — from 15+ generators including ComfyUI, A1111, InvokeAI, Midjourney, DALL-E, Fooocus, and Adobe Firefly (via C2PA/JUMBF/CBOR parsing). Beyond images it handles video, audio, and 3D model metadata. The app provides tagging, collections, automation rules, ratings, analytics, image comparison with pixel-level diffing, lineage/provenance tracking, and integration with local ComfyUI/A1111 instances for re-generation and upscaling. Pro features (visual search, clustering, batch export) are gated by an offline license system with a 7-day trial and Stripe billing.
LongCat-Video is a production-grade video generation foundation model (13.6B parameters) that supports text-to-video, image-to-video, video continuation, and audio-driven avatar animation. The codebase implements a dense DiT-style transformer with 3D patch embedding, block-sparse attention (BSA) via custom Triton kernels, 3D rotary position embeddings (RoPE), and context parallelism for multi-GPU inference. It includes a coarse-to-fine generation pipeline (480p → 720p) using LoRA adapters for distillation and refinement, and an avatar variant that conditions on audio embeddings from Wav2Vec2 or Whisper. The architecture is monolithic, with entry points being demo scripts and a Streamlit UI. External dependencies include PyTorch, HuggingFace Transformers, FlashAttention, Triton, and optional OpenAI API for prompt enhancement. The code demonstrates advanced engineering practices such as INT8 quantization, KV-caching, and tiled VAE decoding, but suffers from some code duplication and tight coupling to specific model dimensions.
Irodori-TTS is a state-of-the-art Japanese text-to-speech system built on rectified flow diffusion over DACVAE audio latents. It provides a complete training and inference stack: `train.py` supports full fine-tuning, LoRA, speaker inversion, and MeanFlow distillation with distributed training and WSD scheduling; `infer.py` offers a rich CLI with CFG, Sway Sampling, duration scaling, and watermarking; `gradio_app.py` and `gradio_app_voicedesign.py` expose interactive UIs for reference-based cloning and caption-conditioned voice design. The architecture is modular (`irodori_tts` package) with attention dispatch (FA3/SDPA), a hybrid Muon+AdamW optimizer, codec abstraction, and caching-friendly `InferenceRuntime`. While highly engineered for production use (INT4/INT8 quantization, safetensors, HuggingFace Hub integration), it remains a research-oriented codebase with experimental sampling algorithms and many YAML configs for different model sizes/versions. The code is clean and well-factored, though `train.py` is a large monolith and external dependencies (DACVAE, silentcipher) are pinned to specific commits, creating ecosystem fragility.
This repository is a comprehensive collection of annotated PyTorch implementations of deep learning papers, spanning transformers, GANs, reinforcement learning, diffusion models, and more. Each implementation includes side-by-side notes explaining the code and underlying concepts, making it an educational resource for understanding and reproducing paper results. The codebase is organized by paper/model type, with standalone experiment scripts, reusable modules, and configuration-driven training loops. Key strengths include clean abstractions for transformer components, a flexible configs system, and extensive coverage of both foundational and modern architectures. However, the project has not seen commits since early 2024, some dependencies are outdated, and certain experiments require large GPU resources or external data not bundled in the repo. While individual components are well-crafted and reusable, the overall collection is best used as a reference and learning tool rather than a production framework.
PMetal is a comprehensive machine learning framework specifically optimized for Apple Silicon hardware. It provides a complete suite for LLM training, fine-tuning, inference, and deployment through multiple interfaces (CLI, TUI, GUI, Python SDK, and REST API). The framework leverages Apple-specific technologies like Metal GPU, ANE, and UltraFusion for performance optimization while supporting standard ML workflows including LoRA/QLoRA fine-tuning, knowledge distillation, model merging, and quantization to formats like GGUF. The architecture follows a modular workspace design with over 20 specialized crates handling different aspects of the ML lifecycle, unified through a job specification system and configuration framework.
This repository is a GNU Radio out-of-the-module (OOT) implementation of the LoRa physical layer. It provides a comprehensive set of signal processing blocks for transmitting and receiving LoRa signals, including channel coding (Hamming), interleaving, whitening, CRC, header processing, modulation, demodulation, and frame synchronization. The module is designed for use with GNU Radio 3.10+ and includes hierarchical blocks for quick assembly of transmitter and receiver flowgraphs in GNU Radio Companion or Python. It also features a simulation framework for performance evaluation (BER/FER vs SNR) and has been validated with USRP hardware and commercial LoRa transceivers. The code is modular, well-documented, and actively maintained, with recent updates adding support for lower spreading factors (SF 5-6) and improved soft-decision decoding.
ComfyUI-VoxCPM is a ComfyUI custom node package that provides expressive text-to-speech (TTS) using the VoxCPM model family (v1.x and v2). It supports zero-shot TTS, voice cloning (prompt or reference audio), voice design via text descriptions, LoRA inference, and LoRA fine-tuning. The architecture is a ComfyUI extension with heavy JavaScript frontend, HTTP API routes, and vendored model inference code. The core functionality is implemented in the `src/voxcpm/` directory, which contains model architectures (MiniCPM4, AudioVAE, local DiT, etc.), a standalone CLI, and training utilities. External dependencies include ComfyUI, PyTorch, Hugging Face Hub, and several optional libraries (argbind, datasets, modelscope, etc.). The codebase demonstrates good software engineering practices with clean abstractions, reusable components, and graceful degradation for optional features. However, it is tightly coupled to ComfyUI's ecosystem and vendors upstream model code, which may drift from upstream. The repository also includes a standalone `hf_progress` library for HuggingFace transfer progress tracking, which is a well-isolated, reusable component.
Open-OmniVCus is a research monorepo reproducing the NeurIPS 2025 OmniVCus method for subject-driven video customization under multimodal control conditions (reference image, depth, mask, motion/camera). It is hybrid by nature: the dominant character is an application/framework layer provided by a large vendored/forked copy of DiffSynth-Studio, wrapped around research-oriented data-construction and training code (VideoCus-Factory, Video-Depth-Anything). The repo does not expose a hosted service or API; it is a Python library plus executable training/inference scripts for diffusion-based image and video generation.
Stable Diffusion Web UI is a Gradio-based web application that provides a comprehensive interface for generating and manipulating images using diffusion models. It supports txt2img, img2img, inpainting, outpainting, and various post-processing operations including face restoration and upscaling. The application implements a plugin architecture through extensions, supports multiple model architectures (SD 1.x, SD 2.x, SDXL, SD3), and provides a REST API for programmatic access. The codebase is a monolithic application with tightly coupled modules handling model loading, image processing, UI rendering, and script execution. The architecture centers around a main webui.py entry point that initializes the application, sets up Gradio interfaces, and manages the event loop. The modules directory contains core functionality including sd_models.py for model management, processing.py for the main generation pipeline, and various hijack modules that monkey-patch diffusion model components to add custom behavior like attention optimization and CLIP modification. The extensions-builtin directory contains first-party extensions for LoRA, hypernetworks, and various post-processing operations. Key technical patterns include extensive use of monkey-patching and function hijacking to modify model behavior without changing upstream code, a callback system for script hooks, and a queue-based generation system with progress tracking. The codebase demonstrates sophisticated handling of GPU memory management, model optimization techniques, and cross-platform compatibility. However, the code exhibits significant technical debt with large monolithic files, tight coupling between modules, and complex conditional logic handling multiple model versions and configurations. The repository includes comprehensive test coverage for API endpoints, model utilities, and image processing functions. Dependencies are well-pinned in requirements_versions.txt, though some versions are notably behind current releases (Gradio 3.41.2, Transformers 4.30.2). The codebase shows active maintenance with recent commits and a detailed changelog tracking features and bug fixes across multiple versions.
The repository provides the official PyTorch implementation of DoRA (Weight-Decomposed Low-Rank Adaptation), a parameter-efficient fine-tuning method. It integrates with Hugging Face PEFT and includes training/evaluation scripts for vision-language and language tasks (e.g., VQA, ScienceQA, commonsense reasoning). The architecture is modular, with core components like DoRA tuners, adapter controllers, and low-rank layers. Entry points include training scripts (finetune.py, train_dora.py), evaluation scripts (evaluate.py, run_llava.py), and serving tools (gradio_web_server.py). External dependencies include PyTorch, Transformers, PEFT, bitsandbytes, and dataset-specific libraries.
The repository implements LLaVA-VLA, a Vision-Language-Action model for robotic manipulation tasks. It extends the LLaVA framework to predict action sequences from visual inputs, proprioceptive state, and language instructions using a diffusion-based action head. The system includes training pipelines for fine-tuning on datasets like CALVIN, inference servers (Flask and Gradio) for real-time robot control, and evaluation tools for benchmarks. The architecture features modular vision encoders, projectors, and resamplers with factory patterns for flexibility, action tokenization for discrete action prediction, and integration with PEFT/DeepSpeed for efficient training.
VoxCPM is a tokenizer-free, multilingual text-to-speech (TTS) system developed by OpenBMB. It supports voice cloning, voice design, and controllable speech generation across 30 languages and 9 Chinese dialects, outputting 48kHz audio. The architecture is a diffusion-autoregressive model built on MiniCPM-4, comprising AudioVAE, Local Encoder, Text-Semantic LM, Residual Acoustic LM, and Local DiT. The repository provides multiple interfaces: a Gradio web application (app.py) for interactive use, a command-line interface (voxcpm.cli) for batch processing, a fine-tuning web UI (lora_ft_webui.py) for LoRA and full-parameter training, and Python APIs for integration. It also includes utilities for audio enhancement (ZipEnhancer), timestamp alignment, and text normalization. While primarily an application, it contains research-grade model definitions and training pipelines, making it a hybrid project with a strong application focus.
VideoCoF is a unified video editing framework based on diffusion transformers (Wan2.1). It implements a 'See → Reason → Edit' pipeline using chain-of-frames (CoT) reasoning, enabling object removal, addition, swap, and local style transfer. The architecture includes a modular pipeline (`WanPipeline`) with flow matching solvers, VAE, text encoder, and transformer backbone. Inference can be done via a fast inference script (`fast_infer.py`) using 4-step DMD, batch inference via JSON, or through a Gradio UI. Training supports LoRA fine-tuning with DeepSpeed ZeRO-2/3 for 1.3B and 14B models, with custom dataset classes (including CoT and joint image-video). External dependencies include Diffusers, Transformers, Gradio, OpenCV, DeepSpeed, and optional paifuser for optimizations. While primarily an application for video editing, the repo has strong research character with extensive evaluation metrics (CLIP, GPT), configuration files, and experiment scripts. The code is modular in parts but contains experimental features, hardcoded paths, and reliance on an internal optimization package (paifuser) that may limit external reuse. The core utility modules (LoRA, caching, attention, schedulers) are well-crafted and potentially reusable across other diffusion model projects.
This repository provides the firmware for a LoRa-based APRS iGate/digipeater station running on ESP32 microcontrollers. It bridges amateur radio APRS packets between LoRa RF and the internet (APRS-IS), and can also operate as a digipeater, TNC (KISS), weather station, and GPS tracker. The firmware includes a full web-based configuration UI, live map, MQTT integration, syslog, OTA updates, and support for dozens of hardware variants (Heltec, TTGO, etc.). The code is organized into modular C++ namespaces (LoRa_Utils, DIGI_Utils, APRS_IS_Utils, etc.) and uses a JSON-based configuration store. While the project is actively maintained, it shows some technical drift through vendored esptool binaries, dependency on older libraries (ElegantOTA), and heavy use of compile-time conditionals across board variants. The architecture is a classic embedded monolith targeting a single firmware binary, with strong hardware abstraction via pinout headers and a common configuration object. Several components—such as the KISS protocol encoder/decoder, the NetworkManager abstraction, and the Configuration class—are well-isolated and potentially reusable in other ESP32/ham radio projects.
The repository provides a comprehensive framework for generative AI models, particularly focused on image and video generation. It integrates various diffusion-based architectures (Stable Diffusion, Stable Diffusion XL, Hunyuan DiT, Wan, etc.) and offers utilities for model loading, prompt engineering, and post-processing. The system supports text-to-image, text-to-video, image-to-video, and video-to-video generation, along with editing capabilities via ControlNet and LoRA. The architecture is modular, with core components for model management, prompting, and VRAM optimization, though it exhibits some duplication across model-specific pipelines.