llama_hf_list: List GGUF files in a Hugging Face repository

View source: R/hf.R

llama_hf_listR Documentation

List GGUF files in a Hugging Face repository

Description

Queries the Hugging Face API for GGUF model files in the specified repository. Returns a data frame with file names, sizes, and detected quantization levels.

Usage

llama_hf_list(repo_id, token = NULL, pattern = NULL)

Arguments

repo_id

Character. Hugging Face repository in "org/repo" format, e.g. "TheBloke/Llama-2-7B-GGUF".

token

Character or NULL. Hugging Face API token. If NULL, uses the HF_TOKEN environment variable.

pattern

Character or NULL. Optional glob pattern to filter results (e.g. "*q4_k_m*"). Case-insensitive.

Value

A data frame with columns:

filename

Character. The file name within the repository.

size

Numeric. File size in bytes.

size_pretty

Character. Human-readable file size.

quant

Character. Detected quantization level (e.g. "Q4_K_M") or NA if not detected.

Examples


files <- llama_hf_list("TheBloke/Llama-2-7B-GGUF")
print(files)


llamaR documentation built on May 28, 2026, 1:06 a.m.