like anything else you don't like he needs to know it what the results are for that type of behavior. get up and walk away, take your attention and presence away from him. step over a baby gate or into a room and close the door for a second if you need to. you need to be consistent and stop him everytime since this behavior can be self rewarding and hence won't stop if you don't stop it.
he will learn quickly that the consequence of doing this is that he loses what he likes most, your attention. i don't make a big deal of humping but I do stop it. both my girls do it to one another as a little dominance thing so i distract, redirect, and reward for what I do want. you could also use a toy to distract and tell him how brilliant he is when he quits.
if u don't like it then it is a problem now (not one that will become); and he won't outgrow it or stop unless you give him guidance and alternatives. i would also have him neutered when the vet says he is old enough, providing u do not plan to breed him or show him. he'll be safe from reproductive cancer and there won't be any extra puppies out there that end up in shelters. he'll also be more focused on you, less likely to roam, and calmer. if you wait until he's older neutering may not stop humping behavior if it has become habituated. I am still an advocate of neutering just to stop the huge numbers of unwanted pups each year and to keep my dogs risk of cancer lower.
good luck