HaileyStorm
commited on
Commit
•
da8a8f2
1
Parent(s):
9082726
Update chess-gpt-eval-contrastive/main.py
Browse files
chess-gpt-eval-contrastive/main.py
CHANGED
@@ -673,15 +673,17 @@ player_ones = ["50M/anneal/anneal_complete_round3.pt"]
|
|
673 |
player_two_recording_name = "lc0_sweep" #"stockfish_sweep"
|
674 |
move_num_in_gamestate = False
|
675 |
book_opening = True
|
676 |
-
random_opening =
|
677 |
-
random_opening_moves = 10
|
678 |
activations_path="activations.pkl"
|
679 |
update_activations = True # False = use them
|
680 |
save_activations_every = 25
|
681 |
if __name__ == "__main__":
|
682 |
for nanogpt_player in player_ones:
|
683 |
-
|
684 |
-
|
|
|
|
|
685 |
# player_one = GPTPlayer(model="gpt-3.5-turbo-instruct")
|
686 |
# player_one = LocalLlamaPlayer(model_name="meta-llama/Llama-2-7b-hf")
|
687 |
# player_one = LocalLoraLlamaPlayer("meta-llama/Llama-2-7b-hf", "/workspace/axolotl/lora2-out")
|
@@ -692,9 +694,9 @@ if __name__ == "__main__":
|
|
692 |
# player_one = NanoGptPlayer(model_name=player_one_recording_name, move_num_in_gamestate=move_num_in_gamestate)
|
693 |
#player_one_recording_name = f"xformer_rdm_{rm}"
|
694 |
player_one = MambaPlayer(model_name=player_one_recording_name, move_num_in_gamestate=move_num_in_gamestate)
|
695 |
-
player_one_recording_name = f"
|
696 |
if not update_activations:
|
697 |
-
player_one.apply_contrastive_activations()
|
698 |
|
699 |
#player_two = StockfishPlayer(skill_level=i, play_time=0.1)
|
700 |
player_two = LC0PLayer(skill=i)
|
@@ -705,5 +707,5 @@ if __name__ == "__main__":
|
|
705 |
#print(f"\n\nSTARTING GAMES AGAINST STOCKFISH LEVEL {i}\n\n")
|
706 |
print(f"\n\nSTARTING GAMES AGAINST LC0 LEVEL {i}\n\n")
|
707 |
|
708 |
-
play_games(player_one, player_two, num_games, book_opening=book_opening, random_opening=random_opening, random_opening_moves=
|
709 |
|
|
|
673 |
player_two_recording_name = "lc0_sweep" #"stockfish_sweep"
|
674 |
move_num_in_gamestate = False
|
675 |
book_opening = True
|
676 |
+
random_opening = True
|
677 |
+
#random_opening_moves = 10
|
678 |
activations_path="activations.pkl"
|
679 |
update_activations = True # False = use them
|
680 |
save_activations_every = 25
|
681 |
if __name__ == "__main__":
|
682 |
for nanogpt_player in player_ones:
|
683 |
+
i = 0
|
684 |
+
for rm in range(5,36,5):
|
685 |
+
#for i in [0]: # [3] #range(11):
|
686 |
+
num_games = 2500
|
687 |
# player_one = GPTPlayer(model="gpt-3.5-turbo-instruct")
|
688 |
# player_one = LocalLlamaPlayer(model_name="meta-llama/Llama-2-7b-hf")
|
689 |
# player_one = LocalLoraLlamaPlayer("meta-llama/Llama-2-7b-hf", "/workspace/axolotl/lora2-out")
|
|
|
694 |
# player_one = NanoGptPlayer(model_name=player_one_recording_name, move_num_in_gamestate=move_num_in_gamestate)
|
695 |
#player_one_recording_name = f"xformer_rdm_{rm}"
|
696 |
player_one = MambaPlayer(model_name=player_one_recording_name, move_num_in_gamestate=move_num_in_gamestate)
|
697 |
+
player_one_recording_name = f"mamba_contrastive_rdm_{rm}"
|
698 |
if not update_activations:
|
699 |
+
player_one.apply_contrastive_activations(weight=1.0)
|
700 |
|
701 |
#player_two = StockfishPlayer(skill_level=i, play_time=0.1)
|
702 |
player_two = LC0PLayer(skill=i)
|
|
|
707 |
#print(f"\n\nSTARTING GAMES AGAINST STOCKFISH LEVEL {i}\n\n")
|
708 |
print(f"\n\nSTARTING GAMES AGAINST LC0 LEVEL {i}\n\n")
|
709 |
|
710 |
+
play_games(player_one, player_two, num_games, book_opening=book_opening, random_opening=random_opening, random_opening_moves=rm)
|
711 |
|