Jump to content

Hugging Face Practical Guide 260802

From MediawikiCIT

Hugging Face — Practical Guide

Compiled: 2026-08-02 · Status: Living page — open for deeper research

Why it is here: Hugging Face is currently used at Comfac as a download endpoint for stock model files. It is four things, and the other three are the ones we under-use.

The goal behind this page: access to free open-source models that are better than the stock ones and more tailored to a specific job, the harnesses built around them, and the training resources that take a corpus of a few hundred owned data points and work it up toward thousands.

That last one is the unclosed loop in De-Risk: Sovereign Training Data v0.1 — we have clean, owned process knowledge and no mechanism yet for turning it into weights we own.

Each section below ends with search keywords for going deeper on that one bucket.

Source videos

Note: this wiki does not have the EmbedVideo extension installed (verified 2026-08-02 via api.php ... siprop=extensions), so videos are listed as preview cards rather than embedded players. The gwiki copy of this page has EmbedVideo and shows them inline. Installing the extension here is an administrator action.

Video What it covers Use it for
What Is Hugging Face and How To Use It The general tour — Spaces, the Model Hub, the Datasets section, and how they relate. Sections 1–3 below. Start here if Hugging Face has only ever been a download link.
The Hugging Face Hub for Enterprise & Academia Private workspaces, SSO, access control, separated compute/storage billing, SSH onto Spaces hardware, and remote training with hf jobs. Section 4. This is the one that matters for training on our own data.

1. Exploring and using pre-built AI (Spaces)

Spaces are ready-to-use, browser-based applications built by the AI community — image and video generators, voice synthesis, transcription, live demos of new papers. All runnable without writing code.

If a Space is useful, click Duplicate Space. That forks it into your own account as your own copy, public or private, on hardware you select.

Two things worth internalising:

  • A Space is a real repository, not a demo sandbox. Duplicating gives you the source.
  • Most Spaces are Gradio apps. Learn Gradio once and the whole catalogue becomes editable.

Search keywords: "Hugging Face Spaces tutorial" · "How to build and deploy Gradio apps on Hugging Face" · "Duplicating Hugging Face Spaces"

2. Building custom apps locally

Because Spaces are open source, the code comes to your machine. Clone the repository, open it in an AI-assisted IDE, run it locally, and connect your own API keys instead of the demo's. From there the IDE can help you change colours, fonts, or actual behaviour.

This is the cheapest route to a harness we control — instead of writing scaffolding from scratch, start from a working app and cut it down.

Practical notes:

  • Expect the first local run to fail on dependencies or a missing key. That failure, written down, is the reusable knowledge — not the happy path.
  • Check the licence before adapting anything. Open-source and permissively-licensed are not the same thing, and licence direction is one-way once code is borrowed.

Search keywords: "Clone Hugging Face Space locally" · "Build AI apps with Cursor and Hugging Face" · "Integrate LLM API keys in Hugging Face local apps"

3. Finding models and datasets

The Model Hub is the core: over 1.5 million open-source models categorised by task — computer vision, NLP, audio, robotics. The Datasets section holds the data that trained them.

Navigate by task tag, not by keyword. Searching an acronym returns papers; filtering by task returns weights:

https://huggingface.co/models?pipeline_tag=robotics
https://huggingface.co/api/models?pipeline_tag=robotics (API form, for scripting)

The advanced feature almost nobody touches is the dataset viewer: chat with a dataset through an AI agent and run SQL queries in the browser to analyse it before downloading a single gigabyte. For evaluating training data this is the highest-value habit on the page.

Our standing admission rule applies here: a model card is a claim, not a measurement. Nothing enters the local model roster on a card alone — it enters on a real API call, the same gate used for the Synopsis model-selection slate. See Comfac GPU Scaling and AI Research Goals §Applied Model Evaluation and 🧠 Process: Selecting and Installing the Right Ollama Model for Your Hardware.

Search keywords: "How to choose and run Hugging Face models" · "Hugging Face dataset viewer SQL tutorial" · "Fine-tuning open source models Hugging Face"

4. Scaling for teams and enterprise

For organisations and academic teams the paid tiers add private workspaces, single sign-on (SSO), and granular access control.

The structural benefit is that compute and storage are billed separately — no paying for idle hardware. Two working modes follow:

  • SSH directly onto Spaces hardware and develop there, as if it were a remote box.
  • hf jobs — fire a heavy training workload at remote hardware and collect the result.

The second is what makes a fine-tune possible without owning the GPU it would need.

Search keywords: "Hugging Face Enterprise setup guide" · "Running hf jobs on zero GPU Hugging Face" · "Hugging Face private workspaces and security"


Open problem — where this is going

Three goals, none closed. Tracked in work/comfac-operations/BACKLOG-huggingface-model-sourcing-and-training.md.

  1. Better than stock. The models we run locally today are stock bases. Tuned community models in the same size band may follow instructions better for a specific task, at no cost — but only a run against a gate written beforehand counts as evidence.
  2. Harnesses instead of rebuilds. Identify the Spaces that overlap tooling we would otherwise write ourselves.
  3. Training on owned data. Start at a few hundred data points and work toward thousands.

The constraint on goal 3

Frontier-Token Quarantine is binding. Per De-Risk: Sovereign Training Data v0.1, distilling commercial frontier-model outputs into our own weights trades a regulatory dependency for a contractual liability — in writing, with discoverable provenance logs. Any training corpus must be clean by construction. Tooling cannot launder provenance; that was named as the weakest claim in the source report.

Hardware reality check

Anything meant to run on a normal workstation has to fit the VRAM actually available, alongside whatever else is already resident — a vision model kept loaded for a document pipeline is not free. Size band and quantisation are a filter applied first, not a compromise made afterwards. A related finding already measured here: 4-bit quantisation degrades digit reading, so anything touching numbers on a form runs at 8-bit.

See also