Having to replace the stem bearings on my ancient (1999) YZ400F turned into a significant effort due to the fact the lower bearing seemed not to want to be taken off the bike. I did a bunch of research and heard everything from, weaken the bearing with a dremel (or an angle grinder) and brake the bearing with a chisel to pry it off with 2 screw drivers. Both of these methods tend to damage the stem or the lower triple clamp so weren't really an option.
Here's the method I used, first I cut the outer bearing cage with a set of dikes, then removed all the neddle rollers and set them aside. At this point I cleaned up the remaining inner race and triple clamp (to avoid the complaints from the wife for the next step). Then I dropped the lower clamp and stem in the freezer for the night.
The next morning I broke out my small propane torch and warmed the bearing remenants up just a bit, the good news here is since the whole assembly is cold the stem underneath the bearing begins to cool back off. And that is the magic window. The bearing is warmer than the stem, I just took a flat blade screw driver and a hammer and tapped on the inner race until it popped off.
Take your time (it took me a few warming and tapping cycles to get it fully off). The lower clamp isn't damaged and it's all ready for the new seal and bearing.
Now time to press fit the new one, I found a similar process for that job that involves the freezer as well. It's actually where I got the idea for the removal.