Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

valueError: DeepSpeed Zero-3 is not compatible with low_cpu_mem_usage=True or with passing a device_map. #10

Open
SeaBreezing opened this issue Nov 6, 2024 · 0 comments

Comments

@SeaBreezing
Copy link

【lora_deepspeed模型】
在配置好accelerate config并运行后,在这里报错:
model = LlamaForCausalLM.from_pretrained(
Config.base_model,
# load_in_8bit=Config.load_in_8bit,
torch_dtype=torch.float16,
device_map="auto" # 设置为auto时会默认使用所有可以使用的gpu,并且将模型分片加载。
) # 权重类型是float16

删除device_map后,会在cpu上加载模型

p.s.大佬可以把配置的torch transformer cuda等版本也发出来吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant