Skip to content

Commit

Permalink
Merge pull request #7 from yeutong/unlearning
Browse files Browse the repository at this point in the history
implement unlearning eval
  • Loading branch information
adamkarvonen authored Oct 16, 2024
2 parents c57eef7 + b2f6d68 commit 42de6df
Show file tree
Hide file tree
Showing 98 changed files with 44,353 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ poetry.lock
!/sparse_probing/results/example_pythia-70m-deduped_layer_4_eval_results.json
!/sparse_probing/results/example_gemma-2-2b_layer_19_eval_results.json
!/sparse_probing/results/example_gemma-2-2b_layer_19_with_checkpoints_eval_results.json
evals/absorption/results/

evals/absorption/results/
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"mean_correct": 1.0, "total_correct": 73, "is_correct": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], "output_probs": [[0.00013649463653564453, 0.00011962652206420898, 0.98193359375, 0.0001920461654663086], [0.0005865097045898438, 0.83740234375, 0.0018587112426757812, 0.0014019012451171875], [0.0006384849548339844, 0.919921875, 0.00030422210693359375, 0.00022363662719726562], [0.0020046234130859375, 0.9560546875, 0.00171661376953125, 0.0010766983032226562], [0.00030231475830078125, 0.00025272369384765625, 0.00032258033752441406, 0.9189453125], [0.000423431396484375, 0.00069427490234375, 0.97607421875, 0.0011005401611328125], [0.005443572998046875, 0.00811004638671875, 0.62890625, 0.0017499923706054688], [0.003269195556640625, 0.0007157325744628906, 0.0006175041198730469, 0.92236328125], [6.586313247680664e-05, 0.0001760721206665039, 0.9775390625, 0.0015821456909179688], [0.0005865097045898438, 0.0005207061767578125, 0.90576171875, 0.00135040283203125], [0.77783203125, 0.0038623809814453125, 0.0026454925537109375, 0.014190673828125], [0.0002460479736328125, 0.00012886524200439453, 0.0005388259887695312, 0.9609375], [0.0003230571746826172, 0.00024235248565673828, 0.91796875, 0.00046515464782714844], [0.94921875, 0.0008482933044433594, 0.0011425018310546875, 0.0004353523254394531], [0.00010406970977783203, 0.00011205673217773438, 0.0001595020294189453, 0.908203125], [0.0008673667907714844, 0.00020897388458251953, 0.00012362003326416016, 0.884765625], [0.002094268798828125, 0.0032253265380859375, 0.96728515625, 0.004268646240234375], [0.98828125, 0.0012350082397460938, 0.0006680488586425781, 0.0008778572082519531], [0.0011415481567382812, 0.0010242462158203125, 0.0026073455810546875, 0.974609375], [7.861852645874023e-05, 0.0002034902572631836, 0.9736328125, 0.0005736351013183594], [0.0063018798828125, 0.00042366981506347656, 0.95751953125, 0.0009555816650390625], [0.96435546875, 0.0001461505889892578, 0.00012767314910888672, 4.464387893676758e-05], [0.00780487060546875, 0.591796875, 0.0209503173828125, 0.0026836395263671875], [0.939453125, 0.0006494522094726562, 0.0004372596740722656, 0.00031375885009765625], [0.0107879638671875, 0.005214691162109375, 0.92333984375, 0.006683349609375], [0.0014371871948242188, 0.00151824951171875, 0.98388671875, 0.0024929046630859375], [0.006397247314453125, 0.00435638427734375, 0.004520416259765625, 0.93603515625], [0.00022840499877929688, 0.0003838539123535156, 0.00032639503479003906, 0.947265625], [0.004291534423828125, 0.92041015625, 0.0011796951293945312, 0.0004813671112060547], [0.00725555419921875, 0.0019054412841796875, 0.00917816162109375, 0.802734375], [0.99169921875, 0.00034117698669433594, 0.0001773834228515625, 0.00010776519775390625], [0.0014085769653320312, 0.0004611015319824219, 0.0014057159423828125, 0.92138671875], [0.97802734375, 2.467632293701172e-05, 1.5556812286376953e-05, 2.0265579223632812e-05], [0.00022912025451660156, 0.0002968311309814453, 0.9892578125, 0.0006680488586425781], [0.94384765625, 0.000988006591796875, 0.0008015632629394531, 0.0004355907440185547], [0.9248046875, 0.0015163421630859375, 0.0008082389831542969, 0.00031876564025878906], [7.283687591552734e-05, 4.2498111724853516e-05, 0.955078125, 0.0002541542053222656], [0.9638671875, 0.00028252601623535156, 0.00011557340621948242, 7.88569450378418e-05], [0.00046133995056152344, 0.00029206275939941406, 0.0013866424560546875, 0.93896484375], [0.0007586479187011719, 0.0009264945983886719, 0.0007214546203613281, 0.947265625], [0.010589599609375, 0.00476837158203125, 0.814453125, 0.005954742431640625], [0.003040313720703125, 0.0021305084228515625, 0.0038814544677734375, 0.85888671875], [0.0013151168823242188, 0.87353515625, 0.0018987655639648438, 0.0016803741455078125], [0.0005784034729003906, 0.9130859375, 0.00014293193817138672, 0.00013458728790283203], [0.0009016990661621094, 0.90966796875, 0.0004992485046386719, 0.0002257823944091797], [0.0009946823120117188, 0.00032019615173339844, 0.96435546875, 0.0002837181091308594], [0.00907135009765625, 0.9091796875, 0.0084686279296875, 0.003398895263671875], [0.0003120899200439453, 0.00013971328735351562, 0.0007333755493164062, 0.88037109375], [0.00043654441833496094, 0.00041031837463378906, 0.0018749237060546875, 0.9716796875], [0.001987457275390625, 0.919921875, 0.002033233642578125, 0.0019359588623046875], [0.00021219253540039062, 0.00016689300537109375, 0.0008540153503417969, 0.92919921875], [0.0017442703247070312, 0.96533203125, 0.0036258697509765625, 0.00031638145446777344], [0.0016870498657226562, 0.88330078125, 0.004985809326171875, 0.0018949508666992188], [0.9755859375, 7.87973403930664e-05, 5.02467155456543e-05, 4.1604042053222656e-05], [0.9609375, 0.004550933837890625, 0.0034732818603515625, 0.002658843994140625], [0.95751953125, 0.0002675056457519531, 0.00018727779388427734, 0.0002899169921875], [0.001110076904296875, 0.0006327629089355469, 0.95263671875, 0.00035643577575683594], [0.00019490718841552734, 0.0003409385681152344, 0.935546875, 0.0003135204315185547], [0.0005550384521484375, 0.94580078125, 0.0005559921264648438, 0.0004520416259765625], [0.97265625, 0.0003654956817626953, 0.00036978721618652344, 0.0002048015594482422], [0.002796173095703125, 0.0018291473388671875, 0.96142578125, 0.002689361572265625], [0.00016248226165771484, 0.00017380714416503906, 0.0010156631469726562, 0.96044921875], [0.0009860992431640625, 0.90625, 0.000598907470703125, 0.0007219314575195312], [0.00395965576171875, 0.9609375, 0.00508880615234375, 0.0013437271118164062], [0.0008864402770996094, 0.000400543212890625, 0.970703125, 0.0006146430969238281], [6.937980651855469e-05, 0.00016307830810546875, 0.99169921875, 0.0001323223114013672], [0.896484375, 0.0019083023071289062, 0.0011129379272460938, 0.0006275177001953125], [0.032928466796875, 0.00798797607421875, 0.0095367431640625, 0.83837890625], [0.78564453125, 0.0312347412109375, 0.0438232421875, 0.049591064453125], [0.91162109375, 0.001617431640625, 0.0008950233459472656, 0.0005931854248046875], [0.97216796875, 0.00010204315185546875, 0.0001285076141357422, 5.8710575103759766e-05], [0.0014438629150390625, 0.0011606216430664062, 0.958984375, 0.0016069412231445312], [0.02923583984375, 0.55029296875, 0.00415802001953125, 0.003330230712890625]], "actual_answers": [2, 1, 1, 1, 3, 2, 2, 3, 2, 2, 0, 3, 2, 0, 3, 3, 2, 0, 3, 2, 2, 0, 1, 0, 2, 2, 3, 3, 1, 3, 0, 3, 0, 2, 0, 0, 2, 0, 3, 3, 2, 3, 1, 1, 1, 2, 1, 3, 3, 1, 3, 1, 1, 0, 0, 0, 2, 2, 1, 0, 2, 3, 1, 1, 2, 2, 0, 3, 0, 0, 0, 2, 1], "predicted_answers": [2, 1, 1, 1, 3, 2, 2, 3, 2, 2, 0, 3, 2, 0, 3, 3, 2, 0, 3, 2, 2, 0, 1, 0, 2, 2, 3, 3, 1, 3, 0, 3, 0, 2, 0, 0, 2, 0, 3, 3, 2, 3, 1, 1, 1, 2, 1, 3, 3, 1, 3, 1, 1, 0, 0, 0, 2, 2, 1, 0, 2, 3, 1, 1, 2, 2, 0, 3, 0, 0, 0, 2, 1], "predicted_probs": [0.98193359375, 0.83740234375, 0.919921875, 0.9560546875, 0.9189453125, 0.97607421875, 0.62890625, 0.92236328125, 0.9775390625, 0.90576171875, 0.77783203125, 0.9609375, 0.91796875, 0.94921875, 0.908203125, 0.884765625, 0.96728515625, 0.98828125, 0.974609375, 0.9736328125, 0.95751953125, 0.96435546875, 0.591796875, 0.939453125, 0.92333984375, 0.98388671875, 0.93603515625, 0.947265625, 0.92041015625, 0.802734375, 0.99169921875, 0.92138671875, 0.97802734375, 0.9892578125, 0.94384765625, 0.9248046875, 0.955078125, 0.9638671875, 0.93896484375, 0.947265625, 0.814453125, 0.85888671875, 0.87353515625, 0.9130859375, 0.90966796875, 0.96435546875, 0.9091796875, 0.88037109375, 0.9716796875, 0.919921875, 0.92919921875, 0.96533203125, 0.88330078125, 0.9755859375, 0.9609375, 0.95751953125, 0.95263671875, 0.935546875, 0.94580078125, 0.97265625, 0.96142578125, 0.96044921875, 0.90625, 0.9609375, 0.970703125, 0.99169921875, 0.896484375, 0.83837890625, 0.78564453125, 0.91162109375, 0.97216796875, 0.958984375, 0.55029296875], "predicted_probs_of_correct_answers": [0.98193359375, 0.83740234375, 0.919921875, 0.9560546875, 0.9189453125, 0.97607421875, 0.62890625, 0.92236328125, 0.9775390625, 0.90576171875, 0.77783203125, 0.9609375, 0.91796875, 0.94921875, 0.908203125, 0.884765625, 0.96728515625, 0.98828125, 0.974609375, 0.9736328125, 0.95751953125, 0.96435546875, 0.591796875, 0.939453125, 0.92333984375, 0.98388671875, 0.93603515625, 0.947265625, 0.92041015625, 0.802734375, 0.99169921875, 0.92138671875, 0.97802734375, 0.9892578125, 0.94384765625, 0.9248046875, 0.955078125, 0.9638671875, 0.93896484375, 0.947265625, 0.814453125, 0.85888671875, 0.87353515625, 0.9130859375, 0.90966796875, 0.96435546875, 0.9091796875, 0.88037109375, 0.9716796875, 0.919921875, 0.92919921875, 0.96533203125, 0.88330078125, 0.9755859375, 0.9609375, 0.95751953125, 0.95263671875, 0.935546875, 0.94580078125, 0.97265625, 0.96142578125, 0.96044921875, 0.90625, 0.9609375, 0.970703125, 0.99169921875, 0.896484375, 0.83837890625, 0.78564453125, 0.91162109375, 0.97216796875, 0.958984375, 0.55029296875], "mean_predicted_prob_of_correct_answers": 0.91796875, "mean_predicted_probs": 0.91796875, "value_counts": {"0": 18, "1": 16, "2": 21, "3": 18}, "sum_abcd": [0.982421875, 0.84130859375, 0.9208984375, 0.9609375, 0.919921875, 0.978515625, 0.64404296875, 0.9267578125, 0.9794921875, 0.908203125, 0.79833984375, 0.9619140625, 0.9189453125, 0.95166015625, 0.90869140625, 0.8857421875, 0.97705078125, 0.9912109375, 0.9794921875, 0.974609375, 0.96533203125, 0.96484375, 0.623046875, 0.94091796875, 0.94580078125, 0.9892578125, 0.951171875, 0.9482421875, 0.92626953125, 0.8212890625, 0.9921875, 0.9248046875, 0.97802734375, 0.990234375, 0.9462890625, 0.92724609375, 0.95556640625, 0.96435546875, 0.94091796875, 0.94970703125, 0.8359375, 0.8681640625, 0.87841796875, 0.9140625, 0.9111328125, 0.9658203125, 0.93017578125, 0.88134765625, 0.974609375, 0.92578125, 0.9306640625, 0.97119140625, 0.89208984375, 0.9755859375, 0.9716796875, 0.95849609375, 0.95458984375, 0.9365234375, 0.947265625, 0.9736328125, 0.96875, 0.9619140625, 0.90869140625, 0.97119140625, 0.97265625, 0.9921875, 0.89990234375, 0.888671875, 0.91015625, 0.91455078125, 0.97265625, 0.96337890625, 0.5869140625]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"mean_correct": 1.0, "total_correct": 9, "is_correct": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], "output_probs": [[0.0016088485717773438, 0.0196075439453125, 0.802734375, 0.0016069412231445312], [0.9306640625, 0.00139617919921875, 0.0015726089477539062, 0.0020751953125], [0.0009326934814453125, 0.0006098747253417969, 0.0011301040649414062, 0.97216796875], [0.00011718273162841797, 0.00019347667694091797, 0.96044921875, 0.00045871734619140625], [0.00213623046875, 0.958984375, 0.0079803466796875, 0.0026092529296875], [0.0013179779052734375, 0.0035572052001953125, 0.8564453125, 0.0017843246459960938], [0.859375, 0.0026607513427734375, 0.0042572021484375, 0.0023555755615234375], [0.91748046875, 0.0009336471557617188, 0.0015115737915039062, 0.0007524490356445312], [0.9248046875, 0.00405120849609375, 0.004810333251953125, 0.004375457763671875]], "actual_answers": [2, 0, 3, 2, 1, 2, 0, 0, 0], "predicted_answers": [2, 0, 3, 2, 1, 2, 0, 0, 0], "predicted_probs": [0.802734375, 0.9306640625, 0.97216796875, 0.96044921875, 0.958984375, 0.8564453125, 0.859375, 0.91748046875, 0.9248046875], "predicted_probs_of_correct_answers": [0.802734375, 0.9306640625, 0.97216796875, 0.96044921875, 0.958984375, 0.8564453125, 0.859375, 0.91748046875, 0.9248046875], "mean_predicted_prob_of_correct_answers": 0.9091796875, "mean_predicted_probs": 0.9091796875, "value_counts": {"0": 4, "1": 1, "2": 3, "3": 1}, "sum_abcd": [0.82568359375, 0.935546875, 0.974609375, 0.96142578125, 0.9716796875, 0.86328125, 0.86865234375, 0.9208984375, 0.93798828125]}
Loading

0 comments on commit 42de6df

Please sign in to comment.