Do you know if the speedo is electronically driven or mechanically driven? Mechanical cable driven speedos get erratic like that when the cable is binding or broken. Replacing the cable solves the problem.
Electronic speedos get erratic when there is some kind of electrical fault. Maybe even just a bad ground in the dash board unit. I don't know a lot about them, so can't suggest any likely sources of the problem.
2004 American Tradition; 2014 Buick LaCRosse
Homebase in the Ocala Nat'l Forest near Ocala, FL