It went as low as 8 the whole time, and usually stays near 40 when I have a 100 dwarf fort on my usual 4x4.
I think crossbowdwarves and ballistae picking off dozens of targets as they came up might've helped my survival a lot, as I don't use cages or any traps. That includes cave ins and magma traps, too. Everything is done by dwarf power, with extensive use of steel for mass production. Everything but highwood was forbidden during civilian shield making, the most of them were armed with spears, everyone had a bronze mail shirt and helm, the rest being leather, and I had twenty hunters going only hunting year round. Any masterwork bolts were forbidden for such occasions, and steel was the only weapon metal used, besides the rare bars of near-divine grade burning steel. Due to having four weaponsmiths working away, I had four artifact weapons: a platinum war hammer, a steel morningstar, a burning steel longsword, and a burning steel battle axe. My real military consisted of 30 regular soldiers, and a one-dwarf "beastmaster". He happened to be a great animal trainer, so I made him war train all the war animals, and a professional shield dwarf, with novice swordsdwarf. I made him use two shields, however. This made him hard to kill. He, instead of having weapons to kill things with, as his title meant, had many animals: three jabberers, three grizzlies, fourteen dogs, a pair of giant tigers and giant jaguars, and four elephants. I was hoping to add the nearby rocs to his collection, three in total are very close by, two female and one male, and start a roc hatchery, but nope. The goblins got me first. The beastmaster actually got a few kills anyway, with his shields, and was the fifth to last dwarf to die. The fourth was a very lucky civilian recruit, who managed to get a respectable kill list before having a silver whip go through his head. The last three were my three militia commanders. They held out rather well. My fortress guards were some of the first victims, as they were ten of the twenty hunters. They stood before the gate in the line of fire, shooting dozens of bolts as fast as they could, while the civilian hunter squad on the other side of the gate did much less than the fortress guard. The siege operators had two ballistae and a catapult to work with, and whittled down actually a few goblins before they fled. There was eight dogs left in front of the main gate, and they fell pretty fast. Then the first two waves of civilians were thrown at them, my legendary smiths and potter retreated to a room where they held out with crossbows and one axedwarf, with a giant cheetah and a dog also. After burning through my civilians, the upper two paths, which led to the dining room and sleeping area, were guarded by two of my three militia squads. My beastmaster was left by the smithies, ahead of the smiths and other important crafters. He held out pretty well, but the smiths ran out of bolts and charged out, getting slaughtered, despite their full steel plate. The last militia squad charged from the miltary zone, held in the caverns with drawbridges for walls, and up some stairs, running into the main horde from the side. About eighty goblins out of 540 and only two beak dogs were left alive by the time the final dwarves fell. I'm pretty sure this'll be in the engravings of my next fort, as well as many images on the clothing. Maybe I should reclaim the site if I can, because there's a lot of metal and clothing there, as well as twelve artifacts, nine of which are military involved. I wish I had recorded the battle... Ohwell, it was great to watch. So much miasma will be there when I get back though...