News for hackers. Stuff that matters.
Re:3Blue1Brown: But what is a GPT? [video] by mvsin on Monday April 01, 2024 @05:13PM (#39899422)
Something like this does exist, production systems rarely use greedy search but have more holistic search algorithms.

An example is Beam Search:https://www.width.ai/post/what-is-beam-search

Essentially we keep a window of probabilities of predicted tokens to improve the final quality of output.

Re:3Blue1Brown: But what is a GPT? [video] by user_7832 on Monday April 01, 2024 @05:33PM (#39899643)
Thanks, that's exactly what I was looking for! Any idea if it's possible to use beam search on local models like mistral? It sounds like the choice of beam search vs say top-p or top-k should be in the software and not embedded, right?
Re:3Blue1Brown: But what is a GPT? [video] by activatedgeek on Monday April 01, 2024 @06:20PM (#39900079)
If you use HuggingFace models, then a few simpler decoding algorithms are already implemented for `generate` method of all supported models.

Here is a blog post that describes it: https://huggingface.co/blog/how-to-generate.

I will warn you though that beam search is typically what you do NOT want. Beam search approximately optimizes for the "highest likely sequence at the token level." This is rarely what you need in practice with open-ended generations (e.g. a question-answering chat bot). In practice, you need "highest likely semantic sequence," which is much harder problem.

Of course, various approximations for semantic alignment are currently in the literature, but still a wide open problem.

Re:3Blue1Brown: But what is a GPT? [video] by yunohn on Monday April 01, 2024 @05:55PM (#39899848)
This is actually a great question for which I found an interesting attempt: https://andys.page/posts/llm_sampling_strategies/

(No affiliation)

Re:3Blue1Brown: But what is a GPT? [video] by qeternity on Monday April 01, 2024 @10:12PM (#39901677)
> production systems rarely use greedy search

I have no idea why you say this. Most of our pipelines will run greedy, for reproducibility.

Maybe we turn the temp up if we are returning conversational text back to a user.