1
$\begingroup$

My system runs out of memory on GPU. But I want just to test if it works and want to load it on CPU. How do I do that? Adding device = torch.device(‘cpu’) before loading model doesn’t help It crashes here:

model = AutoModelForCausalLM.from_pretrained(
    config.base_model_name_or_path,
    quantization_config=bnb_config,
    device_map="auto",
    trust_remote_code=True,
)
$\endgroup$
1
  • $\begingroup$ I have the same question and no one seems to know the answer $\endgroup$ Commented Feb 28 at 11:32

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.