When loading very large MoE models it stalls here; I found this part has O(n^2) complexity. If you convert it to a set, it can be reduced to O(n). https://github.com/huggingface/accelerate/blob/8b493524c8630dc2eb85ac18906fdcf642eae805/src/accelerate/utils/modeling.py#L1043-L1045