<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/llm-c-glquhouu1" -->

---
title: llm.c | daily.dev
description: Andrej Karpathy implements LLM training in just over 1,000 lines of C on top of CUDA. Includes a tutorial about implementing LayerNorm by porting an...
canonical: https://daily.dev/posts/llm-c-glquhouu1
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: llm.c | daily.dev
og:description: Andrej Karpathy implements LLM training in just over 1,000 lines of C on top of CUDA. Includes a tutorial about implementing LayerNorm by porting an...
og:url: https://daily.dev/posts/llm-c-glquhouu1
og:image: https://api.daily.dev/og/posts/GlquHOuU1.png
og:image:alt: llm.c
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# llm.c

**[Simon Willison](https://daily.dev/sources/simonwillison)** · 1 min read · 4 upvotes · 0 comments

## Summary

Andrej Karpathy implements LLM training in just over 1,000 lines of C on top of CUDA. Includes a tutorial about implementing LayerNorm by porting an implementation from Python.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://simonwillison.net/2024/Apr/9/llmc/>

---

Tags: [#c](https://daily.dev/tags/c), [#cuda](https://daily.dev/tags/cuda), [#nlp](https://daily.dev/tags/nlp), [#python](https://daily.dev/tags/python)

[View this post on daily.dev](https://daily.dev/posts/llm-c-glquhouu1)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"llm.c","url":"https://daily.dev/posts/llm-c-glquhouu1","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/llm-c-glquhouu1"},"datePublished":"2024-04-09T15:36:33.510Z","dateModified":"2024-08-30T02:20:00.379Z","description":"Andrej Karpathy implements LLM training in just over 1,000 lines of C on top of CUDA. Includes a tutorial about implementing LayerNorm by porting an...","image":"https://media.daily.dev/image/upload/s--OHB84bZF--/f_auto/v1722860399/public/Placeholder%2010","thumbnailUrl":"https://media.daily.dev/image/upload/s--OHB84bZF--/f_auto/v1722860399/public/Placeholder%2010","isAccessibleForFree":true,"articleSection":"Simon Willison","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Simon Willison","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/cf12b897300740218b35f49a6309ec5b","url":"https://daily.dev/sources/simonwillison"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/llm-c-glquhouu1","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":4},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"c,cuda,nlp,python","timeRequired":"PT1M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Simon Willison","item":"https://daily.dev/sources/simonwillison"},{"@type":"ListItem","position":3,"name":"llm.c"}]}
```

