There is a series of rules which are known imprecisely but which govern gem usage.
1) If the mage currently has less than 75 fatigue, he will use as many gems as necessary to keep his fatigue below 75.
2) Similar rules at 100 fatigue, and 200 fatigue. But of course if the mage cannot cast the spell and keep himself below 200 fatigue, he will do something else.
3) I don't think encumbrance is included in the calculation, so sometimes the mage will use just enough gems to keep himself at 105 fatigue. This has gotten me killed before
