There isn't a requirement of who writes a LOR. It should just be able to strongly articulate the qualities and experiences that qualify you for whatever position you're applying for. That being said, it would be nice to have the PI's signature over the grad student's since it carries more weight.
I would talk to the grad student you work with and ask him if he would write a LOR on your behalf. Just submit that. Or if you would really like your PI's name on the letter, you can suggest the grad student write your LOR and have your PI co-sign it. Similarly, the grad student can write the LOR and have the PI sign it. Just clearly communicate what you need the letter for and send an email to the PI with the grad student CC'd. The grad student and PI will be able to work out an agreement that is comfortable for both of them.