Description Usage Arguments Value Examples
Download a Transformers model
1 2 3 4 5 6 | transformer_download_model(
model_name = "bert-base-multilingual-uncased",
architecture = "BERT",
path = system.file(package = "golgotha", "models"),
clean = FALSE
)
|
model_name |
character string of the chosen model within the architecture family. E.g. 'bert-base-uncased', 'bert-base-multilingual-uncased', 'bert-base-multilingual-cased', 'bert-base-dutch-cased' for 'BERT' architecture family. Defaults to 'bert-base-multilingual-uncased'. |
architecture |
character string of the model architecture family name. Currently supported architecture are 'BERT', 'GPT', 'GPT-2', 'CTRL', 'Transformer-XL', 'XLNet', 'XLM', 'DistilBERT', 'RoBERTa' and 'XLM-RoBERTa'. Defaults to 'BERT' |
path |
path to a directory on disk where the model will be downloaded to inside a subfolder |
clean |
logical indicating to remove the |
invisibly, the directory where the model is saved to
1 2 3 4 5 6 7 8 9 10 11 12 | transformer_download_model("bert-base-multilingual-uncased")
transformer_download_model(architecture = "DistilBERT",
model_name = "distilbert-base-uncased")
path <- file.path(getwd(), "inst", "models")
transformer_download_model("bert-base-multilingual-uncased", path = path)
transformer_download_model(architecture = "DistilBERT",
model_name = "distilbert-base-uncased",
path = path)
unlink(file.path(system.file(package = "golgotha", "models"),
"bert-base-multilingual-uncased"), recursive = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.