device_map issue with M1_M2 MacOS 
### System Info

Hi,
I am on M2 MAX CHIP MACOS that has 12 CPU, 38 GPU. I am having issue with ever modification of this code snippet. Would you please tell me how I can correct it?


### Who can help?

_No response_

### Information

- [ ] The official example scripts
- [ ] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)

### Reproduction


from transformers import AutoTokenizer, AutoModelForCausalLM
import transformers
import torch

model = AutoModelForCausalLM.from_pretrained("tiiuae/falcon-40b-instruct", trust_remote_code=True)
model = model.to('mps')

tokenizer = AutoTokenizer.from_pretrained(model)
pipeline = transformers.pipeline(
"text-generation",
model=model,
tokenizer=tokenizer,
torch_dtype=torch.bfloat16,
trust_remote_code=True,
# device = torch.device('mps'),
# device_map="auto",
)

### Expected behavior



from transformers import AutoTokenizer, AutoModelForCausalLM
import transformers
import torch

model = AutoModelForCausalLM.from_pretrained("tiiuae/falcon-40b-instruct", trust_remote_code=True)
model = model.to('mps')

tokenizer = AutoTokenizer.from_pretrained(model)
pipeline = transformers.pipeline(
"text-generation",
model=model,
tokenizer=tokenizer,
torch_dtype=torch.bfloat16,
trust_remote_code=True,
# device = torch.device('mps'),
# device_map="auto",
)
This does not work yet indeed., this is known and is on our roadmap.<|||||>Hi,

Thanks for the reply.

I hope this will come into play. I purchased very expensive MacOS to continue on ML, but apparently I can not use it for now to implement this type of things. 

Is there a way to import pdf and then chat with it using this falcon-40b model?





Thanks
Regards

> On May 31, 2023, at 1:29 PM, Sylvain Gugger ***@***.***> wrote:
> 
> 
> This does not work yet indeed., this is known and is on our roadmap.
> 
> —
> Reply to this email directly, view it on GitHub <https://github.com/huggingface/transformers/issues/23916#issuecomment-1570629684>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ARF6VBUWSXW76NC2SMHKAI3XI55VZANCNFSM6AAAAAAYVX5XTI>.
> You are receiving this because you authored the thread.
> 

<|||||>Hi @phdykd , we have added the support with M1/M2 MacOS. Let us know if works. <|||||>Hi @SunMarc,
Please share the link with me.
Thanks for your support.<|||||>Hi @phdykd , you just need to install the latest version of accelerate (main branch).