Pikes, armor and fieldworks (but mostly pikes)
Pike-like weapons were well known in the ancient world (https://en.wikipedia.org/wiki/Sarissa) and they are likely to be extremely effective against unarmed monsters.
There is a recent blog by a historian discussing a similar issue (starts at "Q: Adam Haun asks: Zombie Apocalypse!")
The key quote is probably (emphasis mine):
Spanish military performance in the conquest of the Aztecs and the Inca demonstrate what happens when close-order heavy infantry are engaged by far, far larger numbers of enemies whose weapons have at best limited effectiveness against armor. By way of example, at the Battle of Vilcaconga in 1533, an Inca force of several thousand caught an ambushed a Spanish force of 300, on favorable terrain (a hillside where the Inca had the high ground), with the element of surprise, against an exhausted foe (the Spanish had marched all day)…and still lost (to be clear, it wasn’t guns that won that battle, but swords and pikes). The Inca took some 800 killed-in-action to the Spanish five. And those were clever, careful-planning, intelligent Inca, not mindless zombies;
The image there shows why pikes (or other long polearms) work so well - several rows of men can hurt the attackes with sharp things while the attackes cannot hurt them: 
(by F. Mitchell, Department of History, United States Military Academy)
Even light armor - widely available in the ancient word - is likely to offer substantial protection against the zombies (from the same source):
And herein we have the zombie-lethality-problem: a zombie, even a fast one, is not actually a very lethal opponent. Zombies attack with fists, finger-nails and teeth and you only get new zombies when bites actually penetrate. But biting through even fairly thin fabric is extremely difficult! ... Even thick clothing – much less modern riot armor or combat armor – is likely to be extremely resistant to zombie attack unless the wearer can be pulled down and held down. The thing is, a dense mass of heavy infantry – be it modern soldiers with rifles and bayonets (a thing we still issue to troops, by the by) or just men with spears – is effectively immune to such mobbing tactics.
So using terrain, their armor and field works (e.g. dig a ditch, then another one) to their advantage a well-organized ancient army with pikes can plausibly achieve over 1000:1 kill ratio against the zombies.
Nothing crazy/advanced is needed, find a battlefield where you can't be easily encircled with a favorable slope, build a series of defenses (ditch/palisade) in depth so that you can slowly give up ground and regroup if things go wrong. At some point the attackers will also be slowed down by the mass of their dead bodies in front of your soldiers. Once again, you can use that to your advantage.
The presence of the large beasts complicates things a bit, but using the same source, we know that Romans already developed very effective anti-elephant tactics (mostly based on javelins), to the point that war elephants turned out not to be a very useful weapon in the ancient mediterranean world. Careful use of ditches, traps and wooden structure is also likely to limit the effectiveness of the large beasts substantially if the fight is on the ground of human's choosing.
So my conclusion is: even in the worst case (for humans) - i.e. the monsters need to be defeated in one big battle, there is no fundamental reason a mildly competent ancient general could not win such an engagement with troops to spare, using only tactics that were well-known at the time. The remaining challenges are logistical: how to rotate your troops at the frontline so that they get enough rest to stay effective for the whole long slaughter, stocking up on polearms etc.
The task becomes easier if you allow yourself to split the fighting into multiple battles. Most likely the humans can move faster than the monsters as ~20k humans can still somewhat effectively use existing roads (they would form a few km long formation) while the monsters are so numerous that if they want to stay concentrated, they have to move over the whole (and potentially difficult) country. If that's the case, humans could likely disengage the enemy at will (and get rest and resupply). To be more fancy one could also lure the monsters into a forest and start a forest fire to both reduce their numbers and split them into multiple bodies that could be defeated in detail.