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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ jobs:
poetry check --lock
poetry install --with dev
- name: Authenticate HuggingFace CLI
if: env.HF_TOKEN != ''
run: |
pip install huggingface_hub
huggingface-cli login --token "$HF_TOKEN"
Expand Down Expand Up @@ -116,6 +117,7 @@ jobs:
- name: Type check
run: poetry run mypy .
- name: Authenticate HuggingFace CLI
if: env.HF_TOKEN != ''
run: |
pip install huggingface_hub
huggingface-cli login --token "$HF_TOKEN"
Expand Down Expand Up @@ -212,6 +214,7 @@ jobs:
name: test-coverage
path: docs/source/_static/coverage
- name: Authenticate HuggingFace CLI
if: env.HF_TOKEN != ''
run: |
pip install huggingface_hub
huggingface-cli login --token "$HF_TOKEN"
Expand Down
36 changes: 20 additions & 16 deletions demos/Colab_Compatibility.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 3,
"metadata": {},
"outputs": [
{
Expand All @@ -16,9 +16,9 @@
"name": "stderr",
"output_type": "stream",
"text": [
"/var/folders/pr/77j77_bs2gl2stxyrvr14x3c0000gn/T/ipykernel_60991/3507779555.py:18: DeprecationWarning: `magic(...)` is deprecated since IPython 0.13 (warning added in 8.1), use run_line_magic(magic_name, parameter_s).\n",
"/var/folders/m3/z6c6rcdj1rbb2jh9vqpgvxg40000gn/T/ipykernel_86391/3507779555.py:18: DeprecationWarning: `magic(...)` is deprecated since IPython 0.13 (warning added in 8.1), use run_line_magic(magic_name, parameter_s).\n",
" ipython.magic(\"load_ext autoreload\")\n",
"/var/folders/pr/77j77_bs2gl2stxyrvr14x3c0000gn/T/ipykernel_60991/3507779555.py:19: DeprecationWarning: `magic(...)` is deprecated since IPython 0.13 (warning added in 8.1), use run_line_magic(magic_name, parameter_s).\n",
"/var/folders/m3/z6c6rcdj1rbb2jh9vqpgvxg40000gn/T/ipykernel_86391/3507779555.py:19: DeprecationWarning: `magic(...)` is deprecated since IPython 0.13 (warning added in 8.1), use run_line_magic(magic_name, parameter_s).\n",
" ipython.magic(\"autoreload 2\")\n"
]
}
Expand Down Expand Up @@ -58,20 +58,19 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"TransformerLens currently supports 211 models out of the box.\n"
"TransformerLens currently supports 216 models out of the box.\n"
]
}
],
"source": [
"import torch\n",
"\n",
"from transformer_lens import HookedTransformer, HookedEncoderDecoder, HookedEncoder, BertNextSentencePrediction, loading\n",
"from transformers import AutoTokenizer, LlamaForCausalLM, LlamaTokenizer\n",
"from typing import List\n",
Expand All @@ -89,7 +88,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -199,7 +198,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -289,6 +288,8 @@
" \"Qwen/Qwen2.5-0.5B-Instruct\",\n",
" \"Qwen/Qwen2.5-1.5B\",\n",
" \"Qwen/Qwen2.5-1.5B-Instruct\",\n",
" \"Qwen/Qwen3-0.6B\",\n",
" \"Qwen/Qwen3-1.7B\",\n",
" \"roneneldan/TinyStories-1Layer-21M\",\n",
" \"roneneldan/TinyStories-1M\",\n",
" \"roneneldan/TinyStories-28M\",\n",
Expand Down Expand Up @@ -323,7 +324,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -378,6 +379,8 @@
" \"Qwen/Qwen2.5-3B-Instruct\",\n",
" \"Qwen/Qwen2.5-7B\",\n",
" \"Qwen/Qwen2.5-7B-Instruct\",\n",
" \"Qwen/Qwen3-4B\",\n",
" \"Qwen/Qwen3-8B\",\n",
" \"stabilityai/stablelm-base-alpha-3b\",\n",
" \"stabilityai/stablelm-base-alpha-7b\",\n",
" \"stabilityai/stablelm-tuned-alpha-3b\",\n",
Expand All @@ -392,7 +395,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -425,7 +428,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -448,6 +451,7 @@
" \"Qwen/Qwen2.5-32B-Instruct\",\n",
" \"Qwen/Qwen2.5-72B\",\n",
" \"Qwen/Qwen2.5-72B-Instruct\",\n",
" \"Qwen/Qwen3-14B\",\n",
" \"Qwen/QwQ-32B-Preview\",\n",
"]\n",
"\n",
Expand All @@ -456,7 +460,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 10,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -478,7 +482,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 11,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -496,7 +500,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 12,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -516,7 +520,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -527,7 +531,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 14,
"metadata": {},
"outputs": [
{
Expand Down
1 change: 1 addition & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
# https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#confval-autodoc_default_options
autodoc_default_options = {
"exclude-members": ", ".join(functions_to_ignore),
"special-members": "__getitem__, __len__, __iter__",
}


Expand Down
Loading