Hacker News new | ask | show | jobs
by leoooodias 4 days ago
I believe Trainium is their line of training-oriented chips, and Inferentia their inference ones.
3 comments

It used to be this way, but then inference workloads got so memory hungry that it's all just Trainum now.
Someone more versed might expand on this, but isn't training mostly made of inference anyway? At high speed on segments of input data, and then weight adjustments come when the inference is off vs. the next token of the input data?
There is loss calculation and backpropagation during training which are heavy compute loads which do not occur during inference (which is akin to the forward pass in training neural nets). Specialized kernels are needed to calculate derivatives efficiently during training, for instance, and some hardware would have special instructions for those.
To elaborate a little more, the things you prioritize during inference (decode especially) and training are very different. Training and prefill are similar: you have big batches and therefore high arithmetic intensity (meaning you're doing lots of FLOPs). This means training/prefill are compute bound (to speed this up, you want your chip to do compute fast). Inference, however, is mostly dominated by decode (actually generating the tokens one-by-one). Because you're generating one token, your matrix multiplications are being used on basically one skinny vector, so you're not doing that many FLOPs. And for this tiny matmul you have to stream in all of the model weights AND all of the KV cache of the prior sequence, so you are bound by how much memory you can get in and out of the cores. To optimize for this speed your chip needs to be able to shuttle memory in and out of the core fast, so you prioritize bandwidth (e.g. via lots of SRAM the Cerebras way).
Why did they abandon tree-of-thoughts, or why don't they generate code in parallel (not subagents but the same model). What I mean is that you take the token stream, and split them N ways, and generate a different chunk of work on each stream, then concatenate the work once all of the work is done - this means you could use the matrix loaded into memory for multiple tokens.
They do do this! A single model pass will process many many user prompts at once in practice. This is referred to as "batching". And this does increase the effective use of compute for a model provider.
No