Hugging Face
Hugging Face is the most important open-source community and tool ecosystem in AI, known as the "GitHub of AI". It provides a model hub, datasets, inference tools, and hosting services, and almost all open-source large models are distributed through it.
Three core products
Model Hub: hosts more than a million pretrained models covering NLP, vision, speech, and multimodality. Each model comes with a Model Card that describes training data, capabilities, limitations, and biases. Users can load any model with a single line using from_pretrained().
Datasets: tens of thousands of public datasets, accessed through a unified API, with streaming (no local disk usage), memory mapping, and automatic caching.
Spaces: free hosting for Gradio or Streamlit apps, so anyone can try a model with one click. This is the main channel for AI demos to spread.
The Transformers library
The most central Python library, it unifies the calling interface of various models. The same code can load architectures such as BERT, GPT, LLaMA, Qwen, and ViT, handling tokenization, weight download, and device mapping automatically. The pipeline() interface wraps common tasks (text classification, question answering, translation, summarization, image recognition) into a one-line call.
Surrounding tools
PEFT: a parameter-efficient fine-tuning library with built-in LoRA, QLoRA, and Prefix Tuning, letting consumer-grade GPUs fine-tune large models. Accelerate: hides the complexity of multi-GPU, mixed precision, and distributed training. TRL: reinforcement learning fine-tuning (RLHF, DPO). Tokenizers: a high-performance tokenizer implemented in Rust. Optimum: connects to inference acceleration backends such as ONNX Runtime and TensorRT.
Access problems in China
huggingface.co is hard to reach from mainland China. The solution is to use the mirror site hf-mirror.com: set the environment variable HF_ENDPOINT=https://hf-mirror.com and downloads work normally. ModelScope also serves as a domestic alternative.
Common misconceptions
Many people call from_pretrained to load a model without knowing that it is cached by default in ~/.cache/huggingface, and the disk quickly fills up. Set HF_HOME to point to a large-capacity disk. Also pay attention to the model license - some models forbid commercial use.