(Exodus 34:29) "And it came to pass when Moses came down (from the mountain) [from Mount Sinai]." From where did Moses take the rays of glory? Our Rabbis say, from the cave, as it is said, "And it shall come to pass, when My glory passes by, that I will put you" and so forth (Exodus 33:22). Rabbi Berekhiah says, from the tablets. The length of the tablets was six handbreadths and their width three, and Moses was holding on by two handbreadths, and the Holy One, blessed be He, by two handbreadths, and there were two handbreadths of space in the middle, from there Moses took the rays of glory.
Where Moses Drew the Rays of Glory From the Cave or the Tablets
Yalkut Shimoni on Torah 406:5
(שמות לד כט) וַיְהִי בְּרֶדֶת מֹשֶׁה (מִן הָהָר) [מֵהַר סִינַי]. מֵהֵיכָן נָטַל מֹשֶׁה קַרְנֵי הַהוֹד. רַבּוֹתֵינוּ אוֹמְרִים. מִן הַמְּעָרָה, שֶׁנֶּאֱמַר "וְהָיָה בַּעֲבֹר כְּבֹדִי וְשַׂמְתִּיךָ" וְגוֹ'. רַבִּי בֶרֶכְיָה אוֹמֵר. מִן הַלּוּחוֹת, אָרְכָּן שֶׁל לוּחוֹת שִׁשָּׁה טְפָחִים, וְרָחְבָּן שְׁלֹשָׁה, וְהָיָה מֹשֶׁה מַחֲזִיק בִּשְׁנֵי טְפָחִים, וְהַקָּדוֹשׁ בָּרוּךְ הוּא בִּשְׁנֵי טְפָחִים, וּשְׁנֵי טְפָחִים רֵיוַח בָּאֶמְצַע, מִשָּׁם נָטַל מֹשֶׁה קַרְנֵי הַהוֹד.