Spaces:
Sleeping
Sleeping
Alan Liu
commited on
Commit
•
3732b01
1
Parent(s):
dd4f101
parameter viewer
Browse files
app.py
CHANGED
@@ -67,7 +67,7 @@ subtotal_operations = [
|
|
67 |
|
68 |
|
69 |
|
70 |
-
col1, col2, col3, col4, col5 = st.columns([
|
71 |
|
72 |
inference_config = {}
|
73 |
parameter_count = {}
|
@@ -141,6 +141,17 @@ with col2:
|
|
141 |
st.write(f'model_total_size (Byte): {model_total_size_in_byte:,}')
|
142 |
|
143 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
with col3: # Prefilling
|
145 |
prefilling_operation_count = prefilling_operation(model_config, inference_config)
|
146 |
prefilling_activation_memory_count = prefilling_activation_memory(model_config, inference_config)
|
|
|
67 |
|
68 |
|
69 |
|
70 |
+
col1, col2, col3, col4, col5 = st.columns([0.8, 2, 2.5, 2.5, 0.01])
|
71 |
|
72 |
inference_config = {}
|
73 |
parameter_count = {}
|
|
|
141 |
st.write(f'model_total_size (Byte): {model_total_size_in_byte:,}')
|
142 |
|
143 |
|
144 |
+
# add parameter viewer
|
145 |
+
if model_config['model']:
|
146 |
+
header4("Parameters Viewer")
|
147 |
+
weight_generic = st.selectbox('Select weight:', options=model_config['module_classes'])
|
148 |
+
modules = {}
|
149 |
+
for module in model_config['module_classes'][weight_generic]:
|
150 |
+
modules.update(module)
|
151 |
+
modules = {k: list(v) for k, v in modules.items()}
|
152 |
+
modules = pd.DataFrame(list(modules.items()), columns=["Parameter", "Shape"])
|
153 |
+
st.markdown(create_table(modules))
|
154 |
+
|
155 |
with col3: # Prefilling
|
156 |
prefilling_operation_count = prefilling_operation(model_config, inference_config)
|
157 |
prefilling_activation_memory_count = prefilling_activation_memory(model_config, inference_config)
|