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.
LightRAG is a production-ready Retrieval-Augmented Generation (RAG) framework that combines knowledge graph construction with vector-based retrieval. The system implements a dual-layer architecture managing both knowledge graphs (entities, relationships) and vector embeddings, enabling both local (entity-focused) and global (theme-focused) query modes plus hybrid combinations. It provides a FastAPI-based REST server with an embedded React WebUI, supporting 10+ LLM providers (OpenAI, Azure, Anthropic, Gemini, Ollama, Bedrock, etc.), 8+ vector/graph storage backends (PostgreSQL+pgvector/AGE, Neo4j, Milvus, Qdrant, Redis, MongoDB, OpenSearch, FAISS, NanoVectorDB), and a multimodal document parsing pipeline integrating MinerU and Docling for PDF/Office documents with tables, equations, and images. The codebase demonstrates strong engineering practices: async-first architecture with configurable concurrency controls, role-specific LLM configuration (EXTRACT, QUERY, KEYWORDS, VLM), atomic file operations for crash-safe persistence, comprehensive test coverage (300+ tests), and production deployment artifacts (Docker, Kubernetes/Helm, systemd). The parser layer is particularly well-designed with a registry-based engine dispatch (native docx/markdown, MinerU, Docling) producing a unified sidecar format. Recent additions include reranking support, asymmetric embeddings, document deletion with KG regeneration, and RAGAS/Langfuse integration for evaluation and observability.
Langfuse is an open-source LLM observability and evaluation platform. It provides tracing, prompt management, evaluations, datasets, experiments, monitors, and a public API for integrating with AI applications. The architecture is a monorepo with pnpm workspaces and Turborepo, consisting of a Next.js frontend (web), a background worker (Express + BullMQ), a shared package with types and server utilities, and an enterprise edition. Data flows from ingestion (REST API, OpenTelemetry, SDKs) into ClickHouse for high-volume analytics and PostgreSQL for relational metadata. Background jobs handle evaluations, batch exports, cloud billing, and integrations. The codebase is well-structured with extensive testing, a custom ESLint plugin, and reusable UI components. It is actively maintained with frequent migrations and feature additions.
This repository is a comprehensive, practitioner-focused educational hub for generative AI. It is not a deployable software application or a traditional data pipeline, but a curated knowledge base that bridges theory and practice. The content is organized into free courses (Applied LLMs Mastery, Agentic AI, AI Evals), interview preparation guides for multiple AI roles (AI Engineer, AI PM, FDE, AI Strategist), system design case studies with runnable LangGraph code, and curated research updates (monthly paper lists, State of AI reports). The architecture is a hybrid of educational content and reusable code patterns, with the core value lying in its structured learning paths and conceptual frameworks. The repository's dominant character is educational content curation and research tracking. The code examples are explicitly demonstration-grade, designed to teach production-adjacent patterns like provider-agnostic LLM layers, hash-chained audit trails, and deterministic guardrails. These patterns are genuinely reusable and demonstrate strong engineering craftsmanship. The information architecture of the repo itself is excellent, making it easy for learners to navigate from foundational concepts to advanced system design. The repository is actively maintained with a massive community following. Its primary risk is the inherent rapid obsolescence of the AI field, which the maintainers mitigate by explicitly archiving outdated content and providing clear versioning. The code examples are not production-ready out of the box, but the patterns they teach are directly applicable to real-world systems. The research paper lists and interview questions require ongoing curation to stay current.
OpenRLHF is a production-oriented distributed RLHF/RL training framework for large language models, not a research notebook collection. The codebase implements a full training stack: SFT, reward modeling, DPO/IPO/cDPO, and RL algorithms including PPO, REINFORCE++, GRPO, RLOO, Dr.GRPO, and FlashREINFORCE. Its architecture combines Ray for distributed actor orchestration and placement groups, vLLM for high-throughput rollout generation, DeepSpeed ZeRO for model training, and HuggingFace Transformers for model handling. The primary entry points are CLIs under openrlhf/cli, with train_ppo_ray.py as the main RL launcher; these accept a large set of hierarchically parsed dotted flags that control training, rollout, reward, vLLM, and DeepSpeed behavior. The repository is genuinely hybrid in spirit because it trains research-scale models and reproduces academic methods, but its dominant character is application/framework: it ships packaging, Dockerfiles, CLI entry points, unit tests, and versioned releases. The design emphasizes a token-in-token-out agent abstraction that unifies single-turn and multi-turn RLHF, plus sync and async training modes, a hybrid engine that colocates training and generation on shared GPUs, and VLM support. Distributed checkpointing, LoRA/QLoRA, packing, dynamic batch sizing, importance sampling corrections, and KL-estimator variants are all present in the code, not merely in the README. Craftsmanship is strong. The code separates concerns across cli/, trainer/, models/, datasets/, and utils/, and includes several genuinely reusable patterns such as a self-contained math answer grader, a flat-to-hierarchical argparse config converter, a typed RL experience dataclass, and distributed loss-normalization utilities. The test suite exercises loss estimators, trainer control flow, experience batching, and agent behavior with mocked heavy dependencies, which is a pragmatic way to test GPU-bound code on CPU. The main weaknesses are operational rather than architectural: dependencies are extremely tightly pinned (deepspeed==0.19.6, transformers==5.15.0, ray==2.55.0, vllm==0.29.0), and the code monkey-patches upstream internals and relies on version-specific behaviors. This makes upgrades brittle, and the CI pipeline builds wheels without running the test suite. Overall, this is a mature, actively maintained framework with high reusability for engineers building LLM alignment pipelines, though it demands GPU infrastructure and careful dependency alignment.
This repository is the official companion code for the book "Build a Reasoning Model (From Scratch)" by Sebastian Raschka (Manning, 2025). It is primarily a data_research codebase focused on building, evaluating, and training reasoning LLMs from scratch using the Qwen3 0.6B model as a base. The code covers inference-time scaling (temperature/top-p sampling, self-consistency), reinforcement learning from verifiable rewards (GRPO/RLVR), self-refinement, and knowledge distillation from larger teachers (DeepSeek-R1, Qwen3 235B). It includes a full custom Qwen3 implementation with KV cache, RoPE, and grouped-query attention, plus training scripts, notebooks, benchmark evaluations (MATH-500, MMLU), and Hugging Face export adapters. While educational in nature, it demonstrates production-quality engineering for research experiments. The repository is hybrid: it provides a reusable Python package for text generation and training, but its dominant character is data_research due to its notebook-driven, experimental, and benchmark-focused workflow.
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.
DeepTutor is a full-stack AI-powered learning companion that provides chat, problem-solving, research, visualization, and structured learning capabilities. The system features a modular architecture with a Python/FastAPI backend, Next.js/React frontend, and a CLI interface. It implements an agent-based system where capabilities like deep solve, deep question, and deep research are implemented as loop capabilities with access to tools such as web search, code execution, and knowledge base retrieval. The platform includes a three-layer memory system for contextual awareness, supports multiple RAG backends (LlamaIndex, PageIndex, GraphRAG, LightRAG, IMA), and enables integration with external knowledge bases (Obsidian, MarginNote 4) and partner agents (Claude Code, Codex). The application employs a plugin architecture for extensibility, allowing new capabilities, tools, and subagents to be added via entry points. Configuration is managed through JSON/YAML files with runtime overrides, and services are decoupled via provider abstractions for LLMs, embeddings, search, and media generation. Real-time communication is facilitated by WebSockets and an internal event bus (StreamBus). The system supports multi-user deployments with role-based access control, isolated workspaces, and grant-based resource sharing for skills, knowledge bases, and partners. Deployment options include local installation, Docker containers, and CLI-only mode. The codebase demonstrates strong engineering practices with extensive unit testing, clear separation of concerns, and reusable patterns such as the capability protocol, tool composition, and atomic file operations. While the system's feature richness introduces complexity, its modular design allows for selective adoption of components.
Haystack is an open-source Python framework for building production-ready LLM applications. It provides a modular, component-based architecture where data processing steps (converters, embedders, retrievers, generators, evaluators, etc.) are connected into pipelines or agents. The framework includes over 100 built-in components, support for 50+ integrations (OpenAI, Anthropic, Azure, HuggingFace, etc.), async execution, streaming, serialization, evaluation, and observability. It is designed for RAG, semantic search, question answering, autonomous agents, and multimodal applications. The code is well-structured with consistent patterns (component decorator, lifecycle methods, serialization protocols), extensive test coverage, and security hardening (fuzzing, sandboxed Jinja2, deserialization allowlists).
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.
LangExtract is a Python library for extracting structured information (entities, relationships) from unstructured text using large language models (LLMs). It provides a production-grade pipeline: chunking long documents, building prompts with few-shot examples, invoking LLMs (Gemini, OpenAI, Ollama, or custom providers), parsing and fuzzy-aligning the output to source text, and generating interactive HTML visualizations. The architecture is modular with a plugin system for providers, a schema system for output constraints, and a resolver for alignment. It includes comprehensive tests, benchmarks, and CI/CD. The library is actively maintained with a clear deprecation path for v2.0.0. Notable strengths are the provider plugin system, fuzzy alignment algorithms, and format handling. Weaknesses include some deprecation debt and complex alignment code.
AgentScope is a full-stack, production-grade multi-agent orchestration platform. The core library (`src/agentscope/`) provides a FastAPI-based agent service with CRUD endpoints for agents, sessions, credentials, channels, knowledge bases, schedules, and SOPs. It features a modular middleware onion pattern for agent lifecycle hooks (reply, reasoning, acting, tool execution), a pluggable storage abstraction (Redis, SQL with Alembic migrations, S3 blob store), and a message bus (in-memory or Redis) for inter-session communication and distributed coordination. The system supports real-time voice (WebRTC, DashScope/OpenAI/Gemini/xAI), RAG pipelines with document parsing and vector stores (Qdrant, Milvus, MongoDB, Elasticsearch), channel integrations (Feishu, DingTalk, Discord), and sandboxed workspace backends (Docker, Kubernetes, E2B, Daytona, Apple Containers, Bubblewrap, OpenSandbox). A full React/TypeScript web UI (`examples/web_ui/frontend`) provides chat, channel management, schedule calendar, knowledge base browsing, and MCP hub browsing. Additionally, a terminal console and a goal-oriented pipeline are provided for developer workflows. The framework emphasizes transparency, controllability, and separation between agent logic and infrastructure, supporting multi-agent collaboration, human-in-the-loop permissions, and long-term memory via ReMe and mem0 middleware.
PowerInfer is a CPU/GPU hybrid LLM inference engine optimized for serving large language models on consumer-grade hardware. The system exploits activation locality in neural networks by preloading consistently activated 'hot' neurons on GPU while computing variable 'cold' neurons on CPU, reducing GPU memory demands and data transfers. Built upon llama.cpp and GGML tensor library, it provides end-to-end workflow including model acquisition from Hugging Face, conversion to PowerInfer GGUF format, quantization, and inference serving via CLI, server, or mobile/web applications. The architecture features modular components including hardware backend abstractions, AZ cross-platform primitives, pipeline/task scheduling, and specialized optimizations for sparse MoE models.
This repository is a high-performance computing library optimized for large language model (LLM) inference and training on NVIDIA GPUs. It provides accelerated implementations of core operations including attention mechanisms, GEMM, fused Mixture of Experts (MoE), all-reduce with normalization, sampling, and rotary position embeddings. The architecture combines C++/CUDA kernels for performance-critical operations with Python bindings via PyTorch, enabling easy integration into deep learning frameworks. The library emphasizes kernel fusion, efficient memory access patterns, and specialized optimizations for modern GPU architectures (particularly Hopper and Blackwell).
Activeloop's DeepLake is a production-grade, multi-vector database engine for AI data. At its core, it is a columnar, chunked, compressed storage system for tensors (multi-dimensional arrays) with native support for embeddings, images, video, text, and other complex AI data types. It exposes a Python library for dataset management, ingestion (COCO, Labelbox, CSV, Parquet), version control, and integration with PyTorch/TensorFlow/MMDetection. A high-performance C++ backend provides lazy NumPy-like array operations (nd::array), a composable async framework (async::promise), and a Tensor Query Language (TQL). The most distinctive component is a PostgreSQL extension (pg_deeplake) that allows SQL access to DeepLake datasets via custom table and index access methods, supporting vector similarity search (cosine, BM25) and hybrid search. Query execution is delegated to DuckDB through a custom scan node, enabling efficient analytical queries. The extension also includes WAL-based DDL replication across instances. This is primarily an application (a database system), with substantial research-oriented features such as medical image formats, compression codecs, and TPC-H benchmarking.
This repository contains a minimal coding agent designed to work with local Ollama models. The agent operates in a loop, processing user requests by inspecting and modifying the workspace through a set of structured tools (file operations, shell commands, etc.). It implements six core components: live repo context collection, prompt shaping with cache reuse, structured tools with validation and permissions, context reduction and output management, transcript and memory persistence, and bounded delegation to subagents. The agent is implemented in a single Python file (`mini_coding_agent.py`) and is intended to be run via a CLI entry point. It requires an Ollama server running with a compatible model (default: qwen3.5:4b). The code is clean, well-structured, and demonstrates thoughtful agent design patterns, making it a useful reference for building similar agents.
This repository is a comprehensive survey paper on the intersection of knowledge graphs and multi-modal learning. It organizes the literature into two main directions: KG-driven multi-modal learning (KG4MM) and multi-modal knowledge graphs (MM4KG). The survey covers various tasks such as visual question answering, image classification, multi-modal named entity recognition, and knowledge graph completion, among others. Each section includes a list of relevant papers with links to their sources (e.g., arXiv, conference proceedings). The repository is maintained through updates that include adding new papers and fixing links, as evidenced by the recent commit in 2026 and the news items up to 2024-12.
GPT Academic is a comprehensive Gradio-based web application that provides a unified interface for interacting with 30+ large language models (both commercial APIs and locally-hosted models) with specialized tools for academic research workflows. The system's core architecture revolves around a plugin-based extensible framework where functionality is organized into 'basic functions' (simple text transformations) and 'crazy functions' (complex multi-step plugins for PDF translation, LaTeX processing, code analysis, internet search, etc.). The main entry point (main.py) initializes a Gradio Blocks interface with a modular layout, dynamic plugin loading, and a custom FastAPI server wrapper that adds authentication, file access controls, and WebSocket streaming capabilities. The codebase demonstrates sophisticated multi-threading patterns for concurrent LLM requests, with a bridge abstraction layer (request_llms/bridge_all.py) that normalizes communication across diverse model providers including OpenAI, Azure, Anthropic, Qwen, ChatGLM, Spark, and many others. The plugin system supports both simple function-based plugins and class-based plugins with configurable argument menus, state management via cookies, and hot-reloading. Notable architectural components include a vector database integration for RAG workflows, a multi-agent system built on AutoGen, real-time audio processing with Alibaba ASR, and a Docker-as-a-Service pattern for delegating media processing tasks. The repository contains extensive documentation (MkDocs-based), comprehensive test coverage for plugins, CI/CD pipelines for Docker image builds, and support for multiple deployment modes (pip, conda, Docker, HuggingFace Spaces). The codebase exhibits high craftsmanship in its LLM integration layer, with features like automatic key rotation, model-specific parameter handling, streaming response management, and sophisticated error handling with watchdog timers. The plugin template system and dynamic UI generation demonstrate good software engineering practices for extensibility.
Promptify is a Python library for performing NLP tasks using large language models (LLMs) with structured, type-safe outputs. It provides a scikit-learn-like interface where users instantiate task classes (e.g., NER, Classify, QA, Summarize) and call them with plain text. The library uses LiteLLM as a universal backend to support 100+ providers (OpenAI, Anthropic, Ollama, etc.), Pydantic v2 for output schemas, Jinja2 for prompt templates, and tenacity for retries. Architecture follows a clean separation: Task classes (promptify/tasks) build prompts via PromptBuilder, send them via LLMEngine (which wraps LiteLLM), and parse responses via a safe Parser that never uses eval(). The package also includes a built-in evaluation framework (promptify/eval) with metrics for precision, recall, F1, accuracy, exact match, and ROUGE, plus dataset loading utilities. The code is well-structured, typed, and includes comprehensive tests. The primary artifact is the "promptify" Python package, installable via pip. The repository is not a data research project; it is a software library for developers.
SurveyX is an academic survey automation system that leverages Large Language Models (LLMs) to generate domain-specific academic papers from user-provided references. The system implements a modular pipeline that processes markdown-formatted reference documents through stages of preprocessing, outline generation, content drafting, post-refinement (citation correction, figure/table insertion), and LaTeX/PDF output generation. Designed for offline use in its open-source version, it accepts survey titles, keywords, and local reference paths to produce structured surveys with watermarked PDF outputs. The architecture emphasizes separation of concerns with distinct modules for LLM interaction, content refinement, and document generation, supported by monitoring utilities for tracking token usage and pipeline timing.