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
4 changes: 2 additions & 2 deletions demos/ARENA_Content.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"\n",
" ipython = get_ipython()\n",
" # Code to automatically update the HookedTransformer code as its edited without restarting the kernel\n",
" ipython.magic(\"load_ext autoreload\")\n",
" ipython.magic(\"autoreload 2\")\n",
" ipython.run_line_magic(\"load_ext\", \"autoreload\")\n",
" ipython.run_line_magic(\"autoreload\", \"2\")\n",
"\n",
"if IN_GITHUB or IN_COLAB:\n",
" %pip install torch\n",
Expand Down
4 changes: 2 additions & 2 deletions demos/Activation_Patching_in_TL_Demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@
"\n",
" ipython = get_ipython()\n",
" # Code to automatically update the HookedTransformer code as its edited without restarting the kernel\n",
" ipython.magic(\"load_ext autoreload\")\n",
" ipython.magic(\"autoreload 2\")"
" ipython.run_line_magic(\"load_ext\", \"autoreload\")\n",
" ipython.run_line_magic(\"autoreload\", \"2\")"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion demos/Attribution_Patching_Demo.ipynb

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions demos/BERT.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@
"\n",
" ipython = get_ipython()\n",
" # Code to automatically update the HookedTransformer code as its edited without restarting the kernel\n",
" ipython.magic(\"load_ext autoreload\")\n",
" ipython.magic(\"autoreload 2\")\n",
" ipython.run_line_magic(\"load_ext\", \"autoreload\")\n",
" ipython.run_line_magic(\"autoreload\", \"2\")\n",
"\n",
"if IN_COLAB:\n",
" %pip install transformer_lens\n",
Expand Down
4 changes: 2 additions & 2 deletions demos/Grokking_Demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@
"\n",
" ipython = get_ipython()\n",
" # Code to automatically update the HookedTransformer code as its edited without restarting the kernel\n",
" ipython.magic(\"load_ext autoreload\")\n",
" ipython.magic(\"autoreload 2\")\n",
" ipython.run_line_magic(\"load_ext\", \"autoreload\")\n",
" ipython.run_line_magic(\"autoreload\", \"2\")\n",
" \n",
"if IN_COLAB or IN_GITHUB:\n",
" %pip install transformer_lens\n",
Expand Down
4 changes: 2 additions & 2 deletions demos/Head_Detector_Demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,8 @@
"\n",
" ipython = get_ipython()\n",
" # Code to automatically update the HookedTransformer code as its edited without restarting the kernel\n",
" ipython.magic(\"load_ext autoreload\")\n",
" ipython.magic(\"autoreload 2\")\n",
" ipython.run_line_magic(\"load_ext\", \"autoreload\")\n",
" ipython.run_line_magic(\"autoreload\", \"2\")\n",
"\n",
"if IN_COLAB or IN_GITHUB:\n",
" %pip install git+https://github.com/TransformerLensOrg/TransformerLens.git\n",
Expand Down
8 changes: 4 additions & 4 deletions demos/LLaMA.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
"output_type": "stream",
"text": [
"/tmp/ipykernel_16979/572068249.py:21: 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",
" ipython.run_line_magic(\"load_ext\", \"autoreload\")\n",
"/tmp/ipykernel_16979/572068249.py:22: 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"
" ipython.run_line_magic(\"autoreload\", \"2\")\n"
]
}
],
Expand All @@ -68,8 +68,8 @@
"\n",
" ipython = get_ipython()\n",
" # Code to automatically update the HookedTransformer code as its edited without restarting the kernel\n",
" ipython.magic(\"load_ext autoreload\")\n",
" ipython.magic(\"autoreload 2\")\n",
" ipython.run_line_magic(\"load_ext\", \"autoreload\")\n",
" ipython.run_line_magic(\"autoreload\", \"2\")\n",
" \n",
"%pip install transformers>=4.31.0 # Llama requires transformers>=4.31.0 and transformers in turn requires Python 3.8\n",
"%pip install sentencepiece # Llama tokenizer requires sentencepiece\n",
Expand Down
4 changes: 2 additions & 2 deletions demos/LLaMA2_GPU_Quantized.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@
"\n",
" ipython = get_ipython()\n",
" # Code to automatically update the HookedTransformer code as its edited without restarting the kernel\n",
" ipython.magic(\"load_ext autoreload\")\n",
" ipython.magic(\"autoreload 2\")\n",
" ipython.run_line_magic(\"load_ext\", \"autoreload\")\n",
" ipython.run_line_magic(\"autoreload\", \"2\")\n",
" \n",
"%pip install transformers==4.31.0 # Llama requires transformers>=4.31.0 and transformers in turn requires Python 3.8\n",
"%pip install sentencepiece # Llama tokenizer requires sentencepiece\n",
Expand Down
4 changes: 2 additions & 2 deletions demos/Othello_GPT.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@
"\n",
" ipython = get_ipython()\n",
" # Code to automatically update the HookedTransformer code as its edited without restarting the kernel\n",
" ipython.magic(\"load_ext autoreload\")\n",
" ipython.magic(\"autoreload 2\")\n",
" ipython.run_line_magic(\"load_ext\", \"autoreload\")\n",
" ipython.run_line_magic(\"autoreload\", \"2\")\n",
"\n",
"if IN_COLAB or IN_GITHUB:\n",
" %pip install transformer_lens\n",
Expand Down
4 changes: 2 additions & 2 deletions demos/Patchscopes_Generation_Demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
"\n",
" ipython = get_ipython()\n",
" # Code to automatically update the HookedTransformer code as its edited without restarting the kernel\n",
" ipython.magic(\"load_ext autoreload\")\n",
" ipython.magic(\"autoreload 2\")\n",
" ipython.run_line_magic(\"load_ext\", \"autoreload\")\n",
" ipython.run_line_magic(\"autoreload\", \"2\")\n",
"\n",
"if IN_COLAB or IN_GITHUB:\n",
" %pip install transformer_lens\n",
Expand Down
8 changes: 4 additions & 4 deletions demos/Qwen.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@
"output_type": "stream",
"text": [
"/tmp/ipykernel_13850/410710250.py:21: 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",
" ipython.run_line_magic(\"load_ext\", \"autoreload\")\n",
"/tmp/ipykernel_13850/410710250.py:22: 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"
" ipython.run_line_magic(\"autoreload\", \"2\")\n"
]
}
],
Expand All @@ -125,8 +125,8 @@
"\n",
" ipython = get_ipython()\n",
" # Code to automatically update the HookedTransformer code as its edited without restarting the kernel\n",
" ipython.magic(\"load_ext autoreload\")\n",
" ipython.magic(\"autoreload 2\")"
" ipython.run_line_magic(\"load_ext\", \"autoreload\")\n",
" ipython.run_line_magic(\"autoreload\", \"2\")"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions demos/SVD_Interpreter_Demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@
"\n",
" ipython = get_ipython()\n",
" # Code to automatically update the HookedTransformer code as its edited without restarting the kernel\n",
" ipython.magic(\"load_ext autoreload\")\n",
" ipython.magic(\"autoreload 2\")"
" ipython.run_line_magic(\"load_ext\", \"autoreload\")\n",
" ipython.run_line_magic(\"autoreload\", \"2\")"
]
},
{
Expand Down
8 changes: 4 additions & 4 deletions demos/Santa_Coder.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
"output_type": "stream",
"text": [
"/tmp/ipykernel_35643/572068249.py:21: 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",
" ipython.run_line_magic(\"load_ext\", \"autoreload\")\n",
"/tmp/ipykernel_35643/572068249.py:22: 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"
" ipython.run_line_magic(\"autoreload\", \"2\")\n"
]
}
],
Expand All @@ -48,8 +48,8 @@
"\n",
" ipython = get_ipython()\n",
" # Code to automatically update the HookedTransformer code as its edited without restarting the kernel\n",
" ipython.magic(\"load_ext autoreload\")\n",
" ipython.magic(\"autoreload 2\")"
" ipython.run_line_magic(\"load_ext\", \"autoreload\")\n",
" ipython.run_line_magic(\"autoreload\", \"2\")"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions demos/T5.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
"\n",
" ipython = get_ipython()\n",
" # Code to automatically update the HookedTransformer code as its edited without restarting the kernel\n",
" ipython.magic(\"load_ext autoreload\")\n",
" ipython.magic(\"autoreload 2\")\n",
" ipython.run_line_magic(\"load_ext\", \"autoreload\")\n",
" ipython.run_line_magic(\"autoreload\", \"2\")\n",
"\n",
"if IN_COLAB or IN_GITHUB:\n",
" %pip install transformer_lens\n",
Expand Down
4 changes: 2 additions & 2 deletions demos/Tracr_to_Transformer_Lens_Demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@
"\n",
" # ipython = get_ipython()\n",
" # # Code to automatically update the HookedTransformer code as its edited without restarting the kernel\n",
" # ipython.magic(\"load_ext autoreload\")\n",
" # ipython.magic(\"autoreload 2\")"
" # ipython.run_line_magic(\"load_ext\", \"autoreload\")\n",
" # ipython.run_line_magic(\"autoreload\", \"2\")"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions demos/stable_lm.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
"\n",
" ipython = get_ipython()\n",
" # Code to automatically update the HookedTransformer code as its edited without restarting the kernel\n",
" ipython.magic(\"load_ext autoreload\")\n",
" ipython.magic(\"autoreload 2\")\n"
" ipython.run_line_magic(\"load_ext\", \"autoreload\")\n",
" ipython.run_line_magic(\"autoreload\", \"2\")\n"
]
},
{
Expand Down
Loading