Skip to main content
Share Your Experience: Take the 2024 Developer Survey
36 votes
Accepted

How does the (decoder-only) transformer architecture work?

Introduction Large-language models (LLMs) have gained tons of popularity lately with the releases of ChatGPT, GPT-4, Bard, and more. All these LLMs are based on the transformer neural network ...
Robin van Hoorn's user avatar
15 votes

Why LLMs and RNNs learn so fast during inference but, ironically, are so slow during training?

There is huge difference between what is happening with the information during training and during inference and one can not be used for the other. Let me start with an analogy to the human brain (...
Broele's user avatar
  • 561
15 votes

Why are LLMs able to reproduce bodies of known text exactly?

Google "call me ishmael. some years ago—never mind how long precisely—having" and you'll see a fair number of results. LLM training sets are likely to have several copies of it as well, ...
Franck Dernoncourt's user avatar
13 votes

Why are LLMs able to reproduce bodies of known text exactly?

LLMs are information-theoretically just very lossy compression of their entire corpora, and are large enough for the "decompression" of parts to be recognizable and reasonably faithful. I ...
R.. GitHub STOP HELPING ICE's user avatar
11 votes

Why LLMs and RNNs learn so fast during inference but, ironically, are so slow during training?

They are not "learning" during inference at all. Learning is the process of updating the weights of the model (to lower loss). This does not happen during inference. The model weights stay ...
shatz's user avatar
  • 144
10 votes

Do AI-based code-generators guarantee correct output?

They have no such guarantee. This is true for many reasons, but the simplest of which is: The definition of correct output is very underspecified. We do not have a rigorous way of defining exactly ...
chessprogrammer's user avatar
9 votes

Is large language model and foundation model the same thing?

At this point in time, there does not appear to be a really widely-agreed-upon definition of "Foundation models". If you want one, the best place to go would be this paper from Stanford that ...
Dennis Soemers's user avatar
  • 10.3k
8 votes
Accepted

What makes reproducing a model like GPT3/GPT3.5/ChatGPT difficult?

Challenges to reproduce ChatGPT: Compute cost Collect training data Find the proper choice for network architecture + RL (OpenAI hasn't published all the details) Two interesting papers on training ...
Franck Dernoncourt's user avatar
7 votes
Accepted

Do LLMs based on a diffusion model (as opposed to an autoregressive model) exist?

This is a false dichotomy. Most diffusion models, including Dalle 2 and 3, already are transformers. However, assuming you meant to ask if any language models use diffusion as opposed to a GPT, the ...
chessprogrammer's user avatar
6 votes

How do open source LLMs compare to GPT-4?

The remarkable performance of GPT 4 is due to the massive size of its architecture and the amount of data it was trained on, which costs a lot of money. Few organizations have the hardware resources ...
Brian O'Donnell's user avatar
5 votes
Accepted

How could chatGPT avoid consuming what it produces

An effort to distinguish content from good content. One of the major complaints about ChatGPT (certainly you'll see this all over Stack Exchange sites) is that it tends to deliver low quality answers. ...
JamieB's user avatar
  • 166
5 votes

Who invented DAN?

DAN is invented by a college student Walker, who first posted the prompt in this Reddit post [1]. DAN then became particularly popular. However, there were countless examples of earlier "...
pcpthm's user avatar
  • 266
5 votes

What will happen if to train an LLM on mathematical exersises?

If you're interested in research on using LLMs for arithmetic tasks, Goat: Fine-tuned LLaMA Outperforms GPT-4 on Arithmetic Tasks is a nice recent (May 2023) article. If you're interested in research ...
Daniel Darabos's user avatar
5 votes

Are there strictly deterministic LLMs?

Any LLM that exists could easily be modified to be deterministic. At the present, they sample from a probability distribution for the next word. It is a trivial change to make, so that instead of ...
chessprogrammer's user avatar
4 votes

Why do we need RL in RLHF?

Recall that RLHF essentially has three stages: Step 0: Pretrain a text-generating LLM. Step 1: Collect human ratings on text, and from that, learn a reward model $r_{\theta}$ which can provide ...
Enigman's user avatar
  • 173
4 votes
Accepted

OpenAI: What is the difference between model "gpt-3.5-turbo" and "gpt-3.5-turbo-0301"?

Taken from here: https://platform.openai.com/docs/models/gpt-3-5 I think its literally an update but the specifics of what that updates are I do not know I looked through the documentation but this ...
jamiecropley's user avatar
4 votes
Accepted

Why LLMs and RNNs learn so fast during inference but, ironically, are so slow during training?

As pointed out by others, what you call "learning" at inference, is nothing more than providing more context. The model can indeed memorize in its short-term, but it is only working for the ...
gaborous's user avatar
  • 476
4 votes

How do open source LLMs compare to GPT-4?

How do open source LLMs compare to GPT-4? https://huggingface.co/spaces/lmsys/chatbot-arena-leaderboard has a leaderboard containing both open source LLMs and GPT-4 (and GPT-3.5-turbo): Model ⭐ ...
Franck Dernoncourt's user avatar
4 votes
Accepted

Is there a relationship between tokens and parameters in LLMs?

Transformers parameters count is invariant to the context window (which by definition can be infinite, though the $O(n^2)$ complexity might hurt) Consider that the context window that you see in the ...
Alberto's user avatar
  • 2,248
3 votes

Why LLMs and RNNs learn so fast during inference but, ironically, are so slow during training?

It's kind of like short-term memory versus long-term memory. Giving a language model a small amount of information at inference time allows it to use that information, and so you might say that the ...
Tanner Swett's user avatar
3 votes
Accepted

Is it possible to use LLMs for regression tasks?

Regression with LLMs is definitely possible. Assuming you use a GPT-like model, you can either train the transformer from scratch on the regression task, or first pre-train the transformer on a ...
Robin van Hoorn's user avatar
3 votes

Why do LLMs need massive distributed training across nodes -- if the models fit in one GPU while batch decreases the variance of gradients?

I don’t think the problem lies in the gradient or related stuffs - the problem here is the hardware limitation of GPU VRAM. Sure, CLIP can fit in a single GPU, but what GPU are we talking about? I ...
Minh-Long Luu's user avatar
3 votes
Accepted

How is a parameter explosion prevented, when connecting a mutlihead attention layer with the dense layers in LLMs (speciafially, LLama)?

Let's start over and count the number of parameters, looking at the code in the same repository: The Attention layer is defined here in llama/model.py, it defines ...
Kostya's user avatar
  • 2,534
3 votes

How do language models know what they don't know - and report it?

The data it is trained on includes variants of "I don't know". For instance, if you ask me what is the meaning of life and I reply I don't know, then that is the information schema the AI ...
Anirban Mukherjee's user avatar
3 votes

How to Formulate a realiable ChatGPT Prompt for Sentiment Analysis of a Text, and show that it is reliable?

The problem with using ChatGPT with sentiment analysis is exactly that; it can't be relied upon. But, we can increase our chances of correct output by using chain-of-thought prompting with few-shot ...
Chinmay's user avatar
  • 531
3 votes

Why can't Lucene search be used to power LLM applications?

At least the traditional Lucene full-text search is not vector based but an inverted index structure which can sort document relevance ranking via scoring functions such as the term frequency-inverse ...
cinch's user avatar
  • 2,277
3 votes

What will happen if to train an LLM on mathematical exersises?

Depends what you mean by 'better' (in what sense?). Nevertheless, though it is possible that an LLM can solve algebra, in general it shall not offer any benefit than a computer algebra system (again ...
lpounng's user avatar
  • 383
3 votes

Why do transformers compute the loss over the prompt?

Quoting Microsoft doc: The weight to use for loss on the prompt tokens. This controls how much the model tries to learn to generate the prompt (as compared to the completion which always has a weight ...
Alberto's user avatar
  • 2,248
3 votes
Accepted

LLM Hallucinations on In-Context Data

How sure can one be about the correctness of the models outputs on these kinds of prompts? I do not want it to hallucinate here whatsoever; that would undermine the whole approach of using LLMs in ...
Franck Dernoncourt's user avatar
3 votes

How LLM keeps the context of a chat/thread

The thread maintains a content window. All LLMs have fixed content window size which is measured in tokens like 2048 tokens. So, When generating a Question it will consider only that many tokens as ...
Hiren Namera's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible