model = AutoModelForCausalLM.from_pretrained(MODEL_NAME, device_map='auto')
>ValueError: The current device_map had weights offloaded to the disk. Please provide an offload_folder for them. Alternatively, make sure you have safetensors installed if the model you are using offers the weights in this format.
「Please provide an offload_folder」(offload_folderを指定してください)と書いてあるが「さっきは問題なく動いたのに試行錯誤してるうちに動かなくなったなぁ」の場合はその処置は適切ではない、という罠がある。
これは「GPUもメモリも足りないからディスクを使って遅いけど無理やり動かすね!」という状態。
>The current device_map had weights offloaded to the disk.