As Mr. Money Money Mustache once said:
IF YOU HAVE CREDIT CARD DEBT, YOU SHOULD FEEL LIKE YOUR HAIR IS ON FIRE
Student loan debt is different than credit card debt. Rather than having spent the money on just about anything, it was invested in improving yourself and probably your financial future. This was probably a good decision.
However, unlike most credit card debt, if you ever have to file for bankruptcy, your student loans will not be erased. They will follow you forever.
Pay your debts off as quickly as you can. While it'sit may be true that "long-term return on the stock market is about 7%", you cannot assume that this will always be the case, especially in the short term. What if you had made this assumption in 2007?
To assume that your stocks will beat a 6.4% guaranteed return over the next few years is not really investing. It's gambling.