Oka is nearly 13weeks and is sometimes a nightmare. I say sometimes as she mouths worse at two times of the day - first thing in the morning and before she falls asleep for the night. Other times corralate to when she is tired.
We tried the yelping but that made her worse. We tried walking away - nearly impossible with a puppy hanging from your foot -detach; one step; detach; one step etc

In the end we got to a thing where she bites i say NO, and remove her from my clothing/ankle etc, if she tries again i put her out of the room (30secs or so). If she lets go, i wait a moment and then offer her a tug/ chewy toy, say 'take it' and play with her.
- We removed her as it was easier to be consistant with because having two youngish kids i can't expect them to keep leaving the room with me every few minutes.
Now if when we play and she goes to bite i say 'ah' as a warning and she can sometimes correct herself. But otherwise i use the method above.
I had my nephew over (17months) and i was terrified of Oka hurting him. She did plant her paw on his head but she was actually in a "submissive" position and was totally sweet.... 10 minutes after he left she jumped on the sofa and chewed at my daughters feet.