The souls that were yet to be created were there.... So did the sages of all generations receive their wisdom from Sinai.