What is grammatically correct?
5% or 5 %
50°F or 50° F or 50 ° F
<10 or < 10
10-20 apples or 10 - 20 apples
This isn't a question of grammar; it's a question of style.
I would venture to say, not to include a space between a number and a percent symbol.
The degree symbol goes with the Fahrenheit symbol, not the number, so the space would be between the number and degree symbol, rather than between the symbol and the F.
Greater than or less than signs and hyphens (or en-dashes) that indicate a range can take spaces or not. There's no "rule" for that, merely consistency and adherence to general style.
HTH