跳过导航
llm.c by Hand✍️ C programming + matrix multiplication by hand This combination is perhaps as low as…
0:00 / 0:44

llm.c by Hand✍️ C programming + matrix multiplication by hand This combination is perhaps as low as…

Tom Yeh

@ProfTomYeh6.5万 位关注者

在 X 上查看
2,828 个赞下载原帖

311,845 次观看

llm.c by Hand✍️ C programming + matrix multiplication by hand This combination is perhaps as low as we can get to explain how the Transformer works. Special thanks to Andrej Karpathy for encouraging early feedback and tetsuo for helping me understand the pragma magic. I hope this exercise can help people peak further into the LLM black box.

11 条评论

评论来自 X (Twitter) 上的原帖

  • Yuchen Jin 的头像

    @Yuchenj_UW

    @karpathy @7etsuo Awesome! Looking forward to an llm.c Attention episode

    20 个赞

  • Tom Yeh 的头像

    @ProfTomYeh

    @karpathy @7etsuo This is a great suggestion! Thanks!

    16 个赞

  • Antonio Linares 的头像

    @zencloud

    @karpathy @7etsuo Is there a way to load a single layer of a LLM (in example Llama3-70B) and process it layer by layer so it fits on a normal PC memory ? Could you explain how to do it ?

    3 个赞

  • Tom Yeh 的头像

    @ProfTomYeh

    @karpathy @7etsuo It is possible. But it would be quite slow. To generate each token, the model has to evaluate every one of the hundreds of layers. Say loading each layer takes 1 second. It would take 100 seconds to load 100 layers for one token. Then you multiple that by 1000 tokens. Very slow.

    3 个赞

  • rakesh 的头像

    @shark_T_T

    @karpathy @7etsuo Goated acc

    1 个赞

  • ed 的头像

    @ed_astra_

    @karpathy @7etsuo Amazing 🔥

    1 个赞

  • Cuhmunity Notes 的头像

    @My2sense_Byron

    @karpathy @7etsuo 🔥

    1 个赞

  • Byron Hsu 的头像

    @hsu_byron

    @karpathy @7etsuo This is awesome

    1 个赞

  • Filippo Broggini 的头像

    @olgias

    @karpathy @7etsuo Is this also available elsewhere online?

    1 个赞

  • George D Gregory 的头像

    @reinforce2020

    @karpathy @7etsuo Can these be made into the notebooks!? That would be awesome.

    1 个赞

  • Tom Yeh 的头像

    @ProfTomYeh

    @karpathy @7etsuo I am waiting for a notebook ninja to step up to help.😄

    1 个赞