forked from OpenGenerativeAI/llm-colosseum
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathscript.py
69 lines (57 loc) · 1.4 KB
/
script.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
import sys
import boto3
from dotenv import load_dotenv
from eval.game import (
Game,
Player1,
Player2,
random_bedrock_model,
)
from loguru import logger
import random
logger.remove()
logger.add(sys.stdout, level="INFO")
load_dotenv()
def main():
# Environment Settings
models = [
"mistral_8x7b",
"mistral_7b",
"ai21_ultra",
"ai21_mid",
"claude_3_sonnet",
"claude_3_haiku",
"claude_2",
# "claude_2_1", # Doesn't want to play
"claude_instant",
"cohere_command",
"cohere_light",
"titan_express",
"titan_lite",
# "llama2_13b", # not working
# "llama2_70b", # not working
]
random.seed()
# Get a random model from the available models
rand_model_1 = random.choice(models)
# Remove the selected model from the available models list
models.remove(rand_model_1)
# Get another random model different from rand_model_1
rand_model_2 = random.choice(models)
# # force a match
# rand_model_1 = "ai21_ultra"
# rand_model_2 = "titan_express"
game = Game(
render=True,
player_1=Player1(
nickname="Bedrock",
model=rand_model_1,
),
player_2=Player2(
nickname="PartyRock",
model=rand_model_2,
),
)
return game.run()
if __name__ == "__main__":
main()