Skip to content

Commit 83475c8

Browse files
authored
Merge pull request #134 from stanfordnlp/zen/notebook_update
[Minor] fix undefined var
2 parents 8db2ecc + 0bef57b commit 83475c8

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

examples/memorisation/reft_power.ipynb

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"cells": [
33
{
44
"cell_type": "code",
5-
"execution_count": 1,
5+
"execution_count": 2,
66
"id": "aafcbe5b-b1bb-42c5-930c-98129462e989",
77
"metadata": {},
88
"outputs": [
@@ -62,14 +62,14 @@
6262
},
6363
{
6464
"cell_type": "code",
65-
"execution_count": 2,
65+
"execution_count": 3,
6666
"id": "ccf7e8dd-430c-4db8-93c5-fe61e7060fe2",
6767
"metadata": {},
6868
"outputs": [
6969
{
7070
"data": {
7171
"application/vnd.jupyter.widget-view+json": {
72-
"model_id": "a36c95ab54ba4ebe8c2396774d0105c3",
72+
"model_id": "4504ae2458ac456580779d04facc6443",
7373
"version_major": 2,
7474
"version_minor": 0
7575
},
@@ -83,7 +83,7 @@
8383
{
8484
"data": {
8585
"application/vnd.jupyter.widget-view+json": {
86-
"model_id": "fd8f3346be10479b949a15ef0e968000",
86+
"model_id": "9062747a2a6c4652a028d627b130bb4c",
8787
"version_major": 2,
8888
"version_minor": 0
8989
},
@@ -898,7 +898,7 @@
898898
},
899899
{
900900
"cell_type": "code",
901-
"execution_count": 3,
901+
"execution_count": 4,
902902
"id": "9fddf0de-d8fc-4062-b420-3b56eac1912f",
903903
"metadata": {},
904904
"outputs": [],
@@ -916,8 +916,8 @@
916916
"metadata": {},
917917
"outputs": [],
918918
"source": [
919-
"for model_max_length in [128, 256, 512, 1024]:\n",
920-
" for TARGET_LAYER in [0, 5, 10, 15, 20, 25, 31]:\n",
919+
"for max_pair in [256]:\n",
920+
" for TARGET_LAYER in [20]:\n",
921921
" print(\"analyzing:\", (max_pair, TARGET_LAYER))\n",
922922
" # generate access id to token mapping\n",
923923
" alice_vocab_sampled = random.sample(list(alice_vocab), k=max_pair)\n",
@@ -968,9 +968,9 @@
968968
" match_perc = round(correct_count/max_pair, 2)\n",
969969
" results.append([max_pair, TARGET_LAYER, match_perc])\n",
970970
" print(match_perc)\n",
971-
"FILE_PATH = './memo_multitude_7B.json'\n",
972-
"with open(FILE_PATH, 'w') as output_file:\n",
973-
"\tjson.dump(results, output_file, indent=2)"
971+
"# FILE_PATH = './memo_multitude_7B.json'\n",
972+
"# with open(FILE_PATH, 'w') as output_file:\n",
973+
"# \tjson.dump(results, output_file, indent=2)"
974974
]
975975
},
976976
{

0 commit comments

Comments
 (0)