A realistic guess for Mariupol is 4-5k defenders originally and 10-15k attackers, and the town had around 350k inhabitants
4 to 5k defenders is an EXTREMELY low estimate, considering all the units involved in the fighting (Azov alone numbered at 700-1000 troops, and they're just 1 of 6 different units fighting in there, and not the most numerous). A commander of the DPR estimated, a couple of weeks ago, that there were 4,000 enemy troops remaining, bear in mind that they'd been fighting for a month already by that point. We have no good source for numbers of troops involved, just rumor, hearsay, and common sense (that many Ukrainian units cannot possibly be only 4000 people). In fact, we know at least 1,500 have already surrendered, this would be basically impossible if there were only 4,000 defenders, considering that there's still probably hundreds to a thousand in Azovstal.
The Yanks cleared Fallujah in 6 days
The two are incomparable. You cannot compare a battle hardened, well funded, well trained, incredibly well equipped and high in morale force, to the fucking Taliban, of which there were only 4,000 anyway. Not to mention that the city of Mariupol itself is infinitely harder to fight in considering it's much better developed than Fallujah ever was, with many more tall buildings, fortifiable areas and places like the Illyuch Plant, Azovstal and the Port, all of them incredibly hard places to fight for.
Not to mention that Mariupol has likely been getting fortified and prepared for an eventual invasion or attack for 8 years now. The two situations are completely and 100% incomparable.
lots of troops will be tied down in mop-up operations and killed by snipers
You've been watching too many movies. Russia will likely move in riot police to quell any civilian unrest. When this is over all of the Ukrainian personnel will either be dead, captured, wounded or running the fuck away from Mariupol. There's no point in suiciding yourself to kill a Russian soldier while LARPing as le elite lone wolf sniper when you'd be of much more use elsewhere considering this isn't an insurgency but an actual active war.
Just curious, why these numbers in particular?
same question, why do you think 12k defenders? Why 10k or 20k attackers?
10-14k defenders was the number being thrown around at the start of the war, well before the waters got incredibly muddied with a gorillion articles about Mariupol by journalists who couldn't care less about how many people are fighting there. 10 or 20k attackers was, IIRC, an Ukrainian estimate, and would make relative sense considering much of Russia's numbers have always been focused on fixing the 40,000+ Ukrainian troops stuck in the East, in place. The DPR also cannot bring its full weight to bear in Mariupol because they are also conducting operations in the directions of Adviivka (which is completely surrounded according to them), Novamuhtivka, Troitske, Mari'inka and Novomikailivka. We don't really know how many Chechens are in there, unfortunately, but it's definitely measured in thousands.
PS: To be clearer, considering the Ukrainians have at least 4 brigades defending Mariupol, and considering each brigade is supposed to have at least 3,000 soldiers, even considering typical Eastern Euro military incompetence and poor standards leaving these brigades with only 2,000 each, it would still be around 10,000 defenders, considering the presence of the Azov Batallion and Territorial Defense Force units.
PPS; It's worth considering that some of the troops "defending Mariupol" may have not died in Mariupol at all, but in some of the surrounding villages and small cities (including Volnovakha) that the DPR and Russians had to take before reaching Mariupol proper. When it comes to numbers, at this point the internet is so saturated with articles about the city itself and the destruction there, that it's basically impossible to find any information on important things.
PPPS: Russian MoD today claimed around 8,100 stuck in Mariupol as of March 11, after 15 days of fighting and a ton of small cities and villages taken, including Volnovakha. 10,000 Ukrainian troops defending Mariupol at the start of the war seems like a fairly good estimate.