hf_load_pipeline: Load a pipeline object from Hugging Face - pipelines usually...

View source: R/transformers.R

hf_load_pipelineR Documentation

Load a pipeline object from Hugging Face - pipelines usually include a model, tokenizer and task.

Description

Load Model from Hugging Face

Usage

hf_load_pipeline(model_id, tokenizer = NULL, task = NULL, ...)

Arguments

model_id

The id of the model given in the url by https://huggingface.co/model_name.

tokenizer

The tokenizer function used to tokenize inputs. Defaults to NULL (one will be automatically loaded).

task

The task the model will accomplish. Run hf_list_tasks() for options.

...

Fed to the hf_pipeline function

Value

A Hugging Face model ready for prediction.

See Also

https://huggingface.co/docs/transformers/main/en/pipeline_tutorial


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