Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: documentation
path: docs/_build/html/
path: docs/build/html/
8 changes: 4 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ jobs:
pip install "black==25.9.0" isort flake8 mypy ruff

- name: Run black (code formatting)
run: black --check --diff src/alignment/ tests/ scripts/
run: black --check --diff src/nodelens/ tests/ scripts/

- name: Run isort (import sorting)
run: isort --check-only --diff --profile black src/alignment/ tests/ scripts/
run: isort --check-only --diff --profile black src/nodelens/ tests/ scripts/

- name: Run flake8 (linting)
run: flake8 src/alignment/ tests/ scripts/ --max-line-length=100 --ignore=E203,W503 || echo "Flake8 has warnings"
run: flake8 src/nodelens/ tests/ scripts/ --max-line-length=100 --ignore=E203,W503 || echo "Flake8 has warnings"

- name: Run mypy (type checking)
run: mypy src/alignment/ --ignore-missing-imports --no-strict-optional || echo "Type checking has warnings"
run: mypy src/nodelens/ --ignore-missing-imports --no-strict-optional || echo "Type checking has warnings"
27 changes: 18 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
tags:
- 'v*'

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest
Expand All @@ -13,7 +16,7 @@ jobs:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10'

Expand All @@ -28,20 +31,26 @@ jobs:
- name: Check package
run: twine check dist/*

- name: Upload to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: twine upload dist/*

- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
files: dist/*
body: |
## Installation
Public research-code release for NodeLens.

The Python package is imported as `nodelens`.

## Install From Source

```bash
pip install alignment-framework
git clone https://github.com/KempnerInstitute/nodelens.git
cd nodelens
pip install -e .
```

## Supernodes And SCAR Artifacts

Derived artifacts are available at:
https://huggingface.co/datasets/hsafaai/supernodes-scar-artifacts
draft: false
prerelease: false
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ jobs:

- name: Run tests
run: |
pytest tests/ -v --cov=src/alignment --cov-report=xml --cov-report=html --cov-report=term-missing --tb=short -ra
pytest tests/ -v --cov=src/nodelens --cov-report=xml --cov-report=html --cov-report=term-missing --tb=short -ra

- name: Check coverage threshold
run: |
coverage report --fail-under=25
python -m coverage report --fail-under=20

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
Expand Down
29 changes: 29 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
cff-version: 1.2.0
message: "If you use this code or the Supernodes and SCAR artifacts, please cite the paper and archived release."
title: "NodeLens"
version: "0.2.0"
repository-code: "https://github.com/KempnerInstitute/nodelens"
url: "https://github.com/KempnerInstitute/nodelens"
license: "MIT"
authors:
- family-names: "Cherilyn"
given-names: "Audrey"
affiliation: "Kempner Institute at Harvard University"
- family-names: "Safaai"
given-names: "Houman"
affiliation: "Kempner Institute at Harvard University"
preferred-citation:
type: article
title: "Supernodes and Halos: Loss-Critical Hubs in LLM Feed-Forward Layers"
authors:
- family-names: "Cherilyn"
given-names: "Audrey"
affiliation: "Kempner Institute at Harvard University"
- family-names: "Safaai"
given-names: "Houman"
affiliation: "Kempner Institute at Harvard University"
year: 2026
url: "https://github.com/KempnerInstitute/nodelens"
identifiers:
- type: url
value: "https://huggingface.co/datasets/hsafaai/supernodes-scar-artifacts"
Loading
Loading