Spaces:
Running
Running
Update arena_config.py
Browse files- arena_config.py +117 -0
arena_config.py
CHANGED
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import os
|
2 |
+
|
3 |
+
ARENA_NAME = "# ๐ The GPU-Poor LLM Gladiator Arena ๐"
|
4 |
+
ARENA_DESCRIPTION = """
|
5 |
+
Step right up to the arena where frugal meets fabulous in the world of AI!
|
6 |
+
Watch as our compact contenders (maxing out at 9B parameters) duke it out in a battle of wits and words.
|
7 |
+
|
8 |
+
Why this quirky quest? We're champions of privacy and penny-pinching โ shunning pricey commercial APIs
|
9 |
+
and keeping our data close to our chests. Who says you need deep pockets or big tech to have big fun?
|
10 |
+
|
11 |
+
Your mission, should you choose to accept it: Pit two mystery models against each other and decide
|
12 |
+
which pint-sized powerhouse reigns supreme in the land of lean, language models!
|
13 |
+
|
14 |
+
Read more at
|
15 |
+
"""
|
16 |
+
|
17 |
+
# Ollama API configuration
|
18 |
+
API_URL = os.environ.get("API_URL")
|
19 |
+
API_KEY = os.environ.get("API_KEY")
|
20 |
+
HEADERS = {
|
21 |
+
"Content-Type": "application/json",
|
22 |
+
"X-API-Key": API_KEY
|
23 |
+
}
|
24 |
+
|
25 |
+
NEXTCLOUD_URL = os.environ.get("NEXTCLOUD_URL")
|
26 |
+
NEXTCLOUD_USERNAME = os.environ.get("NEXTCLOUD_USERNAME")
|
27 |
+
NEXTCLOUD_PASSWORD = os.environ.get("NEXTCLOUD_PASSWORD")
|
28 |
+
NEXTCLOUD_LEADERBOARD_PATH = os.environ.get("NEXTCLOUD_LEADERBOARD_PATH")
|
29 |
+
|
30 |
+
|
31 |
+
# Predefined list of approved models with human-readable names
|
32 |
+
APPROVED_MODELS = [
|
33 |
+
("llama3.2:1b-instruct-q8_0", "LLaMA 3.2 (1B, 8-bit)"),
|
34 |
+
("llama3.2:3b-instruct-q4_K_M", "LLaMA 3.2 (3B, 4-bit)"),
|
35 |
+
("llama3.1:8b-instruct-q4_0", "LLaMA 3.1 (8B, 4-bit)"),
|
36 |
+
("gemma2:2b-instruct-q4_0", "Gemma 2 (2B, 4-bit)"),
|
37 |
+
("gemma2:9b-instruct-q4_0", "Gemma 2 (9B, 4-bit)"),
|
38 |
+
("qwen2.5:0.5b-instruct-q8_0", "Qwen 2.5 (0.5B, 8-bit)"),
|
39 |
+
("qwen2.5:1.5b-instruct-q8_0", "Qwen 2.5 (1.5B, 8-bit)"),
|
40 |
+
("qwen2.5:3b-instruct-q4_K_M", "Qwen 2.5 (3B, 4-bit)"),
|
41 |
+
("qwen2.5:7b-instruct-q4_K_M", "Qwen 2.5 (7B, 4-bit)"),
|
42 |
+
("phi3.5:3.8b-mini-instruct-q4_0", "Phi 3.5 (3.8B, 4-bit)"),
|
43 |
+
("mistral:7b-instruct-v0.3-q4_0", "Mistral 0.3 (7B, 4-bit)"),
|
44 |
+
("hermes3:8b-llama3.1-q4_0", "Hermes 3 (8B, 4-bit)"),
|
45 |
+
("aya:8b-23-q4_0", "Aya 23 (8B, 4-bit)")
|
46 |
+
]
|
47 |
+
|
48 |
+
# Example prompts
|
49 |
+
example_prompts = [
|
50 |
+
"Explain how the internet works to someone from the 1800s.",
|
51 |
+
"Design a new sport that combines elements of chess and basketball.",
|
52 |
+
"Explain the idea behind Bitcoin using only food analogies.",
|
53 |
+
"Write a dialogue between Socrates and a modern AI researcher about the nature of intelligence.",
|
54 |
+
"Describe a color to someone who has been blind since birth.",
|
55 |
+
"Compose a short speech convincing aliens not to destroy Earth.",
|
56 |
+
"Explain the concept of infinity using a metaphor that doesn't involve numbers or math.",
|
57 |
+
"Write a job description for a time traveler's assistant.",
|
58 |
+
"Create a new philosophical thought experiment that challenges our understanding of reality.",
|
59 |
+
"Describe how you would explain the concept of death to an immortal being.",
|
60 |
+
"Invent a new emotion and describe how it feels, when it occurs, and its evolutionary purpose.",
|
61 |
+
"Write a conversation between your future self and your past self, discussing the most important life lessons.",
|
62 |
+
"Describe a day in the life of a sentient cloud.",
|
63 |
+
"Create a new system of government based on the behavior of honeybees.",
|
64 |
+
"Explain quantum entanglement using only elements from a typical kitchen.",
|
65 |
+
"Design a universal language that could be understood by all species on Earth.",
|
66 |
+
"Write a creation myth for the Internet age.",
|
67 |
+
"Describe how you would teach empathy to an artificial intelligence.",
|
68 |
+
"Invent a new primary color and explain its impact on the world.",
|
69 |
+
"Compose a poem that can be read forwards and backwards, with different meanings in each direction.",
|
70 |
+
"What are the main causes of climate change?",
|
71 |
+
"Describe the process of photosynthesis in simple terms.",
|
72 |
+
"Explain the concept of supply and demand in economics.",
|
73 |
+
"What are the key differences between democracy and autocracy?",
|
74 |
+
"How does the human immune system work?",
|
75 |
+
"Summarize the plot of Romeo and Juliet in three sentences.",
|
76 |
+
"What are the main features of the solar system?",
|
77 |
+
"Explain the theory of evolution by natural selection.",
|
78 |
+
"What are the primary functions of the United Nations?",
|
79 |
+
"Describe the water cycle and its importance to life on Earth.",
|
80 |
+
"Explain the biggest differences between Keynesian and Austrian economics.",
|
81 |
+
"What are the main principles of the scientific method?",
|
82 |
+
"Describe a world where humans communicate solely through music.",
|
83 |
+
"Explain the concept of blockchain to a medieval blacksmith.",
|
84 |
+
"Design a sustainable city that could exist on Mars.",
|
85 |
+
"Write a short story where the protagonist is a sentient algorithm.",
|
86 |
+
"Describe how you would reorganize the education system to prepare students for the 22nd century.",
|
87 |
+
"Invent a new form of renewable energy and explain how it works.",
|
88 |
+
"Create a recipe for a dish that represents world peace.",
|
89 |
+
"Explain the importance of biodiversity using only references to a typical household.",
|
90 |
+
"Design a new form of transportation that doesn't rely on wheels or engines.",
|
91 |
+
"Write a letter from Earth to an alien civilization, introducing our planet and species.",
|
92 |
+
"Describe how you would govern a society where everyone can read each other's thoughts.",
|
93 |
+
"Explain the concept of time to a being that exists outside of it.",
|
94 |
+
"Create a new theory of consciousness that incorporates both biological and artificial intelligence.",
|
95 |
+
"Design a universal currency that could be used across different planets and species.",
|
96 |
+
"Describe how you would solve overpopulation if teleportation was possible.",
|
97 |
+
"Write a manifesto for a political party focused on preparing humanity for first contact with aliens.",
|
98 |
+
"Explain how you would create a sustainable economy on a generation ship traveling to another solar system.",
|
99 |
+
]
|
100 |
+
|
101 |
+
model_nicknames = [
|
102 |
+
"๐ค Robo Responder", "๐งโโ๏ธ Wizard of Words", "๐ฆ Unicorn Utterance",
|
103 |
+
"๐ง Brain Babbler", "๐ญ Prose Performer", "๐ Stellar Scribe",
|
104 |
+
"๐ฎ Crystal Ball Chatter", "๐ฆ Wise Wordsmith", "๐ Rocket Replier",
|
105 |
+
"๐จ Artful Answerer", "๐ Rainbow Rhetorician", "๐ Dragon Dialoguer",
|
106 |
+
"๐ฆ Ice Cream Ideator", "๐ป Sunflower Speechifier", "๐ฉ Top Hat Thinker",
|
107 |
+
"๐ Volcano Vocabularian", "๐ Wave of Wisdom", "๐ Mushroom Muser",
|
108 |
+
"๐ฆ Butterfly Bard", "๐ Cosmic Conversationalist",
|
109 |
+
"๐ต Melody Maestro", "๐ด Palm Tree Philosopher", "๐ฌ Lab Coat Linguist",
|
110 |
+
"๐ Lunar Lyricist", "๐ Pizza Poet", "๐ฟ Herbal Haiku-ist",
|
111 |
+
"๐ช Circus Sage", "๐ฐ Castle Chronicler", "๐บ Floral Phraseologist",
|
112 |
+
"๐งฉ Puzzle Master Pontificator", "๐ญ Mask of Many Voices",
|
113 |
+
"๐ณ Whispering Willow", "๐ง Gadget Guru Gabber", "๐งฌ Gene Genie Jawer",
|
114 |
+
"๐งธ Teddy Bear Theorist", "๐จ Canvas Conversationalist",
|
115 |
+
"๐งช Beaker Babbler", "๐ Prism Proclaimer", "๐งต Thread Theorist",
|
116 |
+
"๐ง Ice Cube Ideator"
|
117 |
+
]
|