Hugging Face & Open Source Models Study Guide — AI Intermediate

17% of the exam · domain 4 of 5 · AI Intermediate · Free Hugging Face & Open Source Models practice questions

0 of 50 topics covered
What the exam asks here — tap to tick off0 / 10 covered
Domain 4 of 5

Hugging Face & Open Source Models

This domain tests your ability to work with the Hugging Face ecosystem—Hub, APIs, and the transformers library—as well as open-source model selection, local inference with Ollama, quantization strategies, and fine-tuning fundamentals. It accounts for 17% of the exam, making it one of the heavier-weighted domains. Expect questions on exact API behavior, license restrictions, quantization tradeoffs, and when to choose one tool or approach over another.


Hugging Face Hub: Model Cards, Datasets, Spaces, Organizations

The Hugging Face Hub is a Git-based repository platform hosting models, datasets, and Spaces. Every artifact lives at a URL with the pattern huggingface.co/{owner}/{repo-name}.

Model cards are README.md files stored at the root of a model repository. They contain: intended use, training data, evaluation results, license, and limitations. The Hub renders them as a structured page. Exam questions may ask what component documents bias, limitations, or usage restrictions—the answer is always the model card.

Datasets on the Hub are versioned repositories loadable via datasets.load_dataset("owner/name"). They support multiple splits (train/validation/test) and multiple configurations (subsets).

Spaces host live demos backed by Gradio or Streamlit. Free Spaces run on CPU; GPU Spaces require a paid tier or grant. Spaces use a README.md with YAML front matter that sets sdk: gradio or sdk: streamlit.

Organizations let teams share repositories under a single namespace. Members have roles: read, write, contributor, admin.

Hub ObjectStorage FormatKey FileLoaded With
ModelGit LFS repoconfig.json, pytorch_model.bin / safetensorsfrom_pretrained()
DatasetGit LFS repodataset_infos.json, Parquet/CSV/JSONload_dataset()
SpaceGit repoapp.py, README.md (YAML header)Browser / iFrame embed

Common traps:

  • Confusing the model card (documentation) with config.json (architecture config). The model card is README.md.
  • Assuming Spaces always have GPU—free tier is CPU-only.
  • Thinking load_dataset requires a local file; it can pull directly from the Hub by name.

Model Licenses: Apache 2.0, MIT, Llama Community License, RAIL

License choice determines whether you can use a model commercially, redistribute it, or modify it.

LicenseCommercial UseRedistributionModificationKey Restriction
MIT✅ Yes✅ Yes✅ YesMust include copyright notice
Apache 2.0✅ Yes✅ Yes✅ YesMust state changes; patent grant included
Llama Community License✅ Yes (≥700M MAU requires Meta approval)✅ Yes (must include license)✅ YesCannot use outputs to train competing foundation models
RAIL (Responsible AI License)⚠️ Conditional✅ Yes✅ YesProhibits specific harmful use cases enumerated in the license
OpenRAIL-M✅ Yes✅ Yes✅ YesSame use-case restrictions as RAIL; common on HF

Key distinctions for the exam:

  • Apache 2.0 provides an explicit patent license—MIT does not. If patent protection matters, Apache 2.0 is the stronger choice.
  • Llama Community License blocks using model outputs to train competing foundation models, and organizations with >700M monthly active users must request a separate license from Meta.
  • RAIL/OpenRAIL-M licenses travel with the model—downstream users must also comply with use restrictions. They do NOT prohibit commercial use broadly; they prohibit specific enumerated harms.

Common traps:

  • Thinking Llama models cannot be used commercially—they can, with the exception noted above.
  • Confusing RAIL as "open source"—the OSI does not recognize RAIL as open source because of use restrictions.
  • Assuming MIT and Apache 2.0 are interchangeable—Apache 2.0 adds patent protection and change documentation requirements.

Worked scenario: A startup wants to fine-tune Llama 3.1 8B for a customer-service product serving 500M users and redistribute the fine-tuned model. Is this allowed? Yes—500M < 700M MAU threshold. If they grow past 700M MAU, they must contact Meta for a license. Using those fine-tuned model outputs to train a new competing LLM is prohibited regardless of size.


Unlock with a paid plan

11 more sections (about 2,684 words) continue below. Every paid plan unlocks all AI Intermediate study guides, the full question bank and mock exams, from $4.97/month.