It depends on where you are from and which one you like the best, and maybe also whether you're saying it first or if you're answering to someone. I would say "hei ny" for bye bye, but I've also heard hei, moi, hei hei, moi moi, heippa, moikka, heido and a gazillion other ways of saying bye.
Hei is usually used in the meaning of "Hello!", and "bye!" is usually said with some other word than "hei". I think the only time when you can idiomatically use "hei" in the meaning of "bye" is when you're working for some company and ending an official telephone call with "Kiitos, hei!"
It's such a specific situation, and easy to understand from context, that Duolingo shouldn't teach it. It only causes confusion.