Skip to content
Open
Show file tree
Hide file tree
Changes from 38 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
e1c7506
Merge pull request #945 from TransformerLensOrg/dev
bryce13950 Jun 12, 2025
a634e57
Merge pull request #952 from TransformerLensOrg/dev
bryce13950 Jun 19, 2025
50ee38b
Merge pull request #958 from TransformerLensOrg/dev
bryce13950 Jul 9, 2025
31d05dc
Add Gemma 3 270M model support
huseyincavusbi Nov 22, 2025
c3a0c00
Add Gemma 3 1B model support
huseyincavusbi Nov 22, 2025
1053738
Add Gemma 3 and MedGemma 4B multimodal model support with text-only e…
huseyincavusbi Nov 22, 2025
25c72dd
Fix device mismatch for Gemma models on MPS
huseyincavusbi Nov 22, 2025
d52e3cd
feat: Gemma 3 memory optimization and n_ctx override
huseyincavusbi Nov 24, 2025
7254877
feat: Add Gemma 3 12B and 27B model support
huseyincavusbi Nov 24, 2025
a399fc6
fix: Implement Gemma 3 hybrid local/global attention architecture (5:…
huseyincavusbi Nov 24, 2025
d47dee0
feat: Add per-layer RoPE base support for Gemma 3
huseyincavusbi Nov 24, 2025
9907176
Fix Gemma 3 head dimensions
huseyincavusbi Nov 26, 2025
94e50d6
Fix formatting issues
huseyincavusbi Nov 26, 2025
31e0cc3
Fix Colab_Compatibility notebook CI failure
huseyincavusbi Nov 26, 2025
eb2577d
Fix formatting regression (black 23.3.0)
huseyincavusbi Nov 26, 2025
127cdbd
Fix Interactive_Neuroscope CI failure (deps & notebook)
huseyincavusbi Nov 26, 2025
b4ad9bf
Add protobuf dependency to fix Main_Demo.ipynb import error
huseyincavusbi Nov 26, 2025
fc7f17d
Pin transformers to 4.46.3 to fix huggingface-hub version conflict
huseyincavusbi Nov 26, 2025
e8d4c9f
Add huggingface-hub<1.0 constraint to match transformers requirements
huseyincavusbi Nov 26, 2025
700f501
Fix CI: Force Poetry to sync dependencies with lock file
huseyincavusbi Nov 26, 2025
489efe1
Fix CI: Force huggingface-hub <1.0 for transformers compatibility
huseyincavusbi Nov 26, 2025
144fa30
Skip build-docs and deploy-docs jobs on forks
huseyincavusbi Nov 26, 2025
faa2ad9
Fix notebook-checks: Force huggingface-hub <1.0 after poetry install
huseyincavusbi Nov 26, 2025
e6531bb
Add disk cleanup to CI jobs to prevent 'No space left on device' errors
huseyincavusbi Nov 26, 2025
e2b1beb
Fix notebook-checks: Disable Poetry cache and force uninstall/reinsta…
huseyincavusbi Nov 26, 2025
10a8ccc
Fix notebook kernel to use Poetry venv
huseyincavusbi Nov 26, 2025
bbfb234
Fix huggingface-hub version conflict in notebook CI
huseyincavusbi Nov 27, 2025
e9f39ae
Move huggingface-hub fix after ipykernel install
huseyincavusbi Nov 27, 2025
b2bccfb
Skip pip installs in GitHub CI for Interactive_Neuroscope
huseyincavusbi Nov 27, 2025
59e8b23
Install gradio in GitHub CI without overriding poetry deps
huseyincavusbi Nov 27, 2025
1ce147b
Add gradio as dev dependency for notebooks
huseyincavusbi Nov 27, 2025
1e2100b
Regenerate poetry.lock after adding gradio
huseyincavusbi Nov 27, 2025
e8eb57c
Add unit tests for Gemma 3 and MedGemma model support
huseyincavusbi Dec 5, 2025
f67a5b8
fix: Remove unused imports to pass CI format check
huseyincavusbi Dec 5, 2025
6dc85be
fix: Sort imports with isort
huseyincavusbi Dec 5, 2025
0c7fba0
fix: Format code with black
huseyincavusbi Dec 5, 2025
23f6fbe
docs: Add docstrings for use_qk_norm and rotary_base_local parameters
huseyincavusbi Dec 6, 2025
d91aeab
fix: Format HookedTransformerConfig.py with black 23.x
huseyincavusbi Dec 6, 2025
f639f8f
Update demos/Interactive_Neuroscope.ipynb
huseyincavusbi Dec 9, 2025
95cc561
Update demos/Interactive_Neuroscope.ipynb
huseyincavusbi Dec 9, 2025
700135e
Revert "Update demos/Interactive_Neuroscope.ipynb"
huseyincavusbi Dec 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 68 additions & 12 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,20 @@ jobs:
- "3.9"
- "3.10"
steps:
- name: Free Disk Space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf /opt/hostedtoolcache/CodeQL
sudo docker image prune --all --force
df -h
- uses: actions/checkout@v3
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Set up Python
uses: actions/setup-python@v4
with:
Expand All @@ -69,7 +80,7 @@ jobs:
- name: Install dependencies
run: |
poetry check --lock
poetry install --with dev
poetry install --sync --with dev
- name: Authenticate HuggingFace CLI
if: env.HF_TOKEN != ''
run: |
Expand All @@ -90,9 +101,20 @@ jobs:
name: Code Checks
runs-on: ubuntu-latest
steps:
- name: Free Disk Space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf /opt/hostedtoolcache/CodeQL
sudo docker image prune --all --force
df -h
- uses: actions/checkout@v3
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Set up Python
uses: actions/setup-python@v4
with:
Expand All @@ -109,7 +131,7 @@ jobs:
- name: Install dependencies
run: |
poetry check --lock
poetry install --with dev
poetry install --sync --with dev
- name: Check format
run: make check-format
- name: Docstring test
Expand Down Expand Up @@ -139,6 +161,7 @@ jobs:
name: Notebook Checks
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
notebook:
# - "Activation_Patching_in_TL_Demo"
Expand All @@ -158,28 +181,60 @@ jobs:
- "Patchscopes_Generation_Demo"
# - "T5"
steps:
- name: Free Disk Space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf /opt/hostedtoolcache/CodeQL
sudo docker image prune --all --force
df -h
- uses: actions/checkout@v3
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: "poetry"
- name: Re-use HuggingFace models cache
uses: actions/cache/restore@v3
with:
path: ~/.cache/huggingface/hub
key: ${{ runner.os }}-huggingface-models
# NOTE: Poetry cache disabled - causes huggingface-hub version conflicts
- name: Install dependencies
run: |
poetry check --lock
poetry install --with dev,jupyter
poetry install --sync --with dev,jupyter
- name: Verify huggingface-hub version after install
run: |
VERSION=$(poetry run python -c "import huggingface_hub; print(huggingface_hub.__version__)")
echo "huggingface-hub version after poetry install: $VERSION"
- name: Install pandoc
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: pandoc
version: 1.0
- name: Register Poetry venv as Jupyter kernel
run: |
poetry run python -m ipykernel install --user --name=poetry-env
- name: Ensure correct huggingface-hub version
run: |
# Force install the exact version from poetry.lock (0.33.0)
# transformers 4.46.3 requires huggingface-hub>=0.23.2,<1.0
poetry run pip install --force-reinstall --no-deps huggingface-hub==0.33.0
- name: Verify huggingface-hub version
run: |
VERSION=$(poetry run python -c "import huggingface_hub; print(huggingface_hub.__version__)")
echo "huggingface-hub version: $VERSION"
if [[ "$VERSION" == 1.* ]]; then
echo "ERROR: huggingface-hub version 1.x detected, but <1.0 is required!"
exit 1
fi
- name: Final version check before pytest
run: |
echo "=== Environment check ==="
poetry run which python
poetry run pip show huggingface-hub | grep Version
poetry run python -c "import transformers; print('transformers OK')"
- name: Check Notebook Output Consistency
# Note: currently only checks notebooks we have specifically setup for this
run: poetry run pytest --nbval-sanitize-with demos/doc_sanitize.cfg demos/${{ matrix.notebook }}.ipynb
Expand All @@ -188,9 +243,10 @@ jobs:
build-docs:
# When running on a PR, this just checks we can build the docs without errors
# When running on merge to main, it builds the docs and then another job deploys them
# Only runs on the original repo, not forks
name: 'Build Docs'
runs-on: ubuntu-latest
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev') || contains(github.head_ref, 'docs')
if: github.repository == 'TransformerLensOrg/TransformerLens' && (github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev') || contains(github.head_ref, 'docs'))
needs: code-checks
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -233,8 +289,8 @@ jobs:
deploy-docs:
name: Deploy Docs
runs-on: ubuntu-latest
# Only run if merging a PR into main
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
# Only run if merging a PR into main on the original repo, not forks
if: github.repository == 'TransformerLensOrg/TransformerLens' && github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: build-docs
steps:
- uses: actions/checkout@v4
Expand Down
Loading
Loading