textModelLayers {text}R Documentation

Get the number of layers in a given model.

Description

Get the number of layers in a given model.

Usage

textModelLayers(
  target_model,
  hg_gated = FALSE,
  hg_token = Sys.getenv("HUGGINGFACE_TOKEN", unset = "")
)

Arguments

target_model

(string) The name of the model to know the number of layers of.

hg_gated

Set to TRUE if the accessed model is gated.

hg_token

The token needed to access the gated model. Create a token from the ['Settings' page](https://huggingface.co/settings/tokens) of the Hugging Face website. An an environment variable HUGGINGFACE_TOKEN can be set to avoid the need to enter the token each time.

Value

Number of layers.

See Also

see textModels

Examples

## Not run: 
textModelLayers(target_model = "bert-base-uncased")

## End(Not run)

[Package text version 1.2.1 Index]