I ride a OTTB and sometimes he goes into a race horse mode and doesn't listen to what I am trying to ask him. He takes off at a gallop when I try to ask him to trot.

Make sure you are not pulling on him when he takes off or starts to get fast. The more you pull with OTTB the more they blow you off. Just think about staying loose and moving your hips. Don't get tense. Think of breathing out and letting your relaxed energy flow down through your horse in a way.
Both my horses(pony&ottb) do it, use the energy to your advantage. Circle, serpentines and make listen to you
Has helped a lot with my training horses!
When you're warming up, maybe try doing lots of downward transitions. Pick four spots around your arena (would help if you had letters) and at each spot, ask for a halt. When you're in the halt, wait for him to relax and soften before moving back up into the walk/trot etc...