Amazon Sagemaker 上没有剩余空间

问题描述 投票:0回答:1

我确保为我的实例添加 2 TB 的存储空间。我正在尝试加载这个拥抱脸模型

if torch.cuda.is_available():
    torch.set_default_device("cuda")
else:
    torch.set_default_device("cpu")
    
model = transformers.AutoModelForCausalLM.from_pretrained("microsoft/Orca-2-13b", device_map='auto')

# https://github.com/huggingface/transformers/issues/27132
# please use the slow tokenizer since fast and slow tokenizer produces different tokens
tokenizer = transformers.AutoTokenizer.from_pretrained(
        "microsoft/Orca-2-13b",
        use_fast=False,
    )

但我不断收到以下错误:

OSError: [Errno 28] No space left on device

这是我的设置快照:

如有任何帮助,我们将不胜感激。

amazon-web-services huggingface-transformers amazon-sagemaker
1个回答
0
投票

SageMaker Studio Classic Launcher 的“笔记本和计算资源”部分中,启动“系统终端”,然后使用命令

df -h
(或
df -h .
将输出限制为当前值)检查磁盘使用情况磁盘)。这将显示每个分区的大小和使用情况。

您也可以使用Python:

import shutil

# Get total, used and free disk space in GB
total, used, free = shutil.disk_usage("/")

print(f"Total: {total // (2**30)} GiB")
print(f"Used: {used // (2**30)} GiB")
print(f"Free: {free // (2**30)} GiB")

如果您发现Python环境和模型所在的分区不够大,您可能需要调整分区大小或更改设置以使用您分配的2 TB存储。

© www.soinside.com 2019 - 2024. All rights reserved.