facebookresearch / fairseq

Facebook AI Research Sequence-to-Sequence Toolkit written in Python.
MIT License
30.6k stars 6.41k forks source link

How can I use fairseq on Apple M1 chip with GPU? #4704

Open sataketatsuya opened 2 years ago

sataketatsuya commented 2 years ago

❓ Questions and Help

I want to use fairseq on Apple M1 chip for BART model. I checked the document and optional arguments but I could not figure out the solution or setting about mps. So I need your help. Please give me some advice, thank you.

What's your environment?

JuanuMusic commented 1 year ago

I was able to install on MAC with this hint: https://github.com/facebookresearch/fairseq#requirements-and-installation Basically building from source by:

vandit2209 commented 9 months ago

Installation successful but unable to import after the above steps mentioned by @JuanuMusic.

----> [1](vscode-notebook-cell:?execution_count=16&line=1) from fairseq import checkpoint_utils

ModuleNotFoundError: No module named 'fairseq'
M2LabOrg commented 9 months ago

I had issues installing fairseq2 on a MacBook Pro M1. Here's a solution that worked for me. Hope it helps.

vandit2209 commented 8 months ago

@M2LabOrg Thanks for the suggestion, but I am looking forward to use fairseq, and hoping to use mps with it.

xiulinyang commented 1 month ago

Hey, has it been solved? I can't install fairseq either