4 ms·
A Python Library to 6-7x the inference speed of your HF models
- MDK8888 3y agoA few months back, the PyTorch team released GPT, Fast (https://news.ycombinator.com/item?id=38477197 https://news.ycombinator.com/item?id=38477197), a collection of techniques to 10x the inference speed of Llama-2-7b. This library generalizes those techniques (quantization, torch.compile, speculative decoding) to all Huggingface models, achieving an inference speed speedup of 6-7x. As more optimization algorithms are discovered, I will post updates to the repo to HN.
- theboat 3y agodoes this work for diffusion models, e.g. stable diffusion xl?
- jurgenaut23 3y agoA quick look at the codebase seems to indicate that it doesn't. This seems very targeted at LLMs.
- mkesper 3y agoPlease add (something like) that to the Readme.
- ipsum2 3y agoPretty confusing that both the pytorch repo and yours is named gpt fast.
- bradneuberg 3y agoHas anyone tried this on OpenCLIP based models?
- behnamoh 3y agodoes anyone use transformers in production? last I checked people either use exllama2, vLLM, or llama.cpp. AFAIK llama.cpp already does speculative decoding (even batched grammar based spec. decoding!).
- daemonologist 3y agoWe use transformers in production for T5 models, which aren't supported by the usual suspects. I did a bit of poking around and might try out TensorRT or CTranslate2 at some point; for now the single GPU we have dedicated to the project has been able to keep up with incoming data, but I'll probably have to address it in the next couple of months. If anyone has suggestions for other T5 inference options I would welcome them.
- jph00 3y agovLLM uses transformers.
- iAkashPaul 3y agoIndirectly via TGI
- dmezzetti 3y agoIt's important to note that Transformers can be used for a lot more than just LLMs. There are plenty of models that can be fine-tuned to perform a single task better than LLM prompting.