A very high number of duergar seems to spawn based solely on a level nine being in the party. Amount of people and total party level would probably be a better way to scale.
Balance Duergar clan quest
I'm just digging up some old threads for reference:
https://efupw.com/efu1-forum/topic/40/40253/tone-down-duegar-fort/index.html?amp;start=0