Skip to contents

Adds a checkpoint exported with Laya's export_onnx.py (or downloaded by another tool) to layaR's model root, so laya_engine() finds it by name.

Usage

laya_import_model(
  path,
  checkpoint = c("multilingual", "english", "typed-decisions"),
  method = c("symlink", "copy"),
  overwrite = FALSE
)

Arguments

path

The export's folder: it holds model.onnx (or encoder.onnx and head.onnx), rl_agent_config.json and the tokenizer.

checkpoint

Which checkpoint the export is.

method

"symlink" (the default) links to the folder without copying 1.3 GB; "copy" copies it, so the original can be deleted.

overwrite

Replace an installed model?

Value

The installed path, invisibly.

Examples

if (FALSE) { # \dontrun{
laya_import_model("~/exports/onnx/multilingual", "multilingual")
} # }