This repository is a comprehensive personal R&D platform implementing a polyglot microservices architecture. It hosts a personal website/web application (React/Vite), multiple API servers in different languages (Rust/Axum, Go/Gin/gRPC, Python/FastAPI, Node.js/Express), mobile applications (iOS/Android/React Native), and desktop applications (Qt). The platform includes extensive data processing infrastructure (Kafka, Pulsar, NATS, Spark, Flink), machine learning capabilities (model training/serving/fine-tuning), monitoring and observability tools, and infrastructure as code (Terraform/OpenTofu, Kubernetes). Services communicate via messaging systems and APIs, with a clear separation of concerns and standardized patterns for configuration, health checks, logging, and error handling across language implementations.
This repository provides the infrastructure for the Anticipatory Music Transformer, a research project for music generation using autoregressive transformers with anticipatory infilling. The codebase covers the full pipeline: preprocessing of MIDI files (Lakh MIDI dataset) into a compound token representation, tokenization into arrival-time or interarrival-time sequences with optional augmentation for anticipation training, and sampling from trained models using custom generation logic. It also includes scripts for human evaluation reproduction and model benchmarking. While primarily a research codebase for a specific paper, the library components in the `anticipation` package (particularly the conversion, ops, and sampling modules) are well-structured and could be reused in other music tokenization or generation projects. The repository does not include the training loop itself but provides configuration files for use with the Levanter training framework.
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.
PaddleSeg is a comprehensive, modular image segmentation toolkit built on PaddlePaddle. It provides a rich collection of state-of-the-art models for semantic, panoptic, medical, and interactive segmentation, as well as matting. The architecture is configuration-driven with a component registration system (manager.py) that allows easy extension of models, backbones, datasets, transforms, losses, and optimizers. Key entry points include training, evaluation, prediction, and export scripts under tools/, with extensive deployment support for C++, Android, FastDeploy, and serving. The codebase is actively maintained with recent commits and demonstrates solid engineering practices, though some contrib modules exhibit duplication and experimental code. It is primarily a software library/framework for segmentation tasks, not a data research pipeline.
This repository is an extensive, open-source educational tutorial on building and training large language models (LLMs) from scratch, maintained by the Datawhale community. It covers the full pipeline: NLP fundamentals, Transformer architecture (with a custom Tiny-K implementation), pretraining, supervised fine-tuning (SFT), parameter-efficient fine-tuning (LoRA), reinforcement learning (GRPO, OPD, Search-R1, ReTool), and practical applications like RAG and Agent systems. The code is organized into chapters with clear progression, and each chapter includes runnable scripts, configuration files, and detailed documentation in Chinese. While primarily educational, the repository contains several well-crafted, reusable components such as a modular Transformer implementation, efficient dataset loaders, a RAG pipeline, an Agent framework, and RL training loops with distributed support. The project is actively maintained with recent additions (Extra-Chapter) and has a large community following. However, reproducibility is moderate due to fragmented dependency files, hardcoded paths, and reliance on external services (e.g., DeepSeek Search, SwanLab). The code is not production-grade but serves as an excellent learning resource and a source of reusable patterns for LLM research and development.
LLM Foundry is a production-grade framework for training, finetuning, evaluating, and serving large language models, with a focus on the MPT architecture and HuggingFace integration. It provides a full pipeline from data preparation (MDS streaming), to model definition (custom MPT, HF wrappers, embedding models), to distributed training (Composer, FSDP, TP), and to evaluation (ICL benchmarks, gauntlets). The architecture is modular, using YAML-driven configuration and a central registry pattern for extensibility. The codebase includes dozens of callbacks for monitoring and training stabilization, custom optimizers, and efficient data collation (bin packing). While tightly integrated with MosaicML's Composer and platform, the core registry and layer abstractions are reusable. The repository is actively maintained with comprehensive test suites, though some features remain experimental and several dependencies (flash attention, megablocks) require careful version management.
This repository provides the official code, datasets, and checkpoints for the Timer family of large time series foundation models (Timer, Timer-XL, Sundial) from Tsinghua University. It implements a decoder-only Transformer architecture pre-trained on the Unified Time Series Dataset (UTSD) using the single-series sequence (S3) format. The code supports fine-tuning and evaluation on three downstream tasks: forecasting, segment-level imputation, and predictive anomaly detection. Data loading modules handle multiple time series formats (CSV, NPZ, TXT) with flexible windowing and scaling. The repository includes shell scripts for reproducible experiments across multiple datasets and data scarcity ratios. It also provides HuggingFace integration for zero-shot forecasting without training. While primarily a research codebase rather than a production application, it is well-structured with clean module separation and reusable components.
FireRedASR is an open-source industrial-grade automatic speech recognition (ASR) system supporting Mandarin, Chinese dialects, and English. It provides two model variants: FireRedASR-AED (Attention-based Encoder-Decoder with Conformer encoder and Transformer decoder) and FireRedASR-LLM (Encoder-Adapter-LLM framework leveraging Qwen2-7B). The codebase includes a CLI tool (`speech2text.py`), a Python API (`FireRedAsr`), feature extraction (fbank with CMVN), tokenization (mixed Chinese/English SentencePiece), and utilities for WER computation. It also includes a complete Triton Inference Server deployment with TensorRT-LLM acceleration for the AED model, with Docker support and benchmarking scripts. The architecture is modular: data preprocessing, model definitions, tokenizers, and inference orchestration are cleanly separated, though the model components are tightly coupled to the specific architectures. The repository is actively maintained with recent commits and demonstrates strong engineering craftsmanship in both the core ASR implementation and the production-grade deployment stack.
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.
SkinTokens is a research codebase for a novel 3D character rigging method (TokenRig) that learns a compact discrete representation (SkinTokens) for skinning weights. The system ingests 3D meshes with skeleton and skinning data (from ArticulationXL, VRoid Hub, ModelsResource), transforms them through a pipeline of augmentation, order arrangement, vertex group extraction, and sampling, then trains an FSQ-CVAE to compress skinning weights into discrete tokens. A Qwen3-0.6B-based autoregressive transformer (TokenRig) generates the full rig (skeleton hierarchy + skin tokens) as a single token sequence. The repo includes a Blender-based server for mesh loading and export, a Gradio demo, a CLI, and extensive data processing modules. The code is well-structured with dataclass-based configs, abstract interfaces, and modular design, but remains primarily a research artifact with some incomplete training implementations (e.g., TokenRig training_step raises NotImplementedError). Its hybrid nature leans strongly toward data research, as the core contribution is a learned representation and generative model for animation rigging.
Fish Speech is a production-grade multilingual text-to-speech system with a dual-autoregressive transformer architecture (4B parameter slow AR for temporal semantics, 400M fast AR for residual codebooks). It supports real-time voice cloning from short reference audio (10-30s), multi-speaker multi-turn generation, and fine-grained prosody/emotion control via natural language tags. The system is deployed through multiple interfaces: a Gradio web UI, a React-based modern web UI, a production ASGI API server (Kui) with streaming support, and command-line tools for inference and batch processing. Its architecture is modular: a TTSInferenceEngine orchestrates reference loading, LLM inference, and VQ decoding; an RVQ audio codec (10 codebooks, ~21 Hz frame rate) compresses audio; and the dual-AR model is structurally isomorphic to standard LLMs, enabling reuse of inference optimizations like paged KV cache and RadixAttention. The repository also includes training infrastructure (Lightning + Hydra) with LoRA fine-tuning, protobuf-based dataset pipelines, and a comprehensive i18n framework. While primarily a deployable application, it retains strong research character with published papers, benchmark results, and custom model implementations.
Time-MoE is a library/framework for training and deploying time series foundation models using a Mixture-of-Experts (MoE) architecture. It provides tools for training the TimeMoE model from scratch or fine-tuning pretrained versions, evaluating on benchmark datasets, and generating forecasts. The codebase is organized into modules for models, datasets, training utilities, and I/O operations, with a clear separation of concerns. Key features include efficient handling of large sequential datasets via sharded binary files, a custom MoE layer with load balancing loss, and integration with Hugging Face Transformers for model management and generation.
Kronos is a foundation model for financial K-line (OHLCV) time series data, accepted at AAAI 2026. It introduces a novel two-stage architecture: a BinarySphericalQuantizer tokenizer that converts continuous multi-dimensional market data into hierarchical discrete tokens, followed by an autoregressive decoder-only Transformer (with RoPE, RMSNorm, hierarchical embedding, and dependency-aware layers) pre-trained on data from 45+ global exchanges. The repository provides a complete research pipeline including model definition, tokenizer training, predictor fine-tuning (via Qlib or custom CSV), backtesting, and inference through multiple interfaces (Python API, CLI examples, a Tkinter GUI, and a Flask web UI). While the core model and tokenizer demonstrate strong research craftsmanship, the codebase exhibits signs of rapid prototyping: many example scripts with overlapping functionality, hardcoded paths, AI-generated comments, and prediction outputs that sometimes degenerate to constant values or numerical instability, indicating the model is still in an experimental stage. The repository is hybrid in nature—primarily a research project with application wrappers for demonstration and evaluation.
This repository is an educational tutorial series that teaches how to build a nanoGPT-like transformer language model from scratch using PyTorch. It consists of over 30 Jupyter notebooks (with both TODO exercises and answer keys) designed for Google Colab, covering topics from token embeddings and positional encodings to multi-head attention, transformer blocks, training loops, scaling experiments, and instruction tuning. The code is modular, with separate classes for each component (TokenEmbedding, PositionEmbedding, AttentionHead, MultiHeadAttention, FeedForward, TransformerBlock, VocabularyLogits, nanoGPT, DataLoader, Trainer, ModelConfig), making it a valuable learning resource. Training is demonstrated on the Shakespeare dataset and later on a sample of FineWeb-Edu, with experiments on model size, learning rate, and tokenization. While the repository is not a production data pipeline or deployable application, it exhibits strong data/research characteristics through its focus on model training, scaling laws, and loss analysis. The notebooks are well-structured for self-paced learning but rely on Colab-specific workflows and hardcoded data URLs, limiting portability.
bertviz is a Python library for interactive visualization of attention in Transformer-based NLP models. It provides three complementary views: Head View (per-head attention patterns), Model View (attention flow between tokens across layers), and Neuron View (query/key interactions within individual attention heads). The library is designed for Jupyter notebooks, rendering D3.js-based interactive HTML directly in cell output. It accepts attention tensors from most HuggingFace models via output_attentions=True, and includes a vendored, modified copy of older HuggingFace transformers code to expose query/key vectors for the Neuron View on BERT, GPT-2, RoBERTa, XLNet, and similar architectures.
ExLlamaV2 is a high-performance inference library for running quantized large language models (LLMs) on consumer GPUs, supporting GPTQ and the custom EXL2 quantization formats. It provides a Python library with custom CUDA/C++ extensions for efficient attention, MLP, sampling, and KV cache management, along with advanced features like dynamic batching, paged attention, speculative decoding, LoRA, tensor parallelism, and multimodal (image/video) support. The library includes a WebSocket server for remote inference and a suite of example scripts demonstrating various use cases. While the codebase exhibits strong engineering with clean abstractions (e.g., module system, filter pattern, multi-backend attention) and highly optimized CUDA kernels, the repository has been archived in favor of ExLlamaV3, meaning no further updates or bug fixes are expected. This makes it a valuable reference for understanding quantized LLM inference internals but risky for new projects requiring ongoing support.
This repository is an educational collection of minimal, from-scratch implementations of core LLM and generative AI systems, maintained by DataWhale. It is not a single production application; rather, it is a set of self-contained 'Tiny' sub-projects covering a small LLM trained on TinyStories, a RAG pipeline, a ReAct agent, an LLM evaluation harness, a DDPM diffusion model, a Transformer, a GraphRAG system, and an image-based RAG pipeline. Each sub-project has its own README, requirements, and runnable code or notebooks, with heavy Chinese-language comments explaining the underlying theory. The code is intentionally simple and readable rather than production-hardened, and it serves as a teaching resource for understanding how these systems work internally.
This repository reproduces the AlphaGeometry system (DD+AR and neural language model) from the Nature 2024 paper on automated theorem proving for olympiad-level geometry. It combines a symbolic deduction engine (DD) with algebraic reasoning (AR) and a transformer-based language model that suggests auxiliary constructions. The codebase includes problem files in a custom DSL, a large set of deduction rules, and a 150M-parameter transformer model. While not a production application, it provides a well-structured research codebase with clean module separation, comprehensive unit tests, and several reusable components such as a generic beam search implementation, algebraic reasoning tables, and proof traceback utilities. The repository is somewhat stale (last updated in 2023) and has many open issues; dependency pinning is strict but external dependencies like Meliad and a model checkpoint introduce reproducibility risks.
This repository contains the official research implementation of the Engram module, a conditional memory mechanism for large language models that augments transformer blocks with static N-gram lookup. The codebase is a single standalone Python demo script (`engram_demo_v1.py`) that illustrates the core data flow: tokenization, compression, hash-based N-gram indexing, multi-head embedding retrieval, gating via learned keys and query dot-product, and a short depthwise convolution with per-group RMSNorm. The architecture is a mock LLM (embedding, transformer blocks with mocked Attention/MoE, linear head) to focus solely on the Engram module. The repo is a research artifact, not a production service; it lacks tests, packaging, and error handling but provides a clear, commented implementation of the novel hash-based conditional memory pattern. The primary value for engineers is the extractable pattern for deterministic N-gram lookup and gating, and the depthwise convolution with group normalization.
This repository is an educational book/course (DataWhale 'diy-llm') that teaches building and training LLMs from scratch. It spans the full pipeline: tokenizer, Transformer architecture, GPU high-performance programming, scaling laws, data engineering, distributed training, alignment (including GRPO/RLVR), evaluation, and multimodal models. The content is primarily Chinese, with Jupyter notebooks and code snippets embedded in markdown chapters. It is not a production library or application; it is a tutorial/textbook with homework assignments.