set_cache_folder: Set (change) HuggingFace cache folder temporarily.

View source: R/FMAT.R

set_cache_folderR Documentation

Set (change) HuggingFace cache folder temporarily.

Description

This function allows you to change the default cache directory (when it lacks storage space) to another path (e.g., your portable SSD) temporarily.

Usage

set_cache_folder(path = NULL)

Arguments

path

Folder path to store HuggingFace models. If NULL, then return the current cache folder.

Keep in Mind

This function takes effect only for the current R session temporarily, so you should run this each time BEFORE you use other FMAT functions in an R session.

Examples

## Not run: 
library(FMAT)
set_cache_folder("D:/huggingface_cache/")
# -> models would be saved to "D:/huggingface_cache/hub/"
# run this function each time before using FMAT functions

BERT_download()
BERT_info()

## End(Not run)


FMAT documentation built on Jan. 12, 2026, 9:08 a.m.