hf_set_device | R Documentation |
This function currently depends on having a working installation of torch for your GPU in this environment. If running an Apple silicon GPU, you'll need the native mac M+ build (ARM binary). You will also need rust and other transformers dependencies. As you need to make sure that everything that needs to be on the GPU (tensors, model, pipeline etc.), is on the GPU, we currently recommend this for advanced users only. We will be working on integrating this fully with the installation and build of the huggingfaceR environment.
hf_set_device()
a device that models, pipelines, and tensors can be sent to.
## Not run: device <- hf_set_device() ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.