I remember when he launched everything and was hoping that the AMD hardware (very capable) was just hamstrung by software. The idea that the easy part is actually the chips is something I never considered though I "know" that "Nvidia succeeded because of their software". Haha, very clever.
I've got a Comma 3X and I'm thankful for the 4090 P2P work too (which is now here? https://github.com/tinygrad/open-gpu-kernel-modules) so I'm excited to see it work. Rooting for the guy. Hope it's true that the chip part is the easy work. Could be that both are "the hard work".
I've looked at the "only 18,935 lines of code" python code and it made me want to poke my eyes out. Not sure what's the point of this extreme code-golfing.
No code golf! While low line count is a guiding light of this project, anything that remotely looks like code golf will be closed. The true goal is reducing complexity and increasing readability, and deleting \ns does nothing to help with that.
You can look at the PyTorch code base and understand a small local function instantly, but if I would have a task to have a deep understanding of either PyTorch with all kernel code and low level code, whole CUDA code base + LLVM compilation code or Tinygrad I would pick Tinygrad in an instant.
The code looks hard because what it is doing is hard, but all its layers can be debugged.
That doesn’t look super awful to me? Hardly extreme code golfing.
The far more interesting part is the order of magnitude. If they can pull off a 20k LOC with zero dependencies (implying a pretty concise project size) and it still works well on meaningful applications, that’s pretty neat. A 1000x reduction in code size and matching/exceeding in perf is worth looking at. Probably also implying a better architecture as code golf isn’t gonna get you 1000x less code. Again - their claims not mine, so we’ll see.
But at that point they can triple the LOC to 60k with nothing but white space, new lines, and comments, for all I care. It won’t even add a zero.
it looks dense but perfectly readable. arguably more readable that way than if it had a bunch of extra new lines, definitions, and code blocks spreading the logic out into a larger visible area.
I'm inclined to agree. While not always appropriate or popular, it makes some sense to me to have the visual weight/area of the code being ~proportional to it's significance. Communicates the ideas more clearly. Instead of spending the majority of space telling me what _isn't_ going to happen, and hiding what is.
I often find myself wishing this was more ergonomic in languages.
TBH that looks pretty decent to me. GPU programming is very very complicated. A simple kernel in torch is hundreds to thousands of LOCs, with much worse style.
I agree with some poster above, the code looks hard simply because the problem is very hard, not because they want to write it that way.
I think the discomfort I felt at looking at that was because of the stylistic difference. There isn't any part of it that looks terribly hard to understand when compared to other code. I presume anyone dealing with this codebase would know what ctx entails and most things seem to logically flow from what it provides.
I think if I dealt with this on a daily basis I might end up finding if vastly more preferable, albeit at the risk of alienating fellow developers. In that respect it seems much like learning to use Emacs or vi
I don't think this is bad, if you know Python then most of the code will be fine for you. I think you're probably referring to pm_reduce_collapse, but while it looks daunting at first, it really isn't when you consider the alternatives, I'd be curious on how you'd improve it short of creating a DSL.
Huh. This is more readable than almost any large python codebase to me at first glance. It’s 2D, and well commented. I find it an excellent use of screen real estate. Perhaps it would be a different story if most of us weren’t stuck in 16:9?
Is is code a form of AST rewrite rules for optimization? This operation still looks like a incomprehensible wall of code 40 years later (I looked in the past inside the C++ compiler).
I see the advantage of the inline lambdas, but also it seems like it would hamper the ability to test the functions which can often have intricacies that catch you out. I believe one of the principles of Tinygrad is that tests shouldn't be part of the core codebase and shouldn't add to the total linecount.
I think there is an opportunity there to have a tag in comments for tests.
Have a hotkey to generate an id so you could have
# lift x+y out of reduce on lt :testID: color_adjective_noun
((UPat.var("x")+UPat.var("y")).or_casted() < UPat.var("c"), lambda x,y,c: (x < (c.cast(y.dtype)-y)) if no_range(y) and no_range(c) else None),
and it creates a test that exists away from the main codebase. A process that runs tests could scan the code for testID's, intelligently extract the relevant part of the code into the test harness and runs the tests. There would need to be some infrastructure needed to handle placing the code to be tested into the right context but you could have
1. A codebase that contained no active code required simply to facilitate tests,
2. All test tags auto removable for distribution builds
You don't really want or need classical unit tests for compilers. You need a harness that you can feed a program representation into and get a transformed one out, then check the result -- ideally mostly just by running it, or alternatively by comparing the output against a reference.
I agree. It is definitely readable but clearly formatting decisions were made to keep line count down over the flow of code. It isn't even just the variable names, things like having a function with a single return statement on one line, while legal, I cannot imagine why someone would do it in a non one off script code.
I'm going to guess that you're used to codebases that use an autoformatter.
There's definitely a case to be made for autoformatters in projects with a very large (>100) number of developers, but the price you pay for that is much poorer information density per screenful of code.
For things like tinygrad or sqlite with a small dev team it's possible to use whitespace, style, and formatting to communicate important information, just like mathematicians do. The AMS journals don't autoformat mathematicians' equations!
No, it really isn't. Like I said, math journals don't autoformat the mathematicians' equations. There's signal encoded in the formatting that a tool can't understand.
But if you have hundreds of developers on a project it does in fact make sense to sacrifice that signal in order to keep them from fighting with each other over silly formatting choices.
LLMs have done two things for us: made lines of code a commodity, but arguably even more important: made understanding an arbitrary amount of lines of code a commodity too.
with this in hand, large codebases that were designed in the primordial era of requiring human cognition to grok are emabarassingly antiquated.
"umm what does this mean?" -> right click -> explain with AI -> "got it".
I literally reddit-soyjacked when i saw "tackle LLVM removal". I would argue that LLVM was/is the most well thought out and well-architected piece of software that exists today... but in the age of AI... who could possibly care now? when I say "well thought out" and "well-architected", that is in the context of human eyeballs. But who needs human eyeballs when we have much more powerful computer eyeballs? who grok code way better and way faster than we do.
now, the massive line count of projects like LLVM, Linux, and Chrome become much harder to defend in the context of code re-use. Why drag in millions of code when you can get an LLM to write just the bits you care about? LLVM has a ton of optimisations that are all well and good, but how many of them actually move the needle on HPC platforms that do an awful lot of instruction re-ordering and re-scheduling anyway?
Could we get away with 5% of the codebase to do "just the bits we care about"? in the past the answer might be, "well yes but its still a lot of (manual) coding", but now - why not? Let an LLM loose on the design doc and fill in the gaps!
It’s hard to argue against hiring contributors, but a bounty system that pays pennies vs. market value for skilled developers shouldn’t be the only interview path, it’s borderline exploitative.
It’s not exploitive if you like working on it. I can see an additional upside here (for tinygrad) that they better screen out people who are just trying to optimize for job prospects or money, who would do better elsewhere, and get people who actually like contributing.
Few people with no innate interest in the project are likely to ramp up and start contributing just for a shot at a job. Whereas if you’re Facebook or whoever you are much more likely to get people who don’t care about the product and just have decided they can make a lot of money by jumping through the right hoops.
This idea that you're supposed to accept worse pay because you believe in the idea doesn't apply to George. If his companies succeed, he'll be rich. Of course, there's nothing wrong with even working for free if that's what you like, just don't make a moral principle out of it.
I don’t mean to imply it’s to get employees to accept lower pay. I mean that there is some implicit screening against people who are solely optimizing for high pay.
Lots of reasons why you would want to simultaneously pay well and not attract people who are optimizing for pay.
I don’t fully understand why you wouldn’t want to attract people who optimize pay. You always should aim for getting paid what you’re worth which is understandably hard to define. I think that’s the whole point of OPs argument how this is exploitive. You’re trying to sell a “vision” for lower pay.
As opposed to months of interview prep, followed by half a dozen interview stages, possibly including an unpaid take-home mini project, all of which could be for naught because you fluffed some obscure algorithm question that bears no relation to your day job?
All other interview processes (that I've witnessed or heard of) waste anyone's time with barely anything to show for though, regardless if it ever comes to a offer.
That's comma.ai's policy since they make hardware and solve physical problems. The tiny corp has been hybrid (remote-first) since day 1 because it primarily writes open source software, and there's a long track record of success with remote for this kind of task.
We have a few whole-team meetups in Hong Kong each year for 2-4 weeks, and there's a San Diego or Hong Kong office that anyone can work from as they choose. We also have a wide array of fancy multi GPU boxes that everyone on the team gets full access to (known external contributors can get some access also).
I think many companies that were quick to embrace remote have walked it back, not everyone is capable of working productively remotely, nor are all types of work amenable to remote.
The mainland and Hong Kong still have significantly different visa policies. I'm not sure if it's changed at all since the handover, except for mainlanders entering HK.
It's not a helpful reply to that particular comment, but I think it's worth recognizing that the US is now in the same camp as HK or mainland China now where there will be some people who just simply cannot enter.
I hate it when ‘inspirational’ quotes are attributed to the person with the largest audience and not the people who came up with it, like in this case, the engineers at Lockheed’s Skunk Works.
The risk for Tinygrad is that PyTorch will create a new backend for Inductor, plug in their AMD codegen stuff and walala, PyTorch still king. I mean, they could have easily just taken that route themselves instead of bothering with a new ML framework and AD engine. 99% of the work is just the AMD codegen part of the compiler.
Either way, super cool project and I wish them the best.
tinygrad has a PyTorch frontend, we fully encourage the frontend to stay PyTorch and for them to integrate tinygrad at any level. Our mission is to commoditize the petaflop, all frontends are welcome. We also have a quite complete ONNX frontend.
The main risk is that an LLM will rewrite itself and programmers will no longer be needed. I worked a bit with tinygrad and it looks quite amusing I managed to run it right away and make fixes in one of the tasks, but I decided not to commit because I was afraid of rejection. For example, the tasks are strange: $500 for two months, optimizing H.265, something that only a small group of people in the world can do.
The SV is a unique place where you can meet Geo and get $5M, maintain a bunch of hardware, build a framework in 20,000 LOC and everything works well.
Looking at their boxes, I'd guess 20-ish%, once the labor costs of designing the boxes is out of the picture. I imagine George doesn't take a salary, or at least takes only a small one. They have a contract with AMD as well. I'd bet the company is modestly profitable.
Programming a GPU in 2025 is complex, that might be because it has been made complicated, but regardless, it is not complexity that this project can control.
The fact that it competes with PyTorch in so few lines speaks to the incredibly low incidental complexity imposed by Tinygrad.
If you think you can do better, the code's right there and you're welcome to try! There's a giant pile of money at the end of the rainbow for you if you can uncomplexify it.
How are ergonomics compared to pytorch, though? Adoption can be also driven by frictionless research (e.g. torch vs. tf comes to mind). Repo is missing proper docs aimed at early adopters imho
Not sure where it was from but I remember reading a comment about how every modern rocket scientist needs to come to terms with the fact that every novel idea they might have has already been proposed and tried by a Russian scientist in the 20th century.
I really hope tinygrad succeeds with their mission of commoditizing the petaflop. We're nearing a future where you own nothing and rent everything, and they are one of few companies pushing back. This combined with the focus on making models efficient through better architecture/training, not just throwing more compute at it, seems like the right direction imo.
Is this the guy who talked a big game about all the things he was going to fix at Twitter, then utterly failed when confronted with a real world codebase and gave up having done nothing of use?
Lattner is a smart guy, but I think Mojo might be the wrong direction.
Time will tell.
History has not so far been kind to projects which attempt to supplant cPython, whether they are other Python variants such as PyPy, or other languages such as julia.
Python has a lot of detractors, but (despite some huge missteps with the 2-3 transition) the core team keeps churning out stuff that people want to use.
Mojo is being positioned "as a member of the Python family" but, like Pyrex/Cython, it has special syntax, and even worse, the calling convention is both different than Python, and depends on the type of variable being passed. And the introspection is completely missing.
I don't think they intend to supplant cPython, but to make it easier for someone to take a piece of software written in high-productivity Python and make it more performant on specialized hardware by using a similar syntax.
Long term it can find applications outside of ML-specific hardware.
Honestly, I feel like Julia might as well beat Mojo or sommat to the punch, sooner or later. It has some facilities and supporting infrastructure for a lot of scientific and data-handling tasks surrounding ML, if not for compiling and dispatching kernels (where XLA reins supreme to anything in the CUDA ecosystem!) For example, Bayesian programming like Turing.jl is virtually unmatched in Python. It's been a while since I looked at Lux.jl for XLA integration, but I reckon it could be incredibly useful. As long as LLM's and RLVR training thereof should continue to improve, we may be able to translate loads of exiting Pytorch code eventually.
But the first thing that gave me pause about Julia? They sort of pivoted to say "we're general purpose" but the whole index-starting-at-one thing really belies that -- these days, that's pretty much the province of specialty languages.
You're not supposed to admit it, but I never cared for Dijkstra's arguments on the matter. The same goes for his GOTO tirade, although that has been distorted by time somewhat. Pascal is using 1-ord, Fortran, R, Mathematica. If anything, it seems there's a longer tradition of 1-ord in scientific computing. In this view, I must agree insofar I don't think Julia people are serious about their "general purpose" stance whatsoever. But hey, these are merely idiosyncrasies. People say multiple dispatch is the shit, but it's just one bit of the puzzle with Julia. How they managed to engineer a solid foundation, semantics like that, without unnecessarily sacrificing performance—I don't think they get enough credit for that from programming guys.
> I never cared for Dijkstra's arguments on the matter.
It resonates with me, as does little-endian. There are evergreen arguments about both of these, but they stand out to me as two of the few places where I appear to be in sync with the majority.
> Pascal is using 1-ord, Fortran, R, Mathematica. If anything, it seems there's a longer tradition of 1-ord in scientific computing.
Actually, Pascal let you define the starting point, but, historically, COBOL (business) and FORTRAN started at one, and these days, it's Matlab (engineering), as well as R, Mathematica, and Julia. But, really, my point was that Julia is hyped to take over from Python, and it seems if that's the focus, then you should think long and hard about what features of Python to change, and, well, obviously that wasn't really the direction they came from.
> semantics like that, without unnecessarily sacrificing performance—I don't think they get enough credit for that from programming guys.
It's good work, but at the same time, a bit overblown IMO. For example, the creators claim homoiconicity, but that stretches the definition of that word to where Python would be homoiconic as well, and it's obviously not.
As far as the multiple dispatch goes, that's actually not that difficult of a puzzle piece when you are compiling ahead of time with unboxed objects.
The fact that it displays as 1 + 2 * 3 instead of (+ 1 (* 2 3)) ... meh. The whole point is to make metaprogramming easy, which Julia is quite successful at (for better or worse -- some people shouldn't be allowed near macros).
This 100% concerning Julia. Until recently at least, there was a ton of fundamental correctness issues. The issues may have been fixed, but it certainly does not inspire trust.
Honestly, I'm not familiar with it. I had only played with RxInfer, if only to try the so-called "message-passing" paradigm. My grasp on probability is really lacking, in fact I picked up prediction markets and Julia to get better at it.
If you don't mind me asking, what's the deal with NumPyro why you chose to work it?
If you want to "own" Nvidia, the much more realistic way of doing this then trying to compete with all the data centers that are already being built with Nvidia chips is obviously with open source models. In the case of open source models, inference is much more important to most people not training which a maxed out macbook already does a good job of.
>"We also have a contract with AMD to get MI350X on MLPerf for Llama 405B training."
Anything to help AMD (and potentially other GPU/NPU/IPU etc. chip makers) catch up with NVidia/CUDA is potentially worth money, potentially worth a lot of money, potentially worth up to Billion$...
Why?
If we have
a) Market worth Billion$
and
b) A competitive race in that Market...
then
c) We have VALUE in anything (product, service, ?, ???) that helps any given participant capture more of that market than their competitors...
(AMD (and the other lesser known GPU/NPU/IPU etc. chip vendors) are currently lagging behind NVidia's CUDA AI market dominance -- so anything that helps the others advance in this area should, generally speaking, be beneficial for all technology users in general, and be potentially profitable (if the correct deals could be struck!) by those that have the skills to do such assisting...)
Anyway, wishing you well in your endeavors, Tinygrad!
Saying Elon is the only adult in the room is bonkers level insane. As is calling the Ds a racist party. This is merely one link, his site is full of equally nuts ranting.
Aside from the edgy Unabomber quote and calling both established US political parties racists, everything there is reasonable analysis. What exactly got your goat?
"I don’t trust the news very much. I have no idea if the guy in the El Salavdor prison had a fair trial, if the students being deported are criminals, or even if they are being deported at all."
Lots of words and weird analogies to say basically nothing.
What is the status of the project? What can it do? What has it achieved in 5 years?
But no, let's highlight how we follow the "Elon process".
As a side note, whenever someone incessantly focuses on lines of code as a metric (in either direction), I immediately start to take them less seriously.
The third sentence is "The codebase is 18,935 lines not including tests." You can go to the repo and see what it does. Look at issues, PRs, etc. He wasn't saying it to brag about its size, but the opposite.
The mission is to commoditize the petaflop. Basically allow LLMs to be trained efficiently on commodity non-NVIDIA GPUs. Would you prefer some bullshit mission like Meta of "connecting people" or whatever the hell it is?
He said he has a hardware division that makes $2m a year. You can click on the link and buy a computer. He tells you the revenue.
He said he has a deal with AMD which is also public and on X.
The "Elon process" relies specifically to the goal of getting rid of all dependencies. Musk has spoken extensively about building things from the ground up and not relying on other vendors (in this example complex software dependencies). He says he wouldn't be able to build SpaceX competitively if he had just bought rockets or components.
I wish more people focused on public code and shipping publicly. Can I see Toyotas stack? Why does the touch screen perform worse than a 2012 iPad. What the hell is going on
I don't understand this hate someone like Hotz, a true engineer running an ambitious very open company, receives on a ... checks notes ... engineering forum? The whole setup is like a wet dream for engineers from a decade ago.
> The "Elon process" relies specifically to the goal of getting rid of all dependencies. Musk has spoken extensively about building things from the ground up and not relying on other vendors (in this example complex software dependencies). He says he wouldn't be able to build SpaceX competitively if he had just bought rockets or components.
That I cannot believe. He might have shifted the make-or-buy decisions, but both Tesla and SpaceX do a lot of outsourcing.
Note the "goal" there. SpaceX's only in flight explosion came after a strut (3rd party sourced) failed on S2, on the CRS-7 mission in 2015. They in sourced that, and haven't had many issues on ascent since then. They've also launched and landed some 500 rockets since then (165 this year) so ... at least they're walking the walk?
Using lines of code as a metric for productivity is bad. Using it to show how simple something is, or how a refactor removed x lines of code that doesn’t need to be maintained any more isn’t such a bad thing I’d say.
Yeah this is exactly right, if you can trust the contributors to not code-golf or otherwise Goodhart the LoC metric, then it's a reasonable measure of complexity.
It doesn't work as well when you start mixing languages, or generating code.
"Please don't pick the most provocative thing in an article or post to complain about in the thread. Find something interesting to respond to instead."
As someone with no skin the game in either direciton, it's interesting that you're so triggered by the mere mention of someone's name.
Is it really so difficult to parse out different aspects of a person's existence, such that one could simultaneously appreciate some of the positives (the existence and success of SpaceX, making Tesla a success against the odds, [popularisation of] some engineering leadership concepts) while also acknowledging the negatives (of which, more latterly, there are many)?
Or must the sheer emotion always cloud out rational judgement?
I hope Mitchell Hashimoto with his billions will join forces with Geohotz. I mean ghostty is fine and all. But we are talking here about minority report UI like future.
I remember when he launched everything and was hoping that the AMD hardware (very capable) was just hamstrung by software. The idea that the easy part is actually the chips is something I never considered though I "know" that "Nvidia succeeded because of their software". Haha, very clever.
I've got a Comma 3X and I'm thankful for the 4090 P2P work too (which is now here? https://github.com/tinygrad/open-gpu-kernel-modules) so I'm excited to see it work. Rooting for the guy. Hope it's true that the chip part is the easy work. Could be that both are "the hard work".
I've looked at the "only 18,935 lines of code" python code and it made me want to poke my eyes out. Not sure what's the point of this extreme code-golfing.
From the instructions for potential contributors:
No code golf! While low line count is a guiding light of this project, anything that remotely looks like code golf will be closed. The true goal is reducing complexity and increasing readability, and deleting \ns does nothing to help with that.
https://github.com/tinygrad/tinygrad?tab=readme-ov-file#cont...
I think it's an amazing experiment.
You can look at the PyTorch code base and understand a small local function instantly, but if I would have a task to have a deep understanding of either PyTorch with all kernel code and low level code, whole CUDA code base + LLVM compilation code or Tinygrad I would pick Tinygrad in an instant.
The code looks hard because what it is doing is hard, but all its layers can be debugged.
yes, it's really crazy, if people think you're exaggerating look at this:
https://github.com/tinygrad/tinygrad/blob/master/tinygrad/co...
One of the cases why I think obsession with lines of code is one of the most counterproductive metrics, it always produces code like this.
That doesn’t look super awful to me? Hardly extreme code golfing.
The far more interesting part is the order of magnitude. If they can pull off a 20k LOC with zero dependencies (implying a pretty concise project size) and it still works well on meaningful applications, that’s pretty neat. A 1000x reduction in code size and matching/exceeding in perf is worth looking at. Probably also implying a better architecture as code golf isn’t gonna get you 1000x less code. Again - their claims not mine, so we’ll see.
But at that point they can triple the LOC to 60k with nothing but white space, new lines, and comments, for all I care. It won’t even add a zero.
it looks dense but perfectly readable. arguably more readable that way than if it had a bunch of extra new lines, definitions, and code blocks spreading the logic out into a larger visible area.
I'm inclined to agree. While not always appropriate or popular, it makes some sense to me to have the visual weight/area of the code being ~proportional to it's significance. Communicates the ideas more clearly. Instead of spending the majority of space telling me what _isn't_ going to happen, and hiding what is.
I often find myself wishing this was more ergonomic in languages.
TBH that looks pretty decent to me. GPU programming is very very complicated. A simple kernel in torch is hundreds to thousands of LOCs, with much worse style.
I agree with some poster above, the code looks hard simply because the problem is very hard, not because they want to write it that way.
I think the discomfort I felt at looking at that was because of the stylistic difference. There isn't any part of it that looks terribly hard to understand when compared to other code. I presume anyone dealing with this codebase would know what ctx entails and most things seem to logically flow from what it provides.
I think if I dealt with this on a daily basis I might end up finding if vastly more preferable, albeit at the risk of alienating fellow developers. In that respect it seems much like learning to use Emacs or vi
I don't think this is bad, if you know Python then most of the code will be fine for you. I think you're probably referring to pm_reduce_collapse, but while it looks daunting at first, it really isn't when you consider the alternatives, I'd be curious on how you'd improve it short of creating a DSL.
Running a formatter on that codebase would probably at least triple it.
Depends on formatter's config
Huh. This is more readable than almost any large python codebase to me at first glance. It’s 2D, and well commented. I find it an excellent use of screen real estate. Perhaps it would be a different story if most of us weren’t stuck in 16:9?
Is is code a form of AST rewrite rules for optimization? This operation still looks like a incomprehensible wall of code 40 years later (I looked in the past inside the C++ compiler).
Doesn’t seem too bad to me. It reminds me a bit of Clojure. Like Clojure, though, the lack of static types would be a headache.
It’s not crazy at all, but personally I like simple code that flows down the page more, not across
It's two-dimensional code, not one-dimensional code.
Declarations flow down the page, definitions flow across.
You’re getting some pushback but one look at pm_reduce_collapse and I’m glad I don’t have to work in this codebase.
I see the advantage of the inline lambdas, but also it seems like it would hamper the ability to test the functions which can often have intricacies that catch you out. I believe one of the principles of Tinygrad is that tests shouldn't be part of the core codebase and shouldn't add to the total linecount.
I think there is an opportunity there to have a tag in comments for tests.
Have a hotkey to generate an id so you could have
and it creates a test that exists away from the main codebase. A process that runs tests could scan the code for testID's, intelligently extract the relevant part of the code into the test harness and runs the tests. There would need to be some infrastructure needed to handle placing the code to be tested into the right context but you could haveYou don't really want or need classical unit tests for compilers. You need a harness that you can feed a program representation into and get a transformed one out, then check the result -- ideally mostly just by running it, or alternatively by comparing the output against a reference.
I agree. It is definitely readable but clearly formatting decisions were made to keep line count down over the flow of code. It isn't even just the variable names, things like having a function with a single return statement on one line, while legal, I cannot imagine why someone would do it in a non one off script code.
> having a function with a single return statement on one line, while legal, I cannot imagine why someone would do it in a non one off script code.
I agree. Seems to be a personal preference, but still feels odd.
to quote an old academic research programmer: "Two-letter variable names are fine, as long as both letters are meaningful" :-)
Looks fine to me.
I'm going to guess that you're used to codebases that use an autoformatter.
There's definitely a case to be made for autoformatters in projects with a very large (>100) number of developers, but the price you pay for that is much poorer information density per screenful of code.
For things like tinygrad or sqlite with a small dev team it's possible to use whitespace, style, and formatting to communicate important information, just like mathematicians do. The AMS journals don't autoformat mathematicians' equations!
Even with autoformatters, it's a choice of what criteria you pick. It's possible to have consistency without enforcing low information density.
I wish. Stuff like Prettier is purposely unconfigurable and leads to the unreadability of JS code across the ecosystem.
No, it really isn't. Like I said, math journals don't autoformat the mathematicians' equations. There's signal encoded in the formatting that a tool can't understand.
But if you have hundreds of developers on a project it does in fact make sense to sacrifice that signal in order to keep them from fighting with each other over silly formatting choices.
> I'm going to guess that you're used to codebases that use an autoformatter.
I'm used to Python code being "Pythonic" - which is one of those "I know it when I see it" terms.
Down with large line counts!
LLMs have done two things for us: made lines of code a commodity, but arguably even more important: made understanding an arbitrary amount of lines of code a commodity too.
with this in hand, large codebases that were designed in the primordial era of requiring human cognition to grok are emabarassingly antiquated.
"umm what does this mean?" -> right click -> explain with AI -> "got it".
I literally reddit-soyjacked when i saw "tackle LLVM removal". I would argue that LLVM was/is the most well thought out and well-architected piece of software that exists today... but in the age of AI... who could possibly care now? when I say "well thought out" and "well-architected", that is in the context of human eyeballs. But who needs human eyeballs when we have much more powerful computer eyeballs? who grok code way better and way faster than we do.
now, the massive line count of projects like LLVM, Linux, and Chrome become much harder to defend in the context of code re-use. Why drag in millions of code when you can get an LLM to write just the bits you care about? LLVM has a ton of optimisations that are all well and good, but how many of them actually move the needle on HPC platforms that do an awful lot of instruction re-ordering and re-scheduling anyway?
Could we get away with 5% of the codebase to do "just the bits we care about"? in the past the answer might be, "well yes but its still a lot of (manual) coding", but now - why not? Let an LLM loose on the design doc and fill in the gaps!
> HPC platforms
GPUs don't reorder instructions at all.
>People get hired by contributing to the repo. It’s a very self directed job, with one meeting a week and a goal of making tinygrad better
I find this organizational structure compelling, probably the closest to reaching 100% productivity in a week as you can get.
It’s hard to argue against hiring contributors, but a bounty system that pays pennies vs. market value for skilled developers shouldn’t be the only interview path, it’s borderline exploitative.
It’s not exploitive if you like working on it. I can see an additional upside here (for tinygrad) that they better screen out people who are just trying to optimize for job prospects or money, who would do better elsewhere, and get people who actually like contributing.
Few people with no innate interest in the project are likely to ramp up and start contributing just for a shot at a job. Whereas if you’re Facebook or whoever you are much more likely to get people who don’t care about the product and just have decided they can make a lot of money by jumping through the right hoops.
This idea that you're supposed to accept worse pay because you believe in the idea doesn't apply to George. If his companies succeed, he'll be rich. Of course, there's nothing wrong with even working for free if that's what you like, just don't make a moral principle out of it.
I don’t mean to imply it’s to get employees to accept lower pay. I mean that there is some implicit screening against people who are solely optimizing for high pay.
Lots of reasons why you would want to simultaneously pay well and not attract people who are optimizing for pay.
I don’t fully understand why you wouldn’t want to attract people who optimize pay. You always should aim for getting paid what you’re worth which is understandably hard to define. I think that’s the whole point of OPs argument how this is exploitive. You’re trying to sell a “vision” for lower pay.
As opposed to months of interview prep, followed by half a dozen interview stages, possibly including an unpaid take-home mini project, all of which could be for naught because you fluffed some obscure algorithm question that bears no relation to your day job?
All other interview processes (that I've witnessed or heard of) waste anyone's time with barely anything to show for though, regardless if it ever comes to a offer.
To me, it's better than spending months of your free time grinding leetcode to get past an interview (everyone wants to hire like FAANG now).
You get a small reward in return if the contribution is accepted and you get to contribute to the world corpus of knowledge.
I wonder what happened to George’s old policy of requiring everyone to move to San Diego?
That's comma.ai's policy since they make hardware and solve physical problems. The tiny corp has been hybrid (remote-first) since day 1 because it primarily writes open source software, and there's a long track record of success with remote for this kind of task.
We have a few whole-team meetups in Hong Kong each year for 2-4 weeks, and there's a San Diego or Hong Kong office that anyone can work from as they choose. We also have a wide array of fancy multi GPU boxes that everyone on the team gets full access to (known external contributors can get some access also).
I think many companies that were quick to embrace remote have walked it back, not everyone is capable of working productively remotely, nor are all types of work amenable to remote.
Why Hong Kong? I guess you have a bunch of contributors near there?
If I recall correctly, George recently relocated there.
An answer from the man himself. Thank you.
Have you run into problems with contributors who can't enter the PRC?
The mainland and Hong Kong still have significantly different visa policies. I'm not sure if it's changed at all since the handover, except for mainlanders entering HK.
Actually the opposite is the problem:
“International scientists rethink U.S. conference attendance“
https://www.science.org/content/article/international-scient...
This is not helpful.
It's not a helpful reply to that particular comment, but I think it's worth recognizing that the US is now in the same camp as HK or mainland China now where there will be some people who just simply cannot enter.
that's for comma.ai different company
Very weird to market this as subscribing to "Elon process for software"
I remember when defcon ctf would play Geohot's PlayStation rap video every year on the wall.
I hate it when ‘inspirational’ quotes are attributed to the person with the largest audience and not the people who came up with it, like in this case, the engineers at Lockheed’s Skunk Works.
You would be amazed
https://en.wikipedia.org/wiki/TRIZ
Ok this wins my “best wikipedia article of December” award
Check out this cacophony of an infographic:
https://upload.wikimedia.org/wikipedia/commons/b/bf/40_princ...
No wonder the soviet union collapsed!
When you need Moscow to explain the hammer sign on your corded drill, its too late for damage control.
It's an apocryphal quote.
"A designer knows he has achieved perfection not when there is nothing left to add, but when there is nothing left to take away."
- Antoine de Saint-Exupéry
Or Colin Chapman at Lotus: "Simplify, then add lightness." Could just be wise advice :)
I like this. A lot.
The risk for Tinygrad is that PyTorch will create a new backend for Inductor, plug in their AMD codegen stuff and walala, PyTorch still king. I mean, they could have easily just taken that route themselves instead of bothering with a new ML framework and AD engine. 99% of the work is just the AMD codegen part of the compiler.
Either way, super cool project and I wish them the best.
tinygrad has a PyTorch frontend, we fully encourage the frontend to stay PyTorch and for them to integrate tinygrad at any level. Our mission is to commoditize the petaflop, all frontends are welcome. We also have a quite complete ONNX frontend.
> walala
Is this like voila or something else?
It's voila, if you're posting on a forum for Chevy truck owners.
I thought it was “wololo” (the sound made by the priest in Age of Empires when it converts an enemy unit to a friendly one.)
It almost sounded like "wallah", Arabic slang for "I swear to god"
The main risk is that an LLM will rewrite itself and programmers will no longer be needed. I worked a bit with tinygrad and it looks quite amusing I managed to run it right away and make fixes in one of the tasks, but I decided not to commit because I was afraid of rejection. For example, the tasks are strange: $500 for two months, optimizing H.265, something that only a small group of people in the world can do.
The SV is a unique place where you can meet Geo and get $5M, maintain a bunch of hardware, build a framework in 20,000 LOC and everything works well.
> To fund the operation, we have a computer sales division that makes about $2M revenue a year.
What's the margin on that? Do 5 software engineers really subsist on the spread from moving $2M/yr in hardware?
Looking at their boxes, I'd guess 20-ish%, once the labor costs of designing the boxes is out of the picture. I imagine George doesn't take a salary, or at least takes only a small one. They have a contract with AMD as well. I'd bet the company is modestly profitable.
that plus contracts with AMD plus they have some VC money
George raised $5.1M in 2023 for Tinygrad
Is it really "Complex"? Or did we just make it "Complicated"? - https://www.youtube.com/watch?v=ubaX1Smg6pY
Programming a GPU in 2025 is complex, that might be because it has been made complicated, but regardless, it is not complexity that this project can control.
The fact that it competes with PyTorch in so few lines speaks to the incredibly low incidental complexity imposed by Tinygrad.
If you think you can do better, the code's right there and you're welcome to try! There's a giant pile of money at the end of the rainbow for you if you can uncomplexify it.
(Love that talk tho)
I don't care for money but you seem to so you should focus on making as much as possible.
> pathologizing the speaker/writer does not contribute to anything either so my recommendation is to leave those out as well.
What would tinygrad replace if they continue to proceed like this?
Potentially PyTorch and Tensorflow.
I think it has great potential for deployments on edge systems.
It is already used in comma.ai’s openpilot hardware
But that is an inside deal - same founder, I believe
Eating your own dogfood is good validation.
How are ergonomics compared to pytorch, though? Adoption can be also driven by frictionless research (e.g. torch vs. tf comes to mind). Repo is missing proper docs aimed at early adopters imho
> tinygrad is following the Elon process for software. Make the requirements less dumb. The best part is no part.
That’s not Elon. See Russian TRIZ
https://en.wikipedia.org/wiki/TRIZ
Not sure where it was from but I remember reading a comment about how every modern rocket scientist needs to come to terms with the fact that every novel idea they might have has already been proposed and tried by a Russian scientist in the 20th century.
Soviet scientist, let me correct you a bit, comrade.
I really hope tinygrad succeeds with their mission of commoditizing the petaflop. We're nearing a future where you own nothing and rent everything, and they are one of few companies pushing back. This combined with the focus on making models efficient through better architecture/training, not just throwing more compute at it, seems like the right direction imo.
what have people built with tinygrad?
Comma ai
Is this the guy who talked a big game about all the things he was going to fix at Twitter, then utterly failed when confronted with a real world codebase and gave up having done nothing of use?
He left after realizing nothing was going to change (not like he’s in the leadership).
Also half-joked how the good food went away.
—
George is many things but not a quitter (see comma ai for example).
If someone could pull this, it’s him due to “never give up, never surrender” attitude.
The shit with nvidia just needs to stop
What happened to the tinybox red (v1)? It had way better specs than red v2.
So this is all python? I bet Chris Lattner probably approached them.
Lattner is a smart guy, but I think Mojo might be the wrong direction.
Time will tell.
History has not so far been kind to projects which attempt to supplant cPython, whether they are other Python variants such as PyPy, or other languages such as julia.
Python has a lot of detractors, but (despite some huge missteps with the 2-3 transition) the core team keeps churning out stuff that people want to use.
Mojo is being positioned "as a member of the Python family" but, like Pyrex/Cython, it has special syntax, and even worse, the calling convention is both different than Python, and depends on the type of variable being passed. And the introspection is completely missing.
I don't think they intend to supplant cPython, but to make it easier for someone to take a piece of software written in high-productivity Python and make it more performant on specialized hardware by using a similar syntax.
Long term it can find applications outside of ML-specific hardware.
Honestly, I feel like Julia might as well beat Mojo or sommat to the punch, sooner or later. It has some facilities and supporting infrastructure for a lot of scientific and data-handling tasks surrounding ML, if not for compiling and dispatching kernels (where XLA reins supreme to anything in the CUDA ecosystem!) For example, Bayesian programming like Turing.jl is virtually unmatched in Python. It's been a while since I looked at Lux.jl for XLA integration, but I reckon it could be incredibly useful. As long as LLM's and RLVR training thereof should continue to improve, we may be able to translate loads of exiting Pytorch code eventually.
I dunno. This sort of thing gives me pause:
https://danluu.com/julialang/
But the first thing that gave me pause about Julia? They sort of pivoted to say "we're general purpose" but the whole index-starting-at-one thing really belies that -- these days, that's pretty much the province of specialty languages.
You're not supposed to admit it, but I never cared for Dijkstra's arguments on the matter. The same goes for his GOTO tirade, although that has been distorted by time somewhat. Pascal is using 1-ord, Fortran, R, Mathematica. If anything, it seems there's a longer tradition of 1-ord in scientific computing. In this view, I must agree insofar I don't think Julia people are serious about their "general purpose" stance whatsoever. But hey, these are merely idiosyncrasies. People say multiple dispatch is the shit, but it's just one bit of the puzzle with Julia. How they managed to engineer a solid foundation, semantics like that, without unnecessarily sacrificing performance—I don't think they get enough credit for that from programming guys.
> I never cared for Dijkstra's arguments on the matter.
It resonates with me, as does little-endian. There are evergreen arguments about both of these, but they stand out to me as two of the few places where I appear to be in sync with the majority.
> Pascal is using 1-ord, Fortran, R, Mathematica. If anything, it seems there's a longer tradition of 1-ord in scientific computing.
Actually, Pascal let you define the starting point, but, historically, COBOL (business) and FORTRAN started at one, and these days, it's Matlab (engineering), as well as R, Mathematica, and Julia. But, really, my point was that Julia is hyped to take over from Python, and it seems if that's the focus, then you should think long and hard about what features of Python to change, and, well, obviously that wasn't really the direction they came from.
> semantics like that, without unnecessarily sacrificing performance—I don't think they get enough credit for that from programming guys.
It's good work, but at the same time, a bit overblown IMO. For example, the creators claim homoiconicity, but that stretches the definition of that word to where Python would be homoiconic as well, and it's obviously not.
As far as the multiple dispatch goes, that's actually not that difficult of a puzzle piece when you are compiling ahead of time with unboxed objects.
Maybe it's wrong to call it homoiconicity, but Julia code in symbolic form is a first-class citizen in a way that has no remote equivalent in Python.
The fact that it displays as 1 + 2 * 3 instead of (+ 1 (* 2 3)) ... meh. The whole point is to make metaprogramming easy, which Julia is quite successful at (for better or worse -- some people shouldn't be allowed near macros).This 100% concerning Julia. Until recently at least, there was a ton of fundamental correctness issues. The issues may have been fixed, but it certainly does not inspire trust.
> For example, Bayesian programming like Turing.jl is virtually unmatched in Python.
What about numpyro?
Disclaimer: I contribute to numpyro occasionally.
Honestly, I'm not familiar with it. I had only played with RxInfer, if only to try the so-called "message-passing" paradigm. My grasp on probability is really lacking, in fact I picked up prediction markets and Julia to get better at it.
If you don't mind me asking, what's the deal with NumPyro why you chose to work it?
If you want to "own" Nvidia, the much more realistic way of doing this then trying to compete with all the data centers that are already being built with Nvidia chips is obviously with open source models. In the case of open source models, inference is much more important to most people not training which a maxed out macbook already does a good job of.
>"We also have a contract with AMD to get MI350X on MLPerf for Llama 405B training."
Anything to help AMD (and potentially other GPU/NPU/IPU etc. chip makers) catch up with NVidia/CUDA is potentially worth money, potentially worth a lot of money, potentially worth up to Billion$...
Why?
If we have
a) Market worth Billion$
and
b) A competitive race in that Market...
then
c) We have VALUE in anything (product, service, ?, ???) that helps any given participant capture more of that market than their competitors...
(AMD (and the other lesser known GPU/NPU/IPU etc. chip vendors) are currently lagging behind NVidia's CUDA AI market dominance -- so anything that helps the others advance in this area should, generally speaking, be beneficial for all technology users in general, and be potentially profitable (if the correct deals could be struck!) by those that have the skills to do such assisting...)
Anyway, wishing you well in your endeavors, Tinygrad!
Dude is an absolute nut, I'll stick with PyTorch
https://geohot.github.io/blog/jekyll/update/2025/04/22/a-way...
The blog seems like a regular political opinion.
We can't just call people we disagree with "absolute nuts" all the time.
Saying Elon is the only adult in the room is bonkers level insane. As is calling the Ds a racist party. This is merely one link, his site is full of equally nuts ranting.
https://geohot.github.io/blog/jekyll/update/2023/04/11/wireh...
https://geohot.github.io/blog/jekyll/update/2025/10/19/solut...
Aside from the edgy Unabomber quote and calling both established US political parties racists, everything there is reasonable analysis. What exactly got your goat?
"I don’t trust the news very much. I have no idea if the guy in the El Salavdor prison had a fair trial, if the students being deported are criminals, or even if they are being deported at all."
This is referring to Elon Musk: "You are the closest thing to an adult in any room in America."
Lots of words and weird analogies to say basically nothing.
What is the status of the project? What can it do? What has it achieved in 5 years?
But no, let's highlight how we follow the "Elon process".
As a side note, whenever someone incessantly focuses on lines of code as a metric (in either direction), I immediately start to take them less seriously.
Did we read the same article?
The third sentence is "The codebase is 18,935 lines not including tests." You can go to the repo and see what it does. Look at issues, PRs, etc. He wasn't saying it to brag about its size, but the opposite.
The mission is to commoditize the petaflop. Basically allow LLMs to be trained efficiently on commodity non-NVIDIA GPUs. Would you prefer some bullshit mission like Meta of "connecting people" or whatever the hell it is?
He said he has a hardware division that makes $2m a year. You can click on the link and buy a computer. He tells you the revenue.
He said he has a deal with AMD which is also public and on X.
The "Elon process" relies specifically to the goal of getting rid of all dependencies. Musk has spoken extensively about building things from the ground up and not relying on other vendors (in this example complex software dependencies). He says he wouldn't be able to build SpaceX competitively if he had just bought rockets or components.
I wish more people focused on public code and shipping publicly. Can I see Toyotas stack? Why does the touch screen perform worse than a 2012 iPad. What the hell is going on
I don't understand this hate someone like Hotz, a true engineer running an ambitious very open company, receives on a ... checks notes ... engineering forum? The whole setup is like a wet dream for engineers from a decade ago.
Almost completely open source
Interview is completing a paid bounty
CEO is engineer
Has a clear mission, goals, and timeline
What is your issue?
The Elon process is 100% dependency on government subsidies
> The "Elon process" relies specifically to the goal of getting rid of all dependencies. Musk has spoken extensively about building things from the ground up and not relying on other vendors (in this example complex software dependencies). He says he wouldn't be able to build SpaceX competitively if he had just bought rockets or components.
That I cannot believe. He might have shifted the make-or-buy decisions, but both Tesla and SpaceX do a lot of outsourcing.
> That I cannot believe.
Note the "goal" there. SpaceX's only in flight explosion came after a strut (3rd party sourced) failed on S2, on the CRS-7 mission in 2015. They in sourced that, and haven't had many issues on ascent since then. They've also launched and landed some 500 rockets since then (165 this year) so ... at least they're walking the walk?
Using lines of code as a metric for productivity is bad. Using it to show how simple something is, or how a refactor removed x lines of code that doesn’t need to be maintained any more isn’t such a bad thing I’d say.
Yeah this is exactly right, if you can trust the contributors to not code-golf or otherwise Goodhart the LoC metric, then it's a reasonable measure of complexity.
It doesn't work as well when you start mixing languages, or generating code.
Less LOC also doesn't imply simplicity: just look at the demoscene, which often has the former but not the latter.
Demo scene or other competitions that aim at using little space / shortest way to achieve something are not really a good counter example.
TFA includes a time measurement though, and 5 years for 18'935 SLOC doesn't scream quite "how simple something is".
From [0]:
"When we can reproduce a common set of papers on 1 NVIDIA GPU 2x faster than PyTorch. We also want the speed to be good on the M1. ETA, Q2 next year."
[0] https://tinygrad.org/#tinybox
He was able to run nvidia gpu on mac via thunderbolt with tinygrad.
https://www.tomshardware.com/pc-components/gpus/tiny-corp-su...
—
Check tinygrad’s twitter account for specifics if you want to catch up on progress
making things less dumb is not a elon's process, if it's the case then we are saying everything that elon is not involved in/with is dumb !
[flagged]
"Please don't pick the most provocative thing in an article or post to complain about in the thread. Find something interesting to respond to instead."
https://news.ycombinator.com/newsguidelines.html
As someone with no skin the game in either direciton, it's interesting that you're so triggered by the mere mention of someone's name.
Is it really so difficult to parse out different aspects of a person's existence, such that one could simultaneously appreciate some of the positives (the existence and success of SpaceX, making Tesla a success against the odds, [popularisation of] some engineering leadership concepts) while also acknowledging the negatives (of which, more latterly, there are many)?
Or must the sheer emotion always cloud out rational judgement?
the value is the directness, not implied origination
not everyone cares about playing voldemort
What is so aggrandizingly 'direct' about calling the system you are attempting to improve 'dumb'?
you have a more direct way?
There are lots of bubbles where Elon is still king. Those bubbles are often void of deodorant.
Based on the response it appears HN is one such bubble.
Elon spent billions to buy a platform and promote his tweets. He spent billions more to create a tweaked AI model that praised him like a mad king.
He only has to spend a couple thousand a month to influence comment ranking on HN.
Fell bad for geohotz. Such a lovely guy, i hope he strikes it right soon
Seems like he's doing fine, why do you feel bad for him?
I hope Mitchell Hashimoto with his billions will join forces with Geohotz. I mean ghostty is fine and all. But we are talking here about minority report UI like future.