The map_location value is used to determine the device on which GLiNER is run. This is done using torch.device, which supports cuda for running it on the GPU. The value gpu is not supported as shown in the following RuntimeError:
RuntimeError: Expected one of cpu, cuda, ipu, xpu, mkldnn, opengl, opencl, ideep, hip, ve, fpga, ort, xla, lazy, vulkan, mps, meta, hpu, mtia, privateuseone device type at start of device string: gpu
The
map_location
value is used to determine the device on which GLiNER is run. This is done usingtorch.device
, which supportscuda
for running it on the GPU. The valuegpu
is not supported as shown in the followingRuntimeError
: