โ† AI Tools
Cloud AIBeginner

Hugging Face

A hub for AI/ML models, datasets, and apps โ€” featuring over 2 million models and integrated Inference API.

Hugging Face is an open-source AI community and platform co-founded in 2016 by Clรฉment Delangue, Julien Chaumond, and Thomas Wolf. In short, it can be described as the "GitHub for AI models, datasets, and demo apps." It hosts over 2 million pre-trained models, 350,000+ datasets, and 650,000+ Spaces demos on a single site, and the company also creates and maintains standard libraries such as Transformers, Diffusers, Datasets, and Accelerate. Previously, sharing AI models involved (1) authors of research papers providing only the training code on GitHub, with weights available upon separate request, (2) weights scattered across non-specialized repositories like Google Drive and Dropbox, (3) a lack of standardized licenses and metadata, and (4) inference requiring users to manually set up environments, leading to inefficiencies. Hugging Face Hub created a workflow of "visit the model page โ†’ click the Run button โ†’ perform inference immediately" by using git-lfs-based weight version control + Model Card standardization (README.md + metadata in YAML) + Inference API (huggingface.co/api/). It's like "npm, PyPI, and Docker Hub standardized software packages, and HF is standardizing AI models." From the perspective of a biomedical researcher, it allows for (1) immediate use of domain-specific models such as BioGPT, BioBERT, ESMFold, ProtGPT2, and ChemBERTa with just five lines of code, (2) integration of medical NLP benchmark datasets such as PubMedQA, MedQA, and BC5CDR, (3) immediate forking and modification of protein structure visualization and drug interaction prediction demos created with Spaces, (4) cloud inference without a GPU using the Inference API (monthly free quota + paid dedicated endpoint), and (5) automated fine-tuning on custom datasets using AutoTrain. By mastering the Transformers library, you can handle 90% of SOTA models with a unified API. It is powerful when used in parallel with local execution tools such as Ollama and LM Studio. This allows for combinations such as downloading GGUF and safetensors weights from HF โ†’ performing local quantized inference with Ollama / calling large models in the cloud using the HF Inference API / deploying custom demos on Spaces. A PRO subscription (monthly) provides faster inference + more Spaces GPU time.

๐Ÿ’ป System Requirements

๐Ÿง RAM

0 when using the cloud (Inference API only requires a browser). When using locally downloaded models, 8-128GB+ depending on the model size.

๐ŸŽฎVRAM

0 when using the cloud / 4GB+ (for small models) ~ 80GB+ (for large LLMs) when using a local GPU. Transformers automatically distributes across multiple GPUs with device_map="auto".

๐Ÿ’พStorage

The default local cache location is ~/.cache/huggingface/hub. 100GB+ is recommended when downloading large models. The location can be changed using the HF_HOME environment variable.

โšก Installation

# Python (Transformers core library)
pip install transformers datasets accelerate

# 1. Load model + inference (3 lines)
from transformers import pipeline
pipe = pipeline("text-generation", model="meta-llama/Llama-3.3-70B-Instruct")
print(pipe("What is the difference between AlphaFold and ESMFold in protein structure prediction?"))

# 2. Inference API (Cloud call without GPU)
import requests
API_URL = "https://api-inference.huggingface.co/models/microsoft/biogpt"
headers = {"Authorization": f"Bearer {HF_TOKEN}"}
r = requests.post(API_URL, headers=headers, json={"inputs": "COVID-19 mortality is associated with"})

# 3. Load dataset
from datasets import load_dataset
ds = load_dataset("qiaojin/PubMedQA", "pqa_labeled")

# 4. Download model using HF CLI (download weights directly, e.g., gguf)
pip install huggingface_hub
huggingface-cli login
huggingface-cli download bartowski/Llama-3.3-70B-Instruct-GGUF --include "*Q4_K_M*" --local-dir ./models/llama-3.3-70b

# 5. Deploy Spaces demo (Gradio)
pip install gradio
# After writing app.py
gradio deploy
๐Ÿ“„ Official Docs๐Ÿ™ GitHub

๐Ÿ“ Update Notes

No update notes yet.

๐Ÿงช Related Code of Life

No related Code of Life posts yet.