Try turning the stop tap down slightly or until it stops.
The condition is called water hammer and is very common. Basically what happens is when your toilet is close to shutting off, the water pressure closes off suddenly, causing a thump. As I say its probably because you have opened the stop tap to far and you live in a high water pressure area.
Bucket head., December 2010