Agree with PP but would also point out that maybe you could try to focus on the positives.
Even adults find it much harder to 'get' a negative message/instruction such as 'don't do x' in comparison to a positive one such as 'do y'. It takes an extra processing step in the brain. First step 'what is x', second step 'don't do it'. Little people often stop at the first step! So every time you say to him 'we don't hit' he may just process the 'we hit' part and not get around to the 'don't' part.
In order to give 'positive' messages,
a) praise good behaviour. Make sure he gets the attention he craves when he is being good. Be careful though: Don't praise him for absence of negative behaviour e.g. 'not hitting' but rather for positive behaviour e.g. sitting still, paying attention, being kind, playing nicely, listening, being imaginative, giving lovely cuddles, blowing funny raspberries, ...
b) say what you'd like to see him do, rather than what you don't want him to do. DD is the same age and in our house their is LOTS of mention of 'gentle hands'. And modelling. And narrating. For example if she is playing with her 'baby' I may narrate to her how she is using gentle hands to stroke the baby. If play between her and DS is starting to get rough I'll remind her to use gentle hands. If she hits DS I'll take her hand and stroke DS with her hand, saying that we use gentle hands. I say to them both to 'be kind' rather than 'don't fight'.
These 'positive' instructions apply more generally too, not just regarding hitting/biting etc. E.g. I say 'the road is for cars, the pavement is for people to walk. We walk on the pavement.' Rather than 'don't walk onto the road'. Or 'Walk beside me and hold my hand' rather than 'don't run off'.
'Positive' instructions honestly work much better than telling a child what NOT to do.
(If someone tells you not to think of a pink elephant, you'll probably find it hard! But as a grown-up, you have strategies. You may try to think of something else, e.g. a red car, instead to avoid thinking of the pink elephant. If someone had just told you to imagine a red car, it would have been a lot easier! A toddler doesn't have such strategies yet. If you tell them not to do something, even if they manage to process the 'not' part of the message, it still leaves them at a loss of what else to do; their thoughts keep coming back to the thing they are not meant to do; and sooner or later their impulse control quits. Just tell them what to do, rather than what NOT to do, it's much easier for them and much more appropriate to their developmental stage.)