hf_search_models: Search Models

View source: R/huggingface_hub.R

hf_search_modelsR Documentation

Search Models

Description

Search Huggingface Models

Usage

hf_search_models(
  author = NULL,
  language = NULL,
  library = NULL,
  name = NULL,
  tags = NULL,
  task = NULL,
  dataset = NULL,
  search = NULL,
  sort = NULL,
  direction = NULL,
  limit = NULL,
  use_auth_token = NULL
)

Arguments

author

Filter by model author. Run hf_list_authors() for options.

language

Filter by the languages the model accommodates. Run hf_list_languages() for options.

library

Filter by the deep learning libraries which work with the model. Run hf_list_libraries() for options.

name

Filter by model names. Run hf_list_models() for options.

tags

Filter by model tags.

task

Filter by tasks the model can accomplish. Run hf_list_tasks() for options.

dataset

Filter by the datasets the model was trained on. hf_list_datasets()

search

A string that will be contained in the returned models

sort

The model parameter with which to sort the resulting models.

direction

Direction in which to sort. The value -1 sorts by descending order while all other values sort by ascending order.

limit

The limit on the number of models fetched. Leaving this option to NULL fetches all models.

use_auth_token

The token to use to access private repositories. Unnecessary if HUGGING_FACE_HUB_TOKEN environment variable is set. If True, will use the token generated when running transformers-cli login (stored in ~/.huggingface).

See Also

https://huggingface.co/docs/hub/searching-the-hub

Examples

hf_search_models(library = "pytorch", dataset = "mnli")
hf_search_models(author = "facebook", name = "bart")

farach/huggingfaceR documentation built on Feb. 4, 2023, 10:31 p.m.