Skip to Content
SourcesHugging Face

Hugging Face

Hugging Face

Stream files from a Hugging Face dataset, model, or space repository without cloning it.

Category
Warehouse & Lakehouse
Source type
HUGGING_FACE
Produces
fileimageaudiovideoarchive

Training data is data. A dataset repository your team published — or one a model was fine-tuned on — can carry customer records, internal documents, or credentials in a config file, and nothing about being on the Hub changes that.

What you need to connect

A repository id (namespace/name) and its kind: dataset, model, or space. Public repositories need no credential; private and gated ones need a read-scoped access token. Self-hosted Enterprise Hubs are supported by setting the endpoint.

What Classifyre reads

Files inside the repository, at whichever revision you choose — a branch, a tag, or a commit SHA. The repository is never cloned: files are listed, then streamed one at a time, so scanning a repository with terabytes of weights in it costs nothing if you filter the weights out.

Narrow the scan with folder paths, glob allow/deny patterns, and extension filters. Excluding .safetensors, .bin and .gguf is usually the first thing you want.

Shared behaviour · File and object sources

Every object in the repository becomes one asset. What it is — a PDF, a spreadsheet, a screenshot, a video — is worked out from the bytes themselves, not from the file name, because storage systems routinely label everything as generic binary data. The full list of readable types is on File Formats.

Files hidden inside other files are pulled out and scanned in their own right: images embedded in a document, and every member of a ZIP, TAR, 7z or RAR archive. Images, audio and video need OCR and transcription switched on before their content can be read.

Large objects are streamed rather than loaded whole, so a multi-gigabyte file costs disk rather than memory, and only the part a sampling window asks for is read.

Files in this repository are read with the shared file pipeline: see Supported File Formats for everything it can open, and OCR & Transcription for reading text out of images, audio and video.

Metadata on every asset

Asset kind · file

FieldTypeAlways presentWhat it is
size_bytesintegerYesRaw byte size of the content
mime_typestringYesResolved MIME type
parse_errorstringNoSet when content extraction failed
image_widthintegerNoWidth in pixels
image_heightintegerNoHeight in pixels
page_countintegerNoNumber of pages (pdf)
paragraph_countintegerNoNumber of paragraphs (docx)
table_countintegerNoNumber of tables (docx)
row_countintegerNoNumber of data rows
columnsobject[]NoColumns as {name, type} objects (type may be empty for csv/xlsx)
encodingstringNoDetected character encoding
json_root_typestringNoRoot JSON type: object, array, or scalar
top_level_keysintegerNoNumber of top-level keys when the root is an object
array_lengthintegerNoLength when the root is an array
providerstringYesStorage provider label
object_keystringYesFile path relative to the repository root
repo_idstringYesRepository the file belongs to (namespace/name)
repo_typestringYesRepository kind the file was read from: model, dataset or space
revisionstringNoCommit SHA the file was read at (resolved from the configured revision)
etagstringNoContent digest of the file: the Git LFS SHA-256 when present, otherwise the Git blob OID
blob_idstringNoGit object ID (OID) of the file blob
lfs_sha256stringNoSHA-256 recorded in the Git LFS pointer, for files stored in LFS
web_urlstringNoBrowser-accessible Hugging Face URL for the file
source_hashstringNoHash of the parent asset (embedded files and archive members only)
locationstringNoLocation within the parent (embedded file location or archive member path)

Asset kind · image

FieldTypeAlways presentWhat it is
size_bytesintegerYesRaw byte size of the content
mime_typestringYesResolved MIME type
parse_errorstringNoSet when content extraction failed
image_widthintegerNoWidth in pixels
image_heightintegerNoHeight in pixels
providerstringNoStorage provider label
object_keystringNoFile path relative to the repository root
repo_idstringNoRepository the file belongs to (namespace/name)
repo_typestringNoRepository kind the file was read from: model, dataset or space
revisionstringNoCommit SHA the file was read at (resolved from the configured revision)
etagstringNoContent digest of the file: the Git LFS SHA-256 when present, otherwise the Git blob OID
blob_idstringNoGit object ID (OID) of the file blob
lfs_sha256stringNoSHA-256 recorded in the Git LFS pointer, for files stored in LFS
web_urlstringNoBrowser-accessible Hugging Face URL for the file
source_hashstringNoHash of the parent asset (embedded files and archive members only)
locationstringNoLocation within the parent (embedded file location or archive member path)

Asset kind · audio

FieldTypeAlways presentWhat it is
size_bytesintegerYesRaw byte size of the content
mime_typestringYesResolved MIME type
parse_errorstringNoSet when content extraction failed
providerstringYesStorage provider label
object_keystringYesFile path relative to the repository root
repo_idstringYesRepository the file belongs to (namespace/name)
repo_typestringYesRepository kind the file was read from: model, dataset or space
revisionstringNoCommit SHA the file was read at (resolved from the configured revision)
etagstringNoContent digest of the file: the Git LFS SHA-256 when present, otherwise the Git blob OID
blob_idstringNoGit object ID (OID) of the file blob
lfs_sha256stringNoSHA-256 recorded in the Git LFS pointer, for files stored in LFS
web_urlstringNoBrowser-accessible Hugging Face URL for the file
source_hashstringNoHash of the parent asset (embedded files and archive members only)
locationstringNoLocation within the parent (embedded file location or archive member path)

Asset kind · video

FieldTypeAlways presentWhat it is
size_bytesintegerYesRaw byte size of the content
mime_typestringYesResolved MIME type
parse_errorstringNoSet when content extraction failed
providerstringYesStorage provider label
object_keystringYesFile path relative to the repository root
repo_idstringYesRepository the file belongs to (namespace/name)
repo_typestringYesRepository kind the file was read from: model, dataset or space
revisionstringNoCommit SHA the file was read at (resolved from the configured revision)
etagstringNoContent digest of the file: the Git LFS SHA-256 when present, otherwise the Git blob OID
blob_idstringNoGit object ID (OID) of the file blob
lfs_sha256stringNoSHA-256 recorded in the Git LFS pointer, for files stored in LFS
web_urlstringNoBrowser-accessible Hugging Face URL for the file
source_hashstringNoHash of the parent asset (embedded files and archive members only)
locationstringNoLocation within the parent (embedded file location or archive member path)

Asset kind · archive

FieldTypeAlways presentWhat it is
size_bytesintegerYesRaw byte size of the content
mime_typestringYesResolved MIME type
parse_errorstringNoSet when content extraction failed
providerstringYesStorage provider label
object_keystringYesFile path relative to the repository root
repo_idstringYesRepository the file belongs to (namespace/name)
repo_typestringYesRepository kind the file was read from: model, dataset or space
revisionstringNoCommit SHA the file was read at (resolved from the configured revision)
etagstringNoContent digest of the file: the Git LFS SHA-256 when present, otherwise the Git blob OID
blob_idstringNoGit object ID (OID) of the file blob
lfs_sha256stringNoSHA-256 recorded in the Git LFS pointer, for files stored in LFS
web_urlstringNoBrowser-accessible Hugging Face URL for the file
source_hashstringNoHash of the parent asset (embedded files and archive members only)
locationstringNoLocation within the parent (embedded file location or archive member path)

Lineage

Lineage

This source records no lineage. Nothing in the system it reads describes data moving from one place to another, so no FLOW edges are produced. Related items are still linked — see Lineage & Relationships for what those links mean and how they differ from lineage.

Worth knowing

  • Parquet data files are read as tables, so a dataset’s rows are what detectors see — not an opaque binary blob.
  • Last-commit dates cost extra requests. They’re what Latest and Automatic sampling order by; leave them off if ordering doesn’t matter to you and listing is slow.
  • Very large files are read by byte range, so a sampling window reads only the part it needs.

Configuration

Beyond the fields below, every source also has the settings shared by all of them: the sampling strategy, the detectors to run, the scan schedule, and the compute limits for its scan jobs.

Required

Without these, the source will not save.

FieldTypeRequiredWhat it doesDefault
requiredobjectYesno extra properties
repo_idstringYesRepository to scan, as namespace/name (for example openai/gsm8k or my-org/internal-corpus)
repo_typeenumYesRepository kind on the Hub. Datasets hold the data files (parquet, csv, images, audio); models hold weights and configuration; spaces hold app source code. Allowed: dataset, model, spacedataset

Secrets

Stored encrypted and never shown again after you save them. See Configuration & Fields.

FieldTypeRequiredWhat it doesDefault
maskedobjectYesno extra properties
tokenstringYesHugging Face user access token (starts with hf_). Create one under Settings → Access Tokens with at least read permission on the repository. The token is always passed explicitly — no environment variable or locally cached login is ever used.

Optional

Everything you can tune. Sensible defaults apply when you leave them alone.

FieldTypeRequiredWhat it doesDefault
optionalobjectNono extra properties
connectionobjectNoNetwork and resource controls for Hub requests. Files are streamed one at a time and capped, so a large repository never has to fit in memory or on disk.no extra properties
connection.endpointstringNoHub endpoint to use. Defaults to https://huggingface.co; set this for a self-hosted Enterprise Hub.
connection.max_archive_member_bytesintegerNoMaximum uncompressed bytes read from a single archive membermin 102410485760
connection.max_archive_membersintegerNoMaximum member files expanded from one archive into child assets. Bounds fan-out, and is the guard against a zip bomb.min 1, max 10000200
connection.max_archive_total_bytesintegerNoMaximum uncompressed bytes read across all members of one archive. The decompression-ratio ceiling: a zip bomb hits this before it hits memory.min 1024104857600
connection.max_embedded_filesintegerNoMaximum embedded files (parquet image/audio columns, office media) expanded from one container into child assets per runmin 1, max 10000200
connection.max_file_bytesintegerNoRefuse any object larger than this many bytes. 0 or unset means no limit: an object above max_object_bytes is spooled to disk rather than held in memory, so file size is bounded by free disk, not by RAM.min 0
connection.max_object_bytesintegerNoMaximum bytes of one object held in memory. Larger objects are streamed to a temporary file (or read by byte range where the provider supports it), so this bounds memory rather than the size of file that can be scanned. See max_file_bytes to refuse large objects outright.min 102426214400
connection.max_retriesintegerNoMaximum retries on transient Hub errors (5xx and rate limits)min 0, max 103
connection.request_timeout_secondsnumberNoNetwork timeout in seconds for list and download requestsmin 1, max 30060
scopeobjectNoWhich files inside the repository are listed and read. The repository is never cloned or fully downloaded: the file tree is listed first, then each selected file is streamed one at a time.no extra properties
scope.allow_patternsarrayNoGlob allowlist applied to file paths, for example data/*.parquet or **/*.csv. A file is kept when it matches at least one pattern. Empty means every file is kept.
scope.allow_patterns[]stringNo
scope.exclude_extensionsarrayNoOptional extension denylist (for example, .safetensors, .bin, .gguf)
scope.exclude_extensions[]stringNo
scope.ignore_patternsarrayNoGlob denylist applied to file paths, for example *.safetensors or **/checkpoints/*. Files matching any pattern are skipped.
scope.ignore_patterns[]stringNo
scope.include_content_previewbooleanNoStream file bytes to infer MIME and extract detector-ready text previews. Turn off for a metadata-only inventory of the repository.true
scope.include_empty_objectsbooleanNoInclude zero-byte files in extraction resultsfalse
scope.include_extensionsarrayNoOptional extension allowlist (for example, .parquet, .csv, .png)
scope.include_extensions[]stringNo
scope.include_last_commitbooleanNoFetch each file's last-commit date while listing. Needed for accurate LATEST and AUTOMATIC ordering, but makes listing noticeably slower on large repositories. When off, every file inherits the repository's last-modified date.false
scope.include_object_metadatabooleanNoAttach Hub metadata (content digest, size, timestamps) to asset checksumstrue
scope.pathsarrayNoFolders inside the repository to list, for example data/ or data/train. Each folder is walked recursively. Leave empty to list the whole repository.
scope.paths[]stringNo
scope.revisionstringNoBranch, tag or commit SHA to read (for example main, refs/convert/parquet, or v1.0). Defaults to the repository's default branch.
Last updated on