News for hackers. Stuff that matters.
Re:A Python Library to 6-7x the inference speed of your HF m... by bradneuberg on Thursday February 22, 2024 @12:21AM (#39463530)
Has anyone tried this on OpenCLIP based models?
Re:A Python Library to 6-7x the inference speed of your HF m... by MDK8888 on Wednesday February 21, 2024 @10:39PM (#39462948)
A few months back, the PyTorch team released GPT, Fast (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.

Re:A Python Library to 6-7x the inference speed of your HF m... by ipsum2 on Thursday February 22, 2024 @12:40AM (#39463623)
Pretty confusing that both the pytorch repo and yours is named gpt fast.
Re:A Python Library to 6-7x the inference speed of your HF m... by theboat on Thursday February 22, 2024 @12:19AM (#39463517)
does this work for diffusion models, e.g. stable diffusion xl?
Re:A Python Library to 6-7x the inference speed of your HF m... by jurgenaut23 on Thursday February 22, 2024 @12:26AM (#39463569)
A quick look at the codebase seems to indicate that it doesn't. This seems very targeted at LLMs.
Re:A Python Library to 6-7x the inference speed of your HF m... by mkesper on Thursday February 22, 2024 @01:02AM (#39463717)
Please add (something like) that to the Readme.
Re:A Python Library to 6-7x the inference speed of your HF m... by codethief on Thursday February 22, 2024 @04:39AM (#39465036)
+ setup instructions please :)
Re:A Python Library to 6-7x the inference speed of your HF m... by MDK8888 on Thursday February 22, 2024 @10:16PM (#39476531)
Hey, hope you're doing well! I've updated the repo with instructions on how to get started and documentation!
Re:A Python Library to 6-7x the inference speed of your HF m... by codethief on Saturday February 24, 2024 @07:08PM (#39496315)
Thanks, I'll have a look!
Re:A Python Library to 6-7x the inference speed of your HF m... by MDK8888 on Thursday February 22, 2024 @10:17PM (#39476534)
This has been added to the Readme under the 'Background' section.
Re:A Python Library to 6-7x the inference speed of your HF m... by behnamoh on Thursday February 22, 2024 @12:28AM (#39463578)
does 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!).
Re:A Python Library to 6-7x the inference speed of your HF m... by daemonologist on Thursday February 22, 2024 @01:19AM (#39463798)
We 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.

Re:A Python Library to 6-7x the inference speed of your HF m... by iAkashPaul on Thursday February 22, 2024 @04:03AM (#39464796)
Indirectly via TGI
Re:A Python Library to 6-7x the inference speed of your HF m... by jph00 on Thursday February 22, 2024 @03:36AM (#39464660)
vLLM uses transformers.
Re:A Python Library to 6-7x the inference speed of your HF m... by dmezzetti on Thursday February 22, 2024 @05:13AM (#39465221)
It'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.