Recent submissions

Comment · 5 months ago
ChatGPT, request minimal necessary diff to make a specific change, review, ctrl+c, ctrl+v
Comment · 8 months ago
Good post. I think you mixed torch.eye with torch.full though
Comment · 1 year ago
This isn't suggesting no one understands how these models are architected, nor is anyone saying that SDPA / matrix multiplication isn't understood by those who create these systems.

What's being said is that the result of training and the way in which information is processed in latent space is opaque.

There are strategies to dissect a models inner workings, but this is an active field of research and incomplete.

Comment · 1 year ago
Comment · 1 year ago
Comment · 1 year ago
Comment · 2 years ago
Great project, looking forward to seeing more as this develops.

Also FYI, your mail server seems to be down.

Comment · 2 years ago
Provided a constant temperature of 1.0, you can train the model on prompts with probablistic requests, with loss determined by KL divergence.

Expectation: 80% left, 20% right

Model sampling probability: 99% left, 1% right

>>> 0.80 * math.log(0.99 / 0.80) + 0.20 * math.log(0.01 / 0.20)

-0.42867188234223175

Model sampling probability: 90% left, 10% right

>>> 0.80 * math.log(0.9 / 0.80) + 0.20 * math.log(0.1 / 0.20)

-0.04440300758688229

Of course, if you change the temperature this will break any probablistic expectations from training in this manner.

Comment · 2 years ago
Comment · 2 years ago
Very interested in the expansion of RL for transformers, but I can't quite tell what this project is.

Could you please add links to the documentation to the readme where it states "It includes detailed documentation".

Also maybe DPO should use the DDPG acronym instead so your repos Deterministic Policy Optimization isn't confused for trl's Direct Preference Optimization.

Comment · 2 years ago
A few days ago I saw a post using NeuralFlow to help explain the repetition problem.

https://old.reddit.com/r/LocalLLaMA/comments/1ap8mxh/what_ca...

> I’ve done some investigation into this. In a well trained model, if you plot the intermediate output for the last token in the sequence, you see the values update gradually layer to layer. In a model that produces repeating sequences I almost always see a sudden discontinuity at some specific layer. The residual connections are basically flooding the next layer with a distribution of values outside anything else in the dataset.

> The discontinuity is pretty classic overfitting. You’ve both trained a specific token to attend primarily to itself and also incentivized that token to be sampled more often. The result is that if that token is ever included at the end of the context the model is incentivized to repeat it again.

...

> Literally just plotting the output of the layer normalized between zero and one. For one token in mistral 7B it’s a 4096 dimension tensor. Because of the residual connections if you plot that graph for every layer you get a really nice visualization.

> Edit: Here's my visualization. It’s a simple idea but I've never personally seen it done before. AFAIK this is a somewhat novel way to look at transformer layer output.

> Initial output: https://imgur.com/sMwEFEw

> Over-fit output: https://imgur.com/a0obyUj

> Second edit: Code to generate the visualization: https://github.com/valine/NeuralFlow

This is nearly identical to the overfitting example in the repo, only really representing a binary, but it's a good start. Perhaps some transformations can be applied to help further?

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton