Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Report] SAE training tutorial metrics do not match linked run #276

Open
1 task done
naterush opened this issue Sep 3, 2024 · 3 comments
Open
1 task done

Comments

@naterush
Copy link
Contributor

naterush commented Sep 3, 2024

Describe the bug

Hey. Working through the training tutorial, and without any changes, I'm unable to train a basic SAE with loss numbers that are as good as linked. Not sure if this is numerical instability, or something's changed, or if my differences are actually not consequential -- so I'm opening this issue to get tot he bottom of it!

My steps:

  1. Opened the notebook in Google Colab (see notebook here)
  2. Selected an A100 GPU (for fast execution)
  3. Executed the notebook all the way through

Differences between my training run and yours

  1. My overall loss is 360, yours is 133
  2. My L0 is 160ish, yours is 80ish

There are a lot more differences - but wondering if you have thoughts on why this is. I'm new to SAE work generally, so any helpful tips here would be appreciated.

Code example

See notebook here

System Info

  1. Google Colab Pro+
  2. A100 GPU, took about 1 hour to train

Checklist

  • I have checked that there is no similar issue in the repo (required)
@naterush naterush changed the title [Bug Report] Basic training tutorial metrics do not match linked run [Bug Report] SAE training tutorial metrics do not match linked run Sep 3, 2024
@niniack
Copy link
Contributor

niniack commented Oct 2, 2024

+1, I've been toying around with the library to get results from the wandb tutorial run, as well as these runs
https://wandb.ai/jbloom/mats_sae_training_gpt2_small_resid_pre_5?nw=nwuserjbloom
but have not had success with either.

I have replicated the hyperparameters that were set in the gpt2 runs (linked above) to no avail. I suspect that later versions of the library introduced some changes which needs different hyperparameters? I don't have a good theory.

Side note: @naterush your wandb run is private, other users cannot see the results!

@Numeri
Copy link

Numeri commented Oct 3, 2024

I've also run it several times and not managed to get anything with good loss curves – it plateaus very quickly around MSE loss of 200 and L1 loss of 165.

@jbloomAus
Copy link
Owner

jbloomAus commented Oct 3, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants