atlas5301 commited on
Commit
a8a1b3d
·
1 Parent(s): 7243e58
Files changed (2) hide show
  1. pages/benchmark_viewer.py +1 -1
  2. utils/style.py +18 -11
pages/benchmark_viewer.py CHANGED
@@ -46,7 +46,7 @@ def show():
46
  with col2:
47
  # Single Model Multiselect (filtered by selected datasets)
48
  available_models = filtered_df['model'].unique()
49
- selected_models = st.multiselect("Model(s)", available_models, default=['qwen-2.5-7b-instruct'] if 'qwen-2.5-7b-instruct' in available_models else available_models) # Default to qwen-2.5-7b-instruct if available, otherwise select all
50
 
51
  with col3:
52
  min_op, max_op = st.slider("Op Range", int(filtered_df['op'].min()), int(filtered_df['op'].max()), (int(filtered_df['op'].min()), int(filtered_df['op'].max())))
 
46
  with col2:
47
  # Single Model Multiselect (filtered by selected datasets)
48
  available_models = filtered_df['model'].unique()
49
+ selected_models = st.multiselect("Model(s)", available_models, default=['llama-3.1-8b-instruct','qwen-2.5-7b-instruct','llama-3.1-70b-instruct','qwen-2.5-72b-instruct','deepseek-v3'])
50
 
51
  with col3:
52
  min_op, max_op = st.slider("Op Range", int(filtered_df['op'].min()), int(filtered_df['op'].max()), (int(filtered_df['op'].min()), int(filtered_df['op'].max())))
utils/style.py CHANGED
@@ -1,11 +1,18 @@
1
  import pandas as pd
2
-
 
3
  COLOR_MAP = {
4
- "yellow": "background-color: #FFFFCC", # Reasoning models
5
- "green": "background-color: #E3FBE9", # Linear attention hybrid
6
- "blue": "background-color: #E6F4FF" # SSM hybrid models
 
 
7
  }
8
 
 
 
 
 
9
  def style_zero_context(df):
10
  """
11
  Similar approach to style_long_context:
@@ -16,11 +23,11 @@ def style_zero_context(df):
16
 
17
  # Example color dict, tweak as needed:
18
  color_mapping = {
19
- "minimax-text-01": COLOR_MAP["green"],
20
- "jamba-1.5-large": COLOR_MAP["blue"],
21
- "deepseek-r1": COLOR_MAP["yellow"],
22
- "o1-mini": COLOR_MAP["yellow"],
23
- "qwq-32b-preview": COLOR_MAP["yellow"],
24
  # Add any other special-cased models here
25
  # "o1-mini": COLOR_MAP["yellow"], etc.
26
  }
@@ -55,8 +62,8 @@ def style_zero_context(df):
55
  # Add styling for model types
56
  def style_long_context(df):
57
  color_mapping = {
58
- "minimax-text-01": COLOR_MAP["green"],
59
- "jamba-1.5-large": COLOR_MAP["blue"]
60
  }
61
 
62
  return df.style.apply(
 
1
  import pandas as pd
2
+ import streamlit as st
3
+ # Define color maps for both light and dark modes
4
  COLOR_MAP = {
5
+ "light": {
6
+ "yellow": "background-color: rgba(255, 255, 204, 0.5)", # Reasoning models
7
+ "green": "background-color: rgba(227, 251, 233, 0.5)", # Linear attention hybrid
8
+ "blue": "background-color: rgba(230, 244, 255, 0.5)" # SSM hybrid models
9
+ },
10
  }
11
 
12
+ def get_color_map():
13
+ """Returns the appropriate color map based on the current theme."""
14
+ return COLOR_MAP["light"]
15
+
16
  def style_zero_context(df):
17
  """
18
  Similar approach to style_long_context:
 
23
 
24
  # Example color dict, tweak as needed:
25
  color_mapping = {
26
+ "minimax-text-01": get_color_map()["green"],
27
+ "jamba-1.5-large": get_color_map()["blue"],
28
+ "deepseek-r1": get_color_map()["yellow"],
29
+ "o1-mini": get_color_map()["yellow"],
30
+ "qwq-32b-preview": get_color_map()["yellow"],
31
  # Add any other special-cased models here
32
  # "o1-mini": COLOR_MAP["yellow"], etc.
33
  }
 
62
  # Add styling for model types
63
  def style_long_context(df):
64
  color_mapping = {
65
+ "minimax-text-01": get_color_map()["green"],
66
+ "jamba-1.5-large": get_color_map()["blue"]
67
  }
68
 
69
  return df.style.apply(