Fully automatic weapons are the single deadliest invention in the world's history. The 18th century soldiers would have no ability to get close. Line up 20 M60s on tripods with 5 guys running to feed ammo? The modern day troops would have every advantage. Better range, better accuracy, the amount of firepower they could spit out is unreal. There is a more drastic disparity from an old 18th century rifle to a modern day machine gun than there is from a bow and arrow to the 18th century rifle. It's that big of a difference.
There is a famous slaughter in Africa where a massive tribe of 30,000 natives to the land attacks an encampment of 50 soldiers with repeating rifles and gatling guns. It was a slaughter was because the group of 30,000 was almost completely annihilated.
It's incredible and yet so sad that humanity has designed such effective weapons to kill each other.
If the 25 troops could stay awake, that's probably an accurate number, although attrition might eventually take them down. Otherwise, no more than 75 troops would do the job, depending upon the position.
We appear to agree on this topic.
EDIT:
I've actually done a little thinking indirectly related to this topic, as my dad is a gun dealer. I estimate that if we leveled his house and made a bunker out of it (the basement is sloped into a hill), and somehow we lived in the 18th Century, it would take several thousand troops to bring us down (of course given that we would modify our AK-47, SKS, AR-15, FNFAL) to be full-auto with good sightlines for snipers. Eventually numbers wear you down, but the new age of weapons are incredibly accurate. Consider that today's fully automatic weapons are far more accurate than ANY rifle used to be up until the late 1800s, when guns like the Sharps Buffalo rifle effectively tripled accuracy and distance (even then, they were limited to just over 3/5ths of a mile, and that's with a good marksman. Today's modern basic 30/30 with a calibrated scope will easily shoot 1.2 miles and over with relative accuracy, as long as you know what you're doing and don't have a bad wind).
18th century rifles were little more effective than spitting shrapnel everywhere and took so long to reload, you could shoot at someone 200 feet away, and if you missed they would be on you before you could get another bullet in the barrel to line up another shot. Max range was probably in the ~200 feet range, which is less than some quarterbacks can throw a football today.