Catalyzes the transfer of a two-carbon ketol group from a ketose donor to an aldose acceptor, via a covalent intermediate with the cofactor thiamine pyrophosphate. D-glyceraldehyde 3-phosphate + D-sedoheptulose 7-phosphate = aldehydo-D-ribose 5-phosphate + D-xylulose 5-phosphate Binds 1 Mg(2+) ion per subunit. Can also utilize other divalent metal cations, such as Ca(2+), Mn(2+) and Co(2+). Binds 1 thiamine pyrophosphate per subunit. Carbohydrate biosynthesis; Calvin cycle. Homodimer. Belongs to the transketolase family.