Mr.LazyCat (@LazyForestCat) header
Mr.LazyCat (@LazyForestCat) profile picture
McDonalds
Joined October 2015
AR breakthrough - Impose 2D MRI results on Real Life Patients. This is just amazing.
120
707
109
5,635
881,733
Visualization of Convolutional Neural Network
85
817
154
9,892
3,848,987
NVIDIA just released free online courses on AI. No payment or fees are required! Here are 6 courses you don't want to miss in 2024:
75
505
27
3,214
395,052
Mr.LazyCat retweeted
Ollama 0.5 is here with structured outputs! This makes it possible to constrain a model’s output to a specific format defined by a JSON schema. Some examples include: - Parsing data from documents - Extracting data from images - Structuring all language model responses - More reliability and consistency than JSON mode 🧵1/3
50
348
57
2,690
238,241
Mr.LazyCat retweeted
Scientists have mapped the entire neural network of the fruit fly. 50 million synapses between 139,000 neurons.
260
1,246
204
10,848
1,081,559
Here we see GTA IV overlaid with AI generated graphics. I can very well imagine that in the near future we will generate graphics with AI, because it is cheaper and faster than if everything is created in advance in a graphics engine.
943
752
1,145
8,123
4,067,352
# explaining llm.c in layman terms Training Large Language Models (LLMs), like ChatGPT, involves a large amount of code and complexity. For example, a typical LLM training project might use the PyTorch deep learning library. PyTorch is quite complex because it implements a very general Tensor abstraction (a way to arrange and manipulate arrays of numbers that hold the parameters and activations of the neural network), a very general Autograd engine for backpropagation (the algorithm that trains the neural network parameters), and a large collection of deep learning layers you may wish to use in your neural network. The PyTorch project is 3,327,184 lines of code in 11,449 files. On top of that, PyTorch is written in Python, which is itself a very high-level language. You have to run the Python interpreter to translate your training code into low-level computer instructions. For example the cPython project that does this translation is 2,437,955 lines of code across 4,306 files. I am deleting all of this complexity and boiling the LLM training down to its bare essentials, speaking directly to the computer in a very low-level language (C), and with no other library dependencies. The only abstraction below this is the assembly code itself. I think people find it surprising that, by comparison to the above, training an LLM like GPT-2 is actually only a ~1000 lines of code in C in a single file. I am achieving this compression by implementing the neural network training algorithm for GPT-2 directly in C. This is difficult because you have to understand the training algorithm in detail, be able to derive all the forward and backward pass of backpropagation for all the layers, and implement all the array indexing calculations very carefully because you don’t have the PyTorch tensor abstraction available. So it’s a very brittle thing to arrange, but once you do, and you verify the correctness by checking agains PyTorch, you’re left with something very simple, small and imo quite beautiful. Okay so why don’t people do this all the time? Number 1: you are giving up a large amount of flexibility. If you want to change your neural network around, in PyTorch you’d be changing maybe one line of code. In llm.c, the change would most likely touch a lot more code, may be a lot more difficult, and require more expertise. E.g. if it’s a new operation, you may have to do some calculus, and write both its forward pass and backward pass for backpropagation, and make sure it is mathematically correct. Number 2: you are giving up speed, at least initially. There is no fully free lunch - you shouldn’t expect state of the art speed in just 1,000 lines. PyTorch does a lot of work in the background to make sure that the neural network is very efficient. Not only do all the Tensor operations very carefully call the most efficient CUDA kernels, but also there is for example torch.compile, which further analyzes and optimizes your neural network and how it could run on your computer most efficiently. Now, in principle, llm.c should be able to call all the same kernels and do it directly. But this requires some more work and attention, and just like in (1), if you change anything about your neural network or the computer you’re running on, you may have to call different kernels, with different parameters, and you may have to make more changes manually. So TLDR: llm.c is a direct implementation of training GPT-2. This implementation turns out to be surprisingly short. No other neural network is supported, only GPT-2, and if you want to change anything about the network, it requires expertise. Luckily, all state of the art LLMs are actually not a very large departure from GPT-2 at all, so this is not as strong of a constraint as you might think. And llm.c has to be additionally tuned and refined, but in principle I think it should be able to almost match (or even outperform, because we get rid of all the overhead?) PyTorch, with not too much more code than where it is today, for most modern LLMs. And why I am working on it? Because it’s fun. It’s also educational, because those 1,000 lines of very simple C are all that is needed, nothing else. It's just a few arrays of numbers and some simple math operations over their elements like + and *. And it might even turn out to be practically useful with some more work that is ongoing.
This post is from an account that no longer exists. Learn more
301
1,163
229
9,484
1,801,765
Mr.LazyCat retweeted
Segment Anything Model 2 (SAM 2) is a foundation model from Meta FAIR for promptable visual segmentation in images & videos. Available now for anyone to build on for free, open source under an Apache license. Try the demo ➡️ go.fb.me/ve0y8o
32
199
27
1,105
97,860
Can we make Transformers better and more efficient for robot learning? Excited to introduce Body Transformer (BoT), an architecture that leverages robot embodiment in the attention mechanism, by treating it as a graph of sensors and actuators.
13
103
10
534
60,759
Testing the outputs of FLUX.1 Dev using the same prompt, fixed seed, steps and denoise values across all combinations of samplers and schedulers. That's 27 samplers and 7 schedulers for 189 images total.🧵(1/8)
6
11
1
53
5,563
this playlist is gonna blow up cuz @karpathy sensei just recommended it from scratch
24
286
6
4,766
400,641
Mr.LazyCat retweeted
ナマズのコントロールリグを改良。頭の動きに追従して全身がウネウネするようにしてみました。簡単にこんな動きが作れるとは! #GameDev #UE5
17
426
23
5,054
303,229
Mr.LazyCat retweeted
Microsoft presents SpreadsheetLLM Encoding Spreadsheets for Large Language Models Spreadsheets, with their extensive two-dimensional grids, various layouts, and diverse formatting options, present notable challenges for large language models (LLMs). In response, we introduce SpreadsheetLLM, pioneering an efficient encoding method designed to unleash and optimize LLMs' powerful understanding and reasoning capability on spreadsheets. Initially, we propose a vanilla serialization approach that incorporates cell addresses, values, and formats. However, this approach was limited by LLMs' token constraints, making it impractical for most applications. To tackle this challenge, we develop SheetCompressor, an innovative encoding framework that compresses spreadsheets effectively for LLMs. It comprises three modules: structural-anchor-based compression, inverse index translation, and data-format-aware aggregation. It significantly improves performance in spreadsheet table detection task, outperforming the vanilla approach by 25.6% in GPT4's in-context learning setting. Moreover, fine-tuned LLM with SheetCompressor has an average compression ratio of 25 times, but achieves a state-of-the-art 78.9% F1 score, surpassing the best existing models by 12.3%. Finally, we propose Chain of Spreadsheet for downstream tasks of spreadsheet understanding and validate in a new and demanding spreadsheet QA task. We methodically leverage the inherent layout and structure of spreadsheets, demonstrating that SpreadsheetLLM is highly effective across a variety of spreadsheet tasks.
11
171
23
913
118,984
Mr.LazyCat retweeted
someone finally made leetcode for machine learning, and it's everything we hoped it would be just solved the first exercise: computing a matrix-vector product without any tensor operations (only python lists allowed) deep-ml.com
44
466
41
5,205
488,344
Mr.LazyCat retweeted
‘Killer Bean’ gameplay trailer is out Early access is coming this summer
1,365
9,111
2,989
112,245
11,418,385
used AI to turn this @SFMOMA piece into an ocean
46
287
46
2,584
254,951
Mr.LazyCat retweeted
The Doge Meme dog, Kabosu has died. She was 18 years old.
4,207
37,670
15,119
321,466
20,099,105
this is the future of gaming - every shot is on chain
893
684
672
6,245
1,106,019
Good lord We’re cooked
204
387
234
3,975
2,740,271
Mr.LazyCat retweeted
🕷️ ScrapeGraphAI: You Only Scrape Once ScrapeGraphAI is a web scraping python library that uses LLMs to create scraping pipelines for websites, documents and XML files. Just say which information you want to extract and the library will do it for you! github.com/VinciGit00/Scrape…
22
228
12
1,153
123,089