| load_n3d | R Documentation |
Builds the network and loads the Nemotron 3 Diarization weights from the Hugging Face cache.
load_n3d(
device = default_device(),
download = FALSE,
revision = n3d_revision()
)
device |
Torch device, |
download |
Whether to download the weights when they are not cached.
Defaults to |
revision |
Hugging Face commit to load. Defaults to the commit this package was validated against. |
On CUDA each encoder layer runs as a traced TorchScript graph,
which frees intermediate tensors as it goes (peak device memory about
0.45 GiB instead of about 2 GiB) and removes most per-operation R
overhead. Tracing and warming it up take about a second, once per
model. Set options(n3d.jit = FALSE) to run the plain R functions
instead. The CPU always runs them.
An n3d_model object: a list holding the network and its
configuration.
if (n3d_exists()) {
model <- load_n3d(device = "cpu")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.