 Yuwen Gong died in a battle between Xianyu's troops and Northern Wei troops, but Yuwen Tai continued to serve in Xianyu's troops.After Xianyu was killed by his general Yuan Hongye (元洪業) in 526, another Xianyu general, Ge Rong (葛榮), in turn killed Yuan and took over Xianyu's troops, and Yuwen continued to serve Ge.However, he saw that Ge was not a competent leader and considered fleeing with his brothers, but before he could carry out his plans, Ge was defeated by the Northern Wei general Erzhu Rong in 528, and Erzhu forcibly moved Ge's troops to his power base at Jinyang (晉陽, in modern Taiyuan, Shanxi).