Unsloth is a full-stack, local-first AI platform for fine-tuning and inference of large language models (LLMs), diffusion models, and audio models. It consists of two primary components: (1) the core `unsloth` Python library, which provides highly optimized LoRA/QLoRA/RL training with custom Triton kernels, and (2) the Unsloth Studio application, a Tauri desktop app with a React frontend (TanStack Router, Zustand) and a FastAPI backend (SQLite, structlog). The platform enables users to discover models from the Hugging Face Hub, download and manage them locally, run inference with chat, image/video generation, and RAG, fine-tune with a visual recipe editor, and export in multiple formats (GGUF, NVFP4). It also integrates external LLM providers (OpenAI, Anthropic, Ollama) and supports agentic tool loops via MCP and Codex transports. The codebase is extensively tested with both unit tests and source-level contract tests, and includes cross-platform desktop installers for Windows, macOS, and Linux.
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.
The repository provides a comprehensive ecosystem for the MiniCPM-V and MiniCPM-o series of multimodal large language models (MLLMs). It enables efficient on-device inference and real-time full-duplex multimodal interaction (vision + audio + text) with low latency. The core contributions include the OmniLMM architecture with intra-ViT early compression for visual encoding, mixed 4x/16x visual token compression, and support for streaming audio/video inputs. The system includes evaluation frameworks for multimodal benchmarks (MMBench, Video-MME, OmniDocBench), fine-tuning utilities (LoRA and full model), and deployment tools for various platforms (iOS, Android, HarmonyOS, web) and inference backends (vLLM, SGLang, llama.cpp, Ollama). Key entry points are the model inference code in omnilmm/model/, evaluation scripts in eval_mm/vlmevalkit/, fine-tuning in finetune/, and web demos in web_demos/ demonstrating real-time chat with multimodal inputs.
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.
LlamaIndex is a comprehensive Python framework designed for building Large Language Model (LLM) applications, with a primary focus on Retrieval-Augmented Generation (RAG) and agentic workflows. It functions as a modular library rather than a monolithic application, providing abstractions for data ingestion, indexing, retrieval, and query orchestration. The architecture is split between a core package (`llama-index-core`) containing base interfaces and logic, and a vast ecosystem of integration packages (`llama-index-integrations`) that connect to external LLM providers, vector databases, and data sources. The codebase demonstrates a strong plugin-based design, allowing developers to swap components like embeddings, retrievers, and LLMs without rewriting the core orchestration logic.
Kiln is a full-stack AI development platform for building, evaluating, and optimizing LLM-based tasks and agents. It provides a desktop application (Tkinter tray + FastAPI server) with a Svelte web UI, plus a core Python library and a cloud server component. The system supports the complete AI workflow: project/task management, multi-provider LLM orchestration via LiteLLM, evaluation with multiple judge types (LLM-as-judge, code eval, exact match, pattern match, etc.), synthetic data generation, RAG pipelines (chunking, embedding, vector stores), fine-tuning, prompt optimization, and Git-based project versioning. It also includes a 'Kiln Pro' cloud service for advanced features like copilot-assisted spec refinement and batch generation. The architecture is a monorepo with uv workspace, featuring extensive test coverage (unit, integration, e2e) and CI/CD pipelines. While the primary character is an application, it incorporates significant data engineering patterns for evaluation pipelines, synthetic data generation, and statistical analysis.
H2O LLM Studio is a web-based application for fine-tuning large language models (LLMs) without requiring coding experience. It provides a GUI built on H2O Wave and CLI tools for dataset import, experiment configuration, model training, evaluation, and export to Hugging Face Hub. The system supports multiple problem types including causal language modeling, classification, regression, sequence-to-sequence, and Direct Preference Optimization (DPO). The architecture centers around a Wave server handling both UI and backend logic, with distributed training capabilities via DeepSpeed. Key components include a configuration system using dataclasses, utilities for conversation chain handling, model loading abstractions, and factory patterns for training components.
This is a comprehensive educational course repository ('Generative AI for Beginners') containing 21 structured lessons covering the full spectrum of generative AI application development. While classified as an application repository due to its extensive runnable code examples across Python, JavaScript, TypeScript, and .NET, its primary purpose is pedagogical. The repository teaches practical patterns for building GenAI applications including: prompt engineering, chat applications, RAG/vector search, image generation, function calling, AI agents, fine-tuning, LLMOps, and responsible AI practices. Each lesson provides assignments and solutions for multiple LLM providers (Azure OpenAI, OpenAI, GitHub Models). The codebase demonstrates modern GenAI application patterns with a strong emphasis on multi-language implementation parity and accessibility through 40+ language translations. The shared/python utilities provide reusable helpers for API interactions, environment management, and input validation that could be extracted for production use.
This repository is a comprehensive educational resource focused on production-grade Generative AI systems, specifically designed for interview preparation and professional reference. Rather than being an executable application, it serves as a detailed knowledge base covering 16 critical areas of modern GenAI deployment, from foundational concepts like RAG systems and embedding technologies to advanced topics including multi-agent architectures, cost optimization, and system design. The content is organized into difficulty-levelled sections (Fresh, Intermediate, Advanced, Expert) with each topic featuring expected answers, common pitfalls (Red Flags), and real-world production statistics drawn from MENA enterprise deployments. What distinguishes this resource is its practical orientation - it emphasizes what actually works in production environments rather than theoretical concepts, with specific attention to trade-offs, failure modes, and optimization strategies observed in real implementations. While the repository contains no executable code and thus has no traditional software architecture or reusable components, it excels as structured educational content. The markdown-based organization allows for easy navigation, and the inclusion of SVG diagrams helps visualize complex architectures. The resource demonstrates particular strength in its coverage of production-specific concerns: evaluation methodologies, observability practices, security guardrails, and cost optimization techniques that are often overlooked in more theoretical treatments of GenAI topics.
Moondream is a lightweight, open-source vision-language model (VLM) library and inference framework. The core of the repository is a PyTorch model (`MoondreamModel`) that comprises a vision encoder, a text decoder (based on a transformer with optional MoE layers), and a region model for spatial grounding. It supports image captioning, visual question answering, object detection, pointing, and gaze detection through a unified API. The library is designed for efficient inference on both GPU and CPU, with support for quantization (via torchao) and LoRA-based fine-tuning. The codebase is cleanly structured into modular components for vision, text, and region processing, each with clear configuration dataclasses. The repository also includes a HuggingFace integration (`HfMoondream`) for easy loading via the transformers library, and several ready-to-use demos (Gradio apps, CLI samples). Beyond the core library, the repo contains a rich set of evaluation scripts (ChartQA, POPE, DocVQA, COCO mAP, etc.) that benchmark the model on standard VLM tasks, and finetuning examples that demonstrate how to adapt the model to custom datasets using reinforcement learning or supervised fine-tuning. Additionally, there are recipe applications (promptable video redaction, content moderation, gaze detection) that showcase practical use cases built on top of Moondream. While the primary character is an application/library, the presence of extensive evaluation and finetuning code gives it a hybrid research-engineering flavor. The code is well-maintained, with active commits and CI, and uses up-to-date dependencies, resulting in low technical drift.
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.
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 is the official release hub for the MiniCPM family of compact large language models (1B to 8B parameters) from OpenBMB. It provides model weights, deployment scripts for 10+ inference backends (vLLM, SGLang, llama.cpp, Ollama, etc.), fine-tuning recipes for 5 frameworks (TRL, LLaMA-Factory, unsloth, etc.), quantization tools (AWQ, GPTQ, BNB), and application demos (survey generation, MCP tool calling, code interpreter). The repo is primarily a model card and cookbook collection rather than a single integrated application; it serves as a developer toolkit for deploying and customizing MiniCPM models in production and edge scenarios. The repository also includes research artifacts such as training datasets (UltraData suite) and technical reports, but the dominant character is applied machine learning engineering.
This repository is a comprehensive collection of examples, tutorials, and applications demonstrating how to use LanceDB (a vector database) for various AI/ML applications. It showcases patterns for retrieval-augmented generation (RAG), multimodal search, chatbots, recommendation systems, and AI agents. The repository contains both Python and JavaScript/TypeScript implementations, with many examples featuring web interfaces using Streamlit, Gradio, or React. While it serves as a valuable resource for learning LanceDB integration patterns, the quality varies across examples, and some content is marked as archived.
The solo-cli is a command-line tool designed to deploy and manage Physical AI systems on local hardware. It integrates functionalities for serving large language models (via Ollama, vLLM, or llama.cpp), controlling robotic arms (through the LeRobot framework), authenticating with a custom model hub (Solo Hub), and fine-tuning models using external datasets. The application features a modular command structure with lazy-loaded dependencies to optimize startup time, cross-platform hardware detection for automated backend selection, and a layered configuration system. Additional utilities include Docker management, system information gathering, and filesystem-safe string handling for robotics data operations. The project also includes example implementations of Model Context Protocol (MCP) servers for various domains, demonstrating how to extend the CLI's capabilities for specialized AI workflows.
This repository is a collection of standalone examples demonstrating the MLX framework (Apple's machine learning framework for Apple Silicon). It covers a wide range of deep learning models including LLMs (Mistral, Mixtral, Llama, T5), image generation (Stable Diffusion, FLUX, CLIP), video generation (Wan2.1), audio (Whisper, MusicGen, EnCodec), segmentation (SAM), and more. Each example is self-contained with its own entry point (CLI or Python script), model conversion utilities, and often a training/fine-tuning script. The repository is primarily an application-focused showcase with some research elements (e.g., normalizing flows, GCN). Production entry points include `whisper/mlx_whisper/cli.py` for transcription, `flux/txt2image.py` for image generation, `video/wan2.1/txt2video.py` for video generation, and `lora/lora.py` for fine-tuning. All examples depend on the MLX library and often bundle conversion from PyTorch weights. The architecture is a flat collection of independent projects, not a unified framework, leading to some code duplication (e.g., T5 and EnCodec are copied into multiple directories). However, several components are well-crafted and reusable, notably the Whisper decoding pipeline, the LoRA adapter module, and the flow-matching samplers for diffusion models.
Musubi Tuner is a comprehensive LoRA training and inference toolkit for a wide range of diffusion model architectures, including HunyuanVideo, Wan, FramePack, FLUX variants, Qwen-Image, Z-Image, HiDream-O1, Ideogram4, Krea2, and Kandinsky5. It provides a unified pipeline of pre-caching (latents and text encoder outputs), training (LoRA, LoHa, LoKr), and generation, all accessible via CLI scripts and an optional Gradio GUI. The codebase is built on a shared `NetworkTrainer` base class with architecture-specific overrides, and includes advanced memory-saving techniques such as block-swap CPU offloading, FP8 quantization, and gradient checkpointing. While the repository is actively maintained and widely used (2035 stars), it exhibits medium technical drift due to vendored external model code, deprecated diffusers API usage, and a proliferation of near-duplicate architecture-specific scripts. The core reusable components—unified attention backend, offloading utilities, FP8 optimization, and LoRA network infrastructure—demonstrate solid engineering craftsmanship.
llm-action is a comprehensive resource hub for large language model engineering that combines theoretical explanations with practical implementation code. It covers the full LLM lifecycle including data engineering, training (full fine-tuning and parameter-efficient methods like LoRA/QLoRA), model compression (quantization, pruning, distillation), inference serving, deployment, and evaluation. The repository contains both educational documentation and runnable code examples, with particular emphasis on Chinese-language resources and domestic AI hardware adaptation (especially Huawei Ascend NPUs). While it serves as a knowledge base, its inclusion of actual training scripts, inference servers, and utility tools makes it primarily application-oriented rather than purely research-focused.
This repository is the companion code for the O'Reilly book 'Hands-On Large Language Models' by Jay Alammar and Maarten Grootendorst. It provides 12 chapters of Jupyter notebooks covering fundamental and advanced LLM topics including tokenization, embeddings, text classification, clustering, prompt engineering, semantic search, multimodal models, fine-tuning, and generation. All notebooks are designed to run on Google Colab with free GPU resources and rely heavily on Hugging Face libraries (transformers, datasets, sentence-transformers, TRL) and external APIs (OpenAI, Cohere). The code is educational in nature, with clear step-by-step explanations and visualizations. While it is not a production application or a novel research pipeline, it serves as a high-quality, reproducible tutorial resource for practitioners learning LLM workflows. The repository includes pinned dependencies, Conda environment setup, and local installation guides, making it relatively easy to reproduce in a controlled environment, though API keys are required for some sections.
This repository is the official companion code for the O'Reilly book 'Natural Language Processing with Transformers' by Tunstall, von Werra, and Wolf. It contains 11 Jupyter notebooks, one per chapter, covering the full spectrum of NLP with Transformers: text classification, named entity recognition, text generation, summarization, question answering, model compression, few-shot learning, and training a transformer from scratch. The code is built on the Hugging Face ecosystem (transformers, datasets, accelerate) and is designed to be run interactively on Colab, Kaggle, or local GPU environments. The notebooks are well-structured with clear section headings, explanatory text, and visualizations, making them an excellent educational resource for learning state-of-the-art NLP techniques. Although the repository is primarily educational, it includes a SageMaker adaptation for some chapters, demonstrating deployment of Hugging Face models on AWS. The codebase is not intended as a production-grade library; rather, it serves as a tutorial and reference for practitioners. The overall quality is solid, with clean, reproducible code patterns, but the reliance on pinned, outdated library versions (e.g., transformers 4.16.2, datasets 1.16.1) and the deprecated Chapter 7 (farm-haystack) indicate moderate technical drift. The concepts remain relevant, but the exact code may require adjustments to run with the latest versions.