I thought this was the film Small Soldiers but I just rewatched that film and nope.
Things I think I remember:
The same kind of vibe as Small Soldiers, though maybe a bit older? Enough so that I thought this was that film until I saw it again.
I don't think I remember any CGI. It could have all been practical effects.
I don't remember if the "toys" were actual toys or just miniature drones of some kind.
They were made/controlled by a mad scientist/Willy Wonka type of character.
I have a distinct memory of a fight in a school. Or maybe it was a facility of some kind? I feel like I remember a shootout in a long corridor at least.
I think the actual military was involved, on the good guys side?
I feel quite strongly there were kids involved, but I can't specifically recall any of them.
I would have watched it some time in the early 2000s but it was definitely an old(er) film when I saw it, so I'm going to guess '80s/'90s.
Thanks to both answerers. Toys is definitely the film I was thinking of.
Lots of half-remembered conflating of details but I think the only thing I got dead wrong is that, despite being all about toys, there are no actual kids involved.