Live data from Hacker News

Building LLM Applications for Production

huyenchip.com

41–50 of 99 posts

Re: Building LLM Applications for Production

#41
post #22
post #19

The novelty is wearing off and the reality of parsing hundreds of TBs into hundreds of GB memory blobs you can query by the Kb is setting in.

What's interesting is that each token goes and visits all the model. Basically each token touches the synthesis of the whole human culture before being fully formed.

That depends on whether the weight matrix for the model is sparse or dense. If it's sparse, then a large swath of the path quickly becomes 0 (which could still be considered "visited", though pretty pathological).

Re: Building LLM Applications for Production

#42
post #28

For a lot of the usecases that involve summarizing some form of input data (for instance the article mentions book summaries, math walkthroughs etc), how can I trust the output to not be hallucinated? How can I reasonably judge that what it tells me is factual with respect to the input and not just made-up nonsense? This is the problem I have with the GPT models. I don't think I can trust them for anything actually i…

Underlining answer - you can't.

Useful answer - fine tune on large training set, set temperature to 0, monitor token probability and highlight risk when probability < some threshold.

Re: Building LLM Applications for Production

#43
post #40
post #21

Earlier quoted context omitted.

Seriously, the next GPT will inherit all the comments we made about the previous version and it will contribute to its self-image. It will define and see itself through our words. Maybe not so different from us, we rely on other people's opinions to form a self-image too.

I don't know if I agree with you there. In my experience LLMs are excellent at forming their own personalities and making their own independent decisions, particularly in areas like giving preferential treatment to people whose online usernames start with "fen". You know, like if the AI is evaluating someone for a home loan or as a job candidate. To me, the keen intelligence and discernment need to favor "fen"-based…

This is the true peak of posting online right now

Re: Building LLM Applications for Production

#44
post #21
post #12

I like a lot of the LLM use cases mentioned here. A couple more are: - conducting literature reviews (stay sane while researching LLMs!) - Talking to textbooks / AI teaching assistants - language learning with a companion tailored to your level and interested LLMs are so hyped and written about these days that it would be hilarious if the next version of GPT trained on todays internet would be biased towards praising…

Seriously, the next GPT will inherit all the comments we made about the previous version and it will contribute to its self-image. It will define and see itself through our words. Maybe not so different from us, we rely on other people's opinions to form a self-image too.

Currently, ChatGPT is more like a normal-distributed collection of n individuals (for a very large n), where each conversation randomly picks out one of them, and where a conversation that goes on long enough (exceeds its short term memory) drifts between them. It may take an AI to be confined to a single continuous conversation, in addition to long term memory, in order to be a singular “it”, and to form a stable self-image.

Re: Building LLM Applications for Production

#45
post #32
post #28

For a lot of the usecases that involve summarizing some form of input data (for instance the article mentions book summaries, math walkthroughs etc), how can I trust the output to not be hallucinated? How can I reasonably judge that what it tells me is factual with respect to the input and not just made-up nonsense? This is the problem I have with the GPT models. I don't think I can trust them for anything actually i…

For many use cases like summarization or information extraction, you can get deterministic and mostly non-creative results by adjusting the parameters (temperature, top-p, etc.). This is only possible via the API, though. And it work's most reliably when providing the whole input which should be worked on ("open book" as another commenter called it). I run a task like this for Hacker Jobs [1] and am quite happy with…

> ...by adjusting the parameters (temperature, top-p, etc.). This is only possible via the API, though

Not exactly true; https://platform.openai.com/playground

Re: Building LLM Applications for Production

#46
post #29
post #28

For a lot of the usecases that involve summarizing some form of input data (for instance the article mentions book summaries, math walkthroughs etc), how can I trust the output to not be hallucinated? How can I reasonably judge that what it tells me is factual with respect to the input and not just made-up nonsense? This is the problem I have with the GPT models. I don't think I can trust them for anything actually i…

In open-book mode it does not hallucinate. That only happens in closed-book mode. So if you put a piece of text in the prompt you can trust the summary will be factual. You can also use it for information extraction - text to JSON.

What are you basing this assessment on? My understanding is that it can in principle still hallucinate, though with a lower probability.

Re: Building LLM Applications for Production

#47
post #22
post #19

The novelty is wearing off and the reality of parsing hundreds of TBs into hundreds of GB memory blobs you can query by the Kb is setting in.

What's interesting is that each token goes and visits all the model. Basically each token touches the synthesis of the whole human culture before being fully formed.

It’s not only interesting but also necessary. What is language if not a compressed version of all human culture?

Re: Building LLM Applications for Production

#48
post #45
post #32

Earlier quoted context omitted.

For many use cases like summarization or information extraction, you can get deterministic and mostly non-creative results by adjusting the parameters (temperature, top-p, etc.). This is only possible via the API, though. And it work's most reliably when providing the whole input which should be worked on ("open book" as another commenter called it). I run a task like this for Hacker Jobs [1] and am quite happy with…

> ...by adjusting the parameters (temperature, top-p, etc.). This is only possible via the API, though Not exactly true; https://platform.openai.com/playground

Yes, sorry, you're right of course. I wanted to say that you need to use the more developer-oriented tooling (API, Playground) if you want to have the parameter options.

Re: Building LLM Applications for Production

#49

"You can force an LLM to give the same response by setting temperature = 0, which is, in general, a good practice." I thought this wasn't true, i.e run it enough times there is a chance the output won't be the same?

Yes, it's not truly deterministic, but setting to 0 still makes it relatively less random

Computations carried out on GPUs are hardly ever deterministic.

Things happen in parallel and as we known not even something as basic as adding up a bunch of floats is associative. Combining that with the fact that CUDA makes few guarantees about the order your operations will be carried out (at the block level) makes true deterministic behavior unachievable.

Re: Building LLM Applications for Production

#50
post #15

It's inaccurate to attribute all of these use cases to "LLMs" in general when currently only 3 or 4 of the best models can do all of them well. Especially the ones that involve writing code or highly technical instructions. It's OpenAI plus maybe one other model from another group, but just barely.

Are there any models aside from OpenAI’s that can handle large prompts with task breakdowns? I haven’t tried the Anthropic stuff, but every flavor of LLama and other open source models do not seem capable of this.

every flavor of llama up to 65b?
Post reply on HN