Skip to content

Conversation

rufimelo99
Copy link
Contributor

@rufimelo99 rufimelo99 commented May 22, 2025

Description

Hey ✋

I've been starting to look into the library and dive into it. I'm currently looking into the evaluation metrics, and I've noticed the KL divergence is being calculated manually, which sometimes leads to "nans" and "infs".
This ends up being a simple PR.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • New and existing tests pass locally with my changes

You have tested formatting, typing and tests

  • I have run make check-ci to check format and linting. (you can run make format to format code if needed.)

Please links to wandb dashboards with a control and test group.

@rufimelo99 rufimelo99 marked this pull request as ready for review May 22, 2025 00:48
@rufimelo99 rufimelo99 changed the title Update evals.py Stable KL in evals.py May 22, 2025
@rufimelo99 rufimelo99 changed the title Stable KL in evals.py Stable Kullback-Leibler in evals.py May 22, 2025
* fix: fix abnormally large llamascope L0. (jbloomAus#483)

* make llamascope (base model) compatible with sae.fold_activation_norm_scaling_factor

* make llamascope (base model) compatible with sae.fold_activation_norm_scaling_factor

* 5.10.3

Automatically generated by python-semantic-release

* chore: Remove unused files (jbloomAus#481)

* removes make_hf_repo.sh

* removes eval_metrics_resid_mid_oai.csv

* removes check_open_ai_sae_metrics.ipynb

* removes content dir

* removes unused files in docs dir

* wip

* yes

* renaming into singular_fisher

* fmt

* removing breakpoint

* generalisation

* removing debug log

* Update training_sae.py

---------

Co-authored-by: Zhengfu He <74953051+Hzfinfdu@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Anthony Duong <42191920+anthonyduong9@users.noreply.github.com>
@hijohnnylin
Copy link
Collaborator

@rufimelo99 Hey there! Thanks for the PR. It looks like there are other changes in this (a PR for fisherSAE) - did you intend for that to be in this change?

@rufimelo99
Copy link
Contributor Author

Thank you for pointing this out.
I did not look into this PR for quite a while and was doing some ideation in a personal project that got committed to my main branch.

Please refer to #532, where I've isolated the intended PR changes.
I will close this PR as a result.

@rufimelo99 rufimelo99 closed this Aug 24, 2025
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

Successfully merging this pull request may close these issues.

2 participants