16Topic 16 of 16
Hugging Face
The Hub in practice: download and cache models, gated repos, GGUF with Ollama, transformers, Inference Providers, datasets, uploads, Spaces.
- 16.01 Download Models from Hugging Face with the hf CLI Install the hf CLI, log in, download one GGUF instead of a whole repo with --include, put files where you want with --local-dir, and clean the cache. 3 min
- 16.02 How to Find the Right Model on Hugging Face Filter the Models page by task, library, language, license and size, read the sort signals and the model card, pick a file, and search from the API. 3 min
- 16.03 Where the hf CLI downloads models and how to move it Find the hf CLI cache path on Windows, macOS and Linux, inspect it with hf cache ls, move it with HF_HOME, and prune old models. 3 min
- 16.04 Access gated models (Llama, FLUX) and fix 401 errors Accept the model licence, create a read or fine-grained token, log in with hf auth login, set HF_TOKEN for CI, and fix 401/403 errors. 3 min
- 16.05 Run any GGUF from Hugging Face with Ollama or llama.cpp Pick a GGUF quant in the Files tab, then run it with ollama run hf.co/user/repo or llama-cli -hf user/repo:QUANT. 3 min
- 16.06 Transformers pipeline(): Run a Hugging Face Model Locally Install PyTorch and transformers, chat with a small instruct model via pipeline(), set device_map, dtype and max_new_tokens, then classify an image. 3 min
- 16.07 Hugging Face Inference Providers: First API Request One HF token, one endpoint: call an open model with InferenceClient, the OpenAI SDK or curl, pick a provider, and see how billing works. 3 min
- 16.08 Load, Stream and Filter a Hugging Face Dataset in Python Load a Hub dataset split, inspect its features, stream one too big to download, filter and batch-map it, then save it as Parquet or JSONL. 3 min
- 16.09 Upload a Model or Dataset with the hf CLI Log in, create a repo with hf repos create, push files with hf upload and include/exclude, write a minimal README card, and do the same from Python. 3 min
- 16.10 Deploy a Gradio App to Hugging Face Spaces Write a minimal Gradio app.py, add requirements.txt and a Space README, create the Space, push with the hf CLI, set secrets, and read the build logs. 3 min
- 16.11 Connect the Hugging Face MCP Server to Claude Code or Cursor Add https://huggingface.co/mcp with a read token so your agent searches models, datasets, papers and docs from the chat, and uses MCP Spaces as tools. 3 min
- 16.12 Fix stuck or incomplete Hugging Face downloads Resume a stuck hf download, clear broken .incomplete partials with hf cache prune, and speed transfers with hf_xet when disk space allows. 3 min
Keep going