$ account huggingface
Hugging Face Transformers is a large-scale Python library that provides thousands of pretrained Transformer model implementations for text, vision, audio, video, multimodal, time-series, and other modalities. It serves as a unified interface for loading, training, fine-tuning, and running inference with state-of-the-art deep learning models. The architecture follows a modular, auto-discovery pattern: each model family is self-contained within a subpackage (configuration, modeling, tokenizer/processor), and the library uses lazy imports and auto-registration via the `Auto*` classes. Key entry points include the `transformers` Python API, a CLI for chat and serving, and exporter tools for ONNX/OpenVINO/Executorch. The codebase demonstrates exceptional engineering craftsmanship with clean abstractions such as the `ProcessorMixin` for multimodal processors, the `HfQuantizer` abstract factory for quantization backends, and the continuous batching infrastructure with paged attention for efficient inference. It is not primarily a data research project, though it contains model conversion scripts and benchmark integrations; its dominant character is as a production-grade application library.
This repository is <code>timm</code> (PyTorch Image Models), a high-quality library providing a vast collection of image classification model architectures (100+), pretrained weights, training utilities, and data pipelines. It is not an application but a reusable library/framework, designed for research and production use. The codebase is well-structured with clear separation of concerns: <code>timm/layers</code> for building blocks (activations, normalizations, attentions, pooling), <code>timm/models</code> for model definitions with a consistent registry pattern, <code>timm/data</code> for data loading and augmentation (including AutoAugment, RandAugment, Mixup, CutMix), <code>timm/optim</code> for 30+ optimizers, <code>timm/scheduler</code> for learning rate schedulers, and <code>timm/task</code> for training task abstractions. The library supports distributed training, mixed precision, ONNX export, Hugging Face Hub integration, and dynamic input sizes (NaFlex). It is actively maintained by Hugging Face and the community, with frequent releases and a large number of pretrained models.
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.
This repository is the source code for the Hugging Face Agents Course, a structured educational curriculum teaching the fundamentals and practical implementation of AI agents. The course is organized into units covering agent theory (ReAct, tool calling, observations), framework-specific tutorials (smolagents, LlamaIndex, LangGraph), agentic RAG, observability and evaluation, and a final project based on the GAIA benchmark. The content is delivered as MDX files with embedded code examples, quizzes, and links to interactive notebooks, and is translated into multiple languages (English, Spanish, French, Chinese, Korean, Russian, Vietnamese). While primarily an educational resource, the repository also contains reusable scripts for automated translation of course content and for pushing quiz data to the Hugging Face Hub, as well as CI/CD workflows for building documentation. The codebase is not a production application or a data pipeline, but rather a hybrid of educational content and supporting tooling for course maintenance.
smolagents is a HuggingFace library for building LLM-powered agents, with a strong emphasis on 'code agents' that generate and execute Python code as actions. The core architecture consists of a ReAct-style loop (MultiStepAgent), with two main implementations: CodeAgent (writes Python code) and ToolCallingAgent (writes JSON tool calls). Agents are model-agnostic, supporting dozens of backends (OpenAI, LiteLLM, Hugging Face Inference API, local Transformers, vLLM, MLX, Bedrock, etc.) via a clean Model abstraction. Tools are defined as Python classes with typed inputs/outputs and automatic JSON schema generation, or via a simple @tool decorator, and can be shared on the HuggingFace Hub. The library includes a built-in AST-based Python executor (LocalPythonExecutor) for safe agent code execution, though it is explicitly not a security boundary; production use is directed toward sandboxed remote executors (E2B, Docker, Modal, Blaxel). Memory is managed through structured step objects (ActionStep, PlanningStep, TaskStep) with callbacks for customization. Additional features include MCP client integration, Gradio-based interactive UI, CLI tools, telemetry via OpenTelemetry, and serialization with SafeSerializer.
LeRobot is a large, modular robotics and robot-learning framework maintained by Hugging Face. Although it contains substantial research code (20+ policy implementations, reward models, dataset formats, and RL infrastructure), its dominant character is that of a production-grade application/library: it exposes a rich CLI surface (lerobot-train, lerobot-eval, lerobot-record, lerobot-calibrate, lerobot-teleoperate, lerobot-annotate, lerobot-rollout), supports real hardware robots, teleoperators, cameras, and motor buses, and provides a well-structured Python package that can be embedded into external applications. The repo is best described as hybrid: a research codebase packaged as an installable robotics application framework.
Open-R1 is a research-focused application for reproducing DeepSeek-R1's training and evaluation pipeline. It provides scripts for supervised fine-tuning (SFT) and group relative policy optimization (GRPO), along with tools for synthetic data generation using teacher models, dataset filtering based on pass rates, and evaluation on reasoning and code benchmarks (AIME, MATH, GPQA, LiveCodeBench). The project is a collection of CLI scripts and Python modules rather than a deployed service. It integrates tightly with Hugging Face Hub, Weights & Biases, and external code execution providers (E2B, Morph, Piston) for reward computation. The codebase exhibits good modularity in its reward functions and code execution provider abstractions, but is now deprecated in favor of upstream TRL. The repo is primarily a training/evaluation application, though aspects like dataset filtering and decontamination make it hybrid with data-research characteristics.
This repository implements a real-time speech-to-speech AI pipeline that emulates the OpenAI Realtime API over WebSocket and WebRTC. The system chains Voice Activity Detection (VAD), Speech-to-Text (STT), a Language Model (LLM), and Text-to-Speech (TTS) into a low-latency conversational loop. It supports multiple backends for each stage — including Silero VAD, Parakeet TDT, Whisper, Faster Whisper, MLX Whisper, Paraformer, Qwen3-TTS, Kokoro, ChatTTS, OmniVoice, and OpenAI-compatible APIs — all swappable via a CLI or server configuration. The project includes a fully functional browser demo with a dynamic orb UI, noise gate, tool execution (web search, camera), and daily usage limits. The architecture is built around a pipeline of queue-based handlers (VAD -> STT -> LLM -> TTS) with support for speculative turns, barge-in interruption, and cancellation scopes. The core server is a FastAPI application that exposes a single WebSocket endpoint (`/v1/realtime`) and a WebRTC endpoint (`/v1/realtime/calls`), managing per-connection state via `RealtimeService`. The codebase is structured into clear modules: `pipeline/` for core messages and control flow, `STT/`, `TTS/`, `LLM/`, `VAD/` for backend handlers, `api/openai_realtime/` for the protocol implementation, and `demo/` for the web client. Extensive tests (over 3000 lines for the realtime service alone) cover connection lifecycle, audio streaming, session updates, tool calls, and error handling. While primarily an application, the repo has strong data/research elements due to the integration of multiple state-of-the-art open models (Parakeet-TDT, Qwen3-TTS, Gemma 4, etc.) and the inclusion of speculative turn optimization, smart progressive streaming, and compaction prompts. The code is well-crafted with reusable patterns like `CancelScope`, `SpeculativeTurnTracker`, and `Chat` (conversation history manager). However, the alpha status and many optional dependencies mean the API is still evolving, and some platform-specific code (MLX, CUDA, GGML) may require careful setup.
Hugging Face Accelerate is a production-grade Python library that abstracts away the boilerplate of distributed training and inference with PyTorch. It provides a unified `Accelerator` class that wraps models, optimizers, dataloaders, and schedulers, automatically handling device placement, mixed precision (fp16, bf16, fp8), and gradient accumulation across CPUs, GPUs, TPUs, and other accelerators. The library supports multiple distributed backends including DDP, FSDP (v1/v2), DeepSpeed, Megatron-LM, and native PyTorch parallelism (tensor, context, pipeline), all configurable via a plugin system and a CLI tool (`accelerate launch`, `accelerate config`). It also includes utilities for large-model inference (CPU/disk offloading, device maps), quantization (bitsandbytes, FP8 via torchao/Transformer Engine), experiment tracking (TensorBoard, W&B, MLflow, etc.), and checkpointing with resume support. The architecture centers on the `Accelerator` class in `accelerator.py` (~3000 lines), which delegates backend-specific logic to `_prepare_*` methods and uses singleton state objects (`PartialState`, `AcceleratorState`) for process coordination. The `state.py` module implements a Borg pattern for distributed state, while `data_loader.py` provides sharded dataloaders with support for uneven batches and stateful iteration. The `big_modeling.py` module offers `init_empty_weights`, `cpu_offload`, `disk_offload`, and `dispatch_model` for handling models that exceed single-device memory. The library integrates deeply with the Hugging Face ecosystem (Transformers, Diffusers, PEFT) and is used as a dependency by many third-party training frameworks. Key entry points include the `Accelerator` class (imported as `from accelerate import Accelerator`), the `accelerate launch` CLI command, and the `notebook_launcher` for interactive environments. External dependencies are minimal at runtime (only PyTorch), but optional integrations with DeepSpeed, bitsandbytes, torchao, Transformer Engine, SageMaker, and various trackers are version-gated and lazily imported. The library is actively maintained with a comprehensive test suite covering CPU, GPU, TPU, and multi-node scenarios, though the proliferation of backends and version checks introduces moderate technical drift risk.
This repository provides a high-performance, production-grade inference server for text embeddings and sequence classification models, known as Text Embeddings Inference (TEI). The system is implemented primarily in Rust with a modular architecture comprising a router (HTTP/gRPC), a core layer for batching, tokenization, and inference orchestration, and multiple backends (Candle, ONNX Runtime, Python/PyTorch) that can be selected at compile time. The router exposes a comprehensive REST API (including OpenAI-compatible endpoints) and a gRPC service, with support for dynamic token-based batching, Prometheus metrics, OpenTelemetry tracing, and authentication. The Candle backend is heavily optimized with custom CUDA kernels (flash attention variants, cuBLASLt linear layers, fused norms) and supports a wide range of transformer architectures (BERT, ModernBERT, Mistral, Qwen2/3, Nomic, GTE, Jina, etc.). The codebase demonstrates strong engineering practices with snapshot testing, integration tests, load tests, Docker multi-arch builds, and CI/CD pipelines. The primary data flow is: client request -> router -> core inference queue (token-based batching) -> backend (model forward pass) -> pooled/raw embeddings or classification scores returned. No data research aspects are present; this is a pure application deployment of inference models.
This repository hosts the Hugging Face Deep Reinforcement Learning Course (v2.0), a free, open-source educational curriculum covering RL from fundamentals (Q-Learning, Policy Gradients) to advanced topics (PPO, A2C, Multi-Agent RL, Curiosity-Driven RL). It is primarily a collection of theoretical lessons (MDX files) and hands-on Jupyter notebooks designed to run on Google Colab. The notebooks train agents using libraries like Stable-Baselines3, CleanRL, ML-Agents, and Sample Factory, and push trained models to the Hugging Face Hub with evaluation videos and leaderboard comparison. While not a production application or data pipeline, the repo contains reusable training loops, evaluation helpers, and Hub packaging functions that can be extracted for other RL projects. The course is in low-maintenance mode, with some broken features (Unit 7 AI vs AI) and dependency drift (gym vs gymnasium), but the core content remains functional and well-structured.
AutoTrain Advanced is a no-code / low-code machine learning training platform from Hugging Face, providing a unified CLI, web UI (FastAPI + Jinja2), and REST API to fine-tune models on 15+ tasks including LLM SFT/DPO/ORPO, text/image classification, object detection, token classification, seq2seq, sentence transformers, and VLM. It wraps the Hugging Face ecosystem (transformers, datasets, peft, accelerate, trl) and supports multiple backends: local GPU, Hugging Face Spaces, NVIDIA NGC, and NVCF. The project is officially deprecated as of late 2024, with the README explicitly stating no new features will be added and recommending alternatives. The codebase is architecturally well-organized with a modular trainer structure, Pydantic parameter models, abstract backend patterns, and reusable callbacks, but suffers from duplicated dataset loading logic, heavy coupling to Hugging Face API, and a sprawling single-file UI. It remains functional for users who need a turnkey fine-tuning solution with existing dependencies, but is not suitable for new projects requiring long-term maintenance.
This repository is a massive collection of Jupyter notebooks, course materials, and documentation for the Hugging Face ecosystem (Transformers, Diffusers, Datasets, PEFT, smolagents, etc.). It serves as an educational resource, containing the official Hugging Face course in multiple languages, auto-generated documentation notebooks, and community examples covering NLP, computer vision, audio, and generative AI. It also includes SageMaker integration examples for training and deployment on AWS. The repository is primarily a documentation and learning resource, not a production application. It exhibits hybrid nature as it includes both educational content and reusable utility scripts and training patterns. The code quality is typical for tutorials: functional but not production-grade, with some deprecated API usage (e.g., `load_metric`), translation drift across languages, and auto-generated notebooks that may lag behind library updates. However, the core educational content is well-structured and actively maintained by Hugging Face.