323 points · by atg_abhishek · 2y ago · 151 comments
These things are inferior at many levels: - Algorithmic: These things aren't feeding back to their human masters tips and tricks on how to modify the network to go faster beyond some very basic signals. - Loss of intent: ML network designers are specifying architecture in python, and by the time it's gone through many layers of lowering, you can get some complete garbage. Highly efficient garbage, but still garbage. (recent example, we caught one of these compilers doing a slice update operation by first forming the range of all possible indices to the array, slicing that to get indices to update, and then doing a scatter; we replaced it with a single memcpy call). - Inefficient kernels. Every time we see the output of these compilers go head-to-head with an expert assembly programmer, the compiler loses, often by 30%+. This always seems like the sort of thing that should be easy to solve, but given no-one seems to have cracked it in the past 50 years, it's obviously not as simple as it sounds.
Now consider all the heuristics for inlining, loop unrolling, vectorization etc in compilers, certainly a neural net can be beneficial and possibly easier to maintain than tons of human written heuristics.
I'd be very surprised if that can be extended to a large complex algorithmic system that is amenable to mathematical reformulations (at least within the next 10 years).
https://github.com/official-stockfish/Stockfish/commit/af110...
Funny you should say that. Because traditional compilers have been incredibly useful.
That throughput is the point though? You cannot have performance specialists on every single ML workload. It's still significantly better than not having these kinds of optimization.
What's the actual state of these "ML compilers" currently, and what is rhe near term promise?
You simply write model = torch.compile(model)
"Across these 163 open-source models torch.compile works 93% of time, and the model runs 43% faster in training on an NVIDIA A100 GPU. At Float32 precision, it runs 21% faster on average and at AMP Precision it runs 51% faster on average."[1]
What google is trying to do, is to involve more people in the R&D of these kind of methods.
It actually sounds very useful and cool, I just completely did not get that from the article.
Disclaimer: I will be very handwavey, reality is complex.
This is achieved by compiling the graph into some intermediate representation. And then implementing the right backend. For projects here, look at stableHLO, IREE, openXLA.
You can argue that Jax's jit compiler is a form of such compiler, mapping the traced operations down to XLA, which then does its own bit of magic to make it work on your backend.
It's transformations and abstractions all the way down.
This is only about predicting performance of a given graph and not about improving/suggesting/editing a new equivalent graph. As in FunSearch, models which have decent predictive power could be used with evolutionary search.
[1] https://github.com/google-research-datasets/tpu_graphs#featu...
[2] TpuGraphs: A Performance Prediction Dataset on Large Tensor Computational Graphs https://arxiv.org/abs/2308.13490
[3] Learning Large Graph Property Prediction via Graph Segment Training https://arxiv.org/abs/2305.12322
*1. Input:*
* Tensor shape: [2,4,16] * `2`: This represents the *batch size*, meaning there are two independent data samples being processed. * `4`: This is the *input feature dimension*, indicating each sample has 4 features. * `16`: This is the *input channel dimension*, suggesting each feature has 16 channels of information.
*2. Kernel:*
* Shape: [4,16,8] * `4`: This is the *kernel size*, meaning the filter window used to convolve has a width of 4. * `16`: This matches the *input channel dimension*, ensuring the filter operates on the same number of channels as the input. * `8`: This is the *output channel dimension*, indicating the convolution produces 8 new channels of information per sample.
*3. Output:*
* Shape: [2,8] * `2`: This remains the *batch size* as the operation is applied to each sample independently. * `8`: This matches the *output channel dimension* of the kernel, signifying the final tensor has 8 new features extracted from the input.
*4. How is it possible?*
Despite the seemingly mismatched dimensions in the input and output, convolution on graphs works by leveraging the *neighborhood structure* of the graph. Here's a simplified explanation:
* The kernel slides across the graph, applying its weights to the features of the current node and its neighbors within a specific radius. * This weighted sum is then aggregated to form a new feature for the current node in each output channel. * As the kernel moves across the graph, it extracts information from the local neighborhood of each node, creating new features that capture relationships and patterns within the graph.
*Additional considerations:*
* The graph structure and edge weights likely play a role in how information propagates during the convolution process. * Specific details of the convolution implementation, including padding and stride, might also influence the output shape.
Off the top of my head, I can think for at least five foundation models (Llama, Claude, Gemini, Falcon, Mistral) that are all trading blows, but GPT is still a head above them and has been for a year now. Transformer LLMs are simple enough that, demonstrably, anyone with a million bucks of GPU time can make one, but they can't quite catch up with OpenAI. What's their special sauce?
I’m speculating here but I think Google always refrains from getting into the manual side of things. With LLMs, it became obvious so fast that data is what matters. Seeing Microsoft’s phi-2 play, I’m convinced more about this.
DeepMind understood the properties, came up with Chinchilla but DeepMind couldn’t integrate well with Google, in terms of understanding what kind of data Google should supply to increase model quality.
OpenAI put annotation/cleaning work almost right from the start. Not too familiar with this but human labor was heavily utilized to increase training data quality after ChatGPT started.
If I recall right, GPT4 got done in October. After that, it was RLHF and safety work (Bing starts using GPT4 publicly in February, a month earlier than official launch)
It will be interesting to see how capable Gemini Ultra actually is. For now we wait.
https://deepmind.google/discover/blog/funsearch-making-new-d...
I'm pretty naive in terms of granular understanding here as I am barely proficient in Python, to be clear, but when I daydream about things you could solve with machine learning/AI, this is the approach I always think of and I guess is how I thought it already worked. Load it up with the best information we have currently, define the desired results as clearly as possible, implement some form of automatic feedback, and let it run iteratively until it produces something better than what you had before.
Is this a case of "well no shit, but actually implementing that effectively is the hard part"? Is it being able to quickly apply it to a wide variety of problems? I guess I'm trying to understand whether this is a novel idea (and if so, what parts are novel), or if the idea has been around and it's a novel implementation.
Otherwise the description is the same as "select randomly, keep the best, iterate".
The goal is also complex. You might be thinking of "find the most efficient program" but that's not what we're doing here iiuc. We're trying to get a program that makes other unseen programs more efficient. That's hard to define as a goal.
The hype may be specific to some companies for now, but AI is deeply going to change many industries, especially due to open-source, specialized chips to allow running in local, and new hardware (I strongly hope a clone of H100 A80G comes quickly).
The next step is to add limbs to the LLMs.
Then we get Tesla bot who is going to help you with daily chores, and to execute tasks in a factory.
The bot can ask its own internal knowledge base to know what action to execute next, and because the model can output JSON, the action commands can be sent to motors for in-real-life execution.
I am hoping we get to the point where the models are good enough that classes in schools are introduced on how to use them rather than just build them as the number of people wanting to or willing to learn programming is a lot smaller than the number of people to looking for ways to do things more efficiently.
It reminds me of the middle ages where only the priest was allowed to read and interpret the bible, mostly through the virtue of knowing latin. Then suddenly the printing press comes around and everyone can get their own cheap bible in their language. You just can't fight and enforce this kind of thing in the face of such insane progress. In 100 years (if we're not extinct then) people will probably look back on mass education where one overworked teacher tries to explain something in a standard way to 30 people (over half of who are bored or can't keep up) as some kind of old age savagery.
I am certain in 30 years everything will still be the same.
If coding hasn't change much in 30 years, it may mean you have not changed much in 30 years.
I like programming how I do now. I don’t plan to stop.
People do lots of things manually that machines have been able to do for a long time.
Right now we're still OK because the AI isn't good enough; when it gets good enough, doing things manually is as economically sensible as making your own iron by gathering a few times your mass in wood, burning some of in a sealed clay dome to turn it into charcoal, digging up some more clay to make a porous pot and a kiln to fire it in, filling it with iron rich bacterial scum from a creek, letting the water drain, building a furnace, preheating it with the rest of the wood, then smelting the bacterial ore with the charcoal, to yield about 7 grams or iron.
All disciplines evolve over time and those who fail or refuse to keep up will be left behind.
I think the era of big tech paying fat stacks to a rather larger number of technical staff will start to wane as well. Better hope you have top AI paper publications and deep experience with all parts of using LLMs/whatever future models there are, because if not, you’ll be in for a world of pain if you got used to cushy tech work and think it’s inevitable in a world where AI is advancing so fast.
If LLMs got this good, the brick wall these orgs will hit is what will really ruffle feathers. Leadership will have to be replaced by their technical workers in order for the company to continue existing. There's simply not enough information in the very high level plain english requirements they're used to thinking about. From a theoretical and practical perspective, you very likely cannot feed that half-assed junk to any LLM no matter how advanced and expect useful results. This is very much already the case human-to-human for all of history.
Either that or nothing happens, which is the current state of things. Writing code is not even 10% of the job.
I see the threat right now to low-paid writing gigs. I’m sure there’s a whole stratum of those they have wiped out, but I also know real live humans still doing that kind of work.
What developers may use in five years is a better version of Copilot trained on existing code bases. They will let developers do more in the time they have, not replace them. Open source software has not put us all out of jobs. I foresee the waning of Big Tech for other reasons.
Why does it feel like people think this is a useful or interesting whine? OK you brute-force solved tic-tac-toe, you built an AI. Congratulations, everyone recognises the dawn of Artificial Intelligence - and truly, enumerating all states of tic-tac-toe is all we ever dreamed of, all we could want, it's really all there is to intelligence. The term "AI" will never ever be used to mean anything else.
The term "AI" means (solving the first problem that was ever suggested to be AI decades ago) - how is that a better state of the world? What has anyone gained from "not moving the goalpoasts"?
https://hn.algolia.com/?dateRange=all&page=0&prefix=false&qu...
Is this just some performative grousing or do you really think what has been developed to date is “artificial intelligence”?
These comments all conveniently fail to define their author’s goalposts that apparently have been reached or surpassed. What were yours?
These things are... physically possible, but have WBE and uploads as a hard requirement. Those are going to affect a hell of a lot of things more than the drug industry!
Amusingly, machine-phase nanotechology and blood nanobots would be easier to evaluate, since simple cell-level mechanical interventions (reading surface proteins on cancer cells and chopping them up, say) will have fewer interactions than a small molecule that diffuses into every cell in the body.
Humans aren't capable of doing this, but still make useful drug discoveries. AI can be empowered to conduct research in the real world, it doesn't need to simulate everything.
This is how the human doctors who have cured things in the past have done it, is it?
The way this is going to work, when it happens, is that you'll ask the AI for a cure and it will give you a hundred candidates. A human doctor will look at the list and throw half of them out because they're toxic, several of the remainder will be excluded by animal trials, the few remaining will proceed to human clinical trials and one of them will actually work.
Also, while not medicine focused, Google’s GNOME project results announced a few weeks ago was pretty remarkable. They discovered more theoretical new materials using their ML approach than the rest of human history combined, and they are already confirming many of the results in laboratory settings. That has the potential to be a revolution in limitless scientific and engineering applications.
AlphaFold was a nice surprise when it happened, too.