I was yesterday years old when I learned that those open weight models need custom code to run. Somehow I expected inference engines are generic LLM runtimes that can execute any weight. So, to get this right. Someone trains a model. They release the weights and a reference implementation of the model architecture. Then a provider has to host this model either by running inference via the reference implementation, an…
The implementation of a language model is usually good enough for running _a single forward pass_ through the model, but to host it via an inference engine you typically need to convert a few operations. For instance the MLP can be easily split across GPUs (tensor parallelism) and MoEs also have a way of parallelizing. Most of it is pretty standard, since not that many different layers and primitives are used in LLM…
OpenArch – PyTorch implementations of modern LLM architectures
11–20 of 30 posts
Re: OpenArch – PyTorch implementations of modern LLM architectures
#12Re: OpenArch – PyTorch implementations of modern LLM architectures
#13I was yesterday years old when I learned that those open weight models need custom code to run. Somehow I expected inference engines are generic LLM runtimes that can execute any weight. So, to get this right. Someone trains a model. They release the weights and a reference implementation of the model architecture. Then a provider has to host this model either by running inference via the reference implementation, an…
Most of the OSS models follow the same architecture which is Llama +- a few things, so it wasn't too hard for people to make it work.
Re: OpenArch – PyTorch implementations of modern LLM architectures
#14I was yesterday years old when I learned that those open weight models need custom code to run. Somehow I expected inference engines are generic LLM runtimes that can execute any weight. So, to get this right. Someone trains a model. They release the weights and a reference implementation of the model architecture. Then a provider has to host this model either by running inference via the reference implementation, an…
FYI Mistral at launch just dropped the weights without any model architecture mentioned. Most of the OSS models follow the same architecture which is Llama +- a few things, so it wasn't too hard for people to make it work.
Re: OpenArch – PyTorch implementations of modern LLM architectures
#15I was yesterday years old when I learned that those open weight models need custom code to run. Somehow I expected inference engines are generic LLM runtimes that can execute any weight. So, to get this right. Someone trains a model. They release the weights and a reference implementation of the model architecture. Then a provider has to host this model either by running inference via the reference implementation, an…
Re: OpenArch – PyTorch implementations of modern LLM architectures
#16I was yesterday years old when I learned that those open weight models need custom code to run. Somehow I expected inference engines are generic LLM runtimes that can execute any weight. So, to get this right. Someone trains a model. They release the weights and a reference implementation of the model architecture. Then a provider has to host this model either by running inference via the reference implementation, an…
Yes. https://inferencex.semianalysis.com provides some comparisons wrt. certain cost metrics. Some commonly used ones are vLLM, TensorRT-LLM, and SGLang. These three at least are open source, and all come with an Apache 2.0 license. Some providers also have to implement their own engines, e.g., Cerebras has their own inference serving stack for their wafer-scale chips, as does Google for their TPUs (XLA compiler).
Re: OpenArch – PyTorch implementations of modern LLM architectures
#17Had a question on the MoE: in kimmi-K2/model.py, the router does torch.topk(..., k=self.num_experts) while every other MoE uses k=self.top_k. The ctor's top_k=8 is never stored either.. Is that intentional dense routing or should that be self.top_k?
Re: OpenArch – PyTorch implementations of modern LLM architectures
#18Re: OpenArch – PyTorch implementations of modern LLM architectures
#19This is really cool! Had a question on the MoE: in kimmi-K2/model.py, the router does torch.topk(..., k=self.num_experts) while every other MoE uses k=self.top_k. The ctor's top_k=8 is never stored either.. Is that intentional dense routing or should that be self.top_k?
Re: OpenArch – PyTorch implementations of modern LLM architectures
#20One thing i am hoping can make easier understanding how architectural changes trasnlate into actual implementation and performance