Live data from Hacker News

Reproducing GPT-2 in llm.c

github.com

111–120 of 127 posts

Re: Reproducing GPT-2 in llm.c

#111
post #102

Earlier quoted context omitted.

25% MFU :( maybe because of the P2P nerf?

Maybe get a 7900 XTX. 122 TFLOPS of BF16/FP16 for less than $1k and I'm getting 55.4% MFU

These are not apples to apple comparison, as this is running across GPU and much bigger model

Re: Reproducing GPT-2 in llm.c

#113

Hi Andrej, Huge fan of all the work you do. Wanted to understand something fundamental and whom better to ask than you: Whats so special about the transformer architecture that its able to predict the next token so beautifully understanding all the intricate previous token relationships? I understand Attention but what so special about this architecture that no other architectures are able to "attend" appropriately t…

Transformers have quadratic computational complexity in sequence length, i.e. O(N^2) where N is the sequence length. RNNs, Linformer, Mamba, etc. have linear or quasi-linear computational complexity in sequence length, which often bottlenecks information movement across tokens.

In theory, if you grew the RNN's state quadratically vs sequence length, you could likely achieve comparable performance to transformers, but it would likely be less efficient than transformers.

Re: Reproducing GPT-2 in llm.c

#114
post #80

Is this the sort of thing that a person with curiosity and a 4090 could do? It says he used 8xA100s in the cloud to do this but is it just a matter of the 4090 going 8x slower or will memory constraints kill the whole endeavour?

4090 should have enough VRAM for 124M param training. Even at float32 precision, with AdamW optimizer, parameters should only be ~2GB (124M params x 4 bytes per param x ~4 for optimizer weight overhead). So there should be plenty of remaining space for activations.

Re: Reproducing GPT-2 in llm.c

#115
post #86

Earlier quoted context omitted.

Fun trivia: downloading 45TB costs about $60, according to Cloudflare.

That's what Cloudflare charges. It costs them around 6 cents.

Wish I could say I'm surprised you're getting downvotes. Carrier costs are some of the lowest costs for hosting providers. Yet that fact seems to elude a majority of the community here.

Re: Reproducing GPT-2 in llm.c

#116
post #74
post #4

Hi HN the main (more detailed) article is here https://github.com/karpathy/llm.c/discussions/481 Happy to answer questions!

Would you consider switching your interest to protein structure prediction? In particular, the current most advanced model is a closed-source, closed-weights system that was trained on a proprietary hardware. It is intentionally kept that way for now to enable deepmind to commercialize their product. The goal here isn't to make the best performing model: it's ablation. How much can we remove from protein structure pr…

> switching your interest

That's not usually how it works.

> Just continue to show that all that's required to predict novel structures is the existing PDB.

Sounds like you know a lot about this topic. You should do it!

Re: Reproducing GPT-2 in llm.c

#117
post #108
post #51

Earlier quoted context omitted.

It's almost as if people believe in fairness and compensating people for their work. Also, it's worth noting that this is only true as long as we're stuck in the "must train on the entire sum total of human output ever created" local minimum for machine learning. Given that most biological entities learn with much less data, this might well be the thing that prods ML research to using an approach that isn't "IDK, buy…

> It's almost as if people believe in fairness and compensating people for their work. Yet in this case we are talking about compensating the compilers/massagers/owners of the datasets, not the original authors from wherever the data was originally scraped.

Copyright is hideously broken, but in theory: the owners only own it because they compensate the authors, which they only do out of an expectation of future profit (on average).

That theory's a fantasy, because extractive systems involving gatekeepers get established, but in this specific case, enforcing copyright would make things fairer for authors. There's no extractive copyright-taking gatekeeper for websites: scrapers don't get copyright, so can't re-license the material they've scraped (unless it's permissively-licensed or something).

Re: Reproducing GPT-2 in llm.c

#118
post #74

Earlier quoted context omitted.

Would you consider switching your interest to protein structure prediction? In particular, the current most advanced model is a closed-source, closed-weights system that was trained on a proprietary hardware. It is intentionally kept that way for now to enable deepmind to commercialize their product. The goal here isn't to make the best performing model: it's ablation. How much can we remove from protein structure pr…

> switching your interest That's not usually how it works. > Just continue to show that all that's required to predict novel structures is the existing PDB. Sounds like you know a lot about this topic. You should do it!

Yes I already published several papers in the area, but I don't work on it any more.

Re: Reproducing GPT-2 in llm.c

#119

In your opinion is it important for ML engineers to know C?

Spend one year to study multiple languages - bash, C, C++, Go, Python ... and even Mojo or Rust. 10-20 hours a week. Being able to read top programming languages is the best investment I ever made. You will become fearless and can see the matrix ;)

I did this and wrote about my experience:

https://mode80.github.io/7-langs-in-12-months.html

I don't regret it. But if ML is your main goal, Python is where you will end up because it's where the libraries are.

Re: Reproducing GPT-2 in llm.c

#120
post #86

Earlier quoted context omitted.

Fun trivia: downloading 45TB costs about $60, according to Cloudflare.

That's what Cloudflare charges. It costs them around 6 cents.

That's what they said it costs on their blog, not that they charge that. https://blog.cloudflare.com/aws-egregious-egress

Where are you getting 6 cents from?

Post reply on HN