Something prevents him from pulling the leash ( do you use a prong or a halter? Or that is you just stop when he pulls?) and he does what he can in order to walk faster. Your puppy doesn't play tug of war, he thinks that it is him who walks you. Biting the leash means "holding and dragging you forward", shaking head doesn't mean much in this case, that is his wish to make it more entertaining. The leash has two ends, and he wants to be your leader. To stop him doing this you need to produce a sound signal indicating change of direction. Only the leader changes direction on rambling walks, and others follow him. So, you have to tell your puppy that you are the leader during your walks. You can click your tongue, you can softly whistle some melody ( I myself train producing a short hissing sound like " Sass-ss-s!") to imply a turn you intend to make to the left, to the right, or even backwards. It is better to train sound cue with your dog first off leash, in the park or in the woods. Let him run forward some distance, whistle and make 90 degree turn somewhere in different direction, don't look back, let him follow you. One day session is enough for him to understand the meaning of this particular whistling, do the same on leash the next day - i.e. every time he starts plaing with the leash whistle and make a turn, luring him after you. It is important not to stop.
This exercise would help with better walking mannrers, your dog would learn to watch your own movements.