Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
|
@@ -221,14 +221,14 @@ def extract_architecture_metrics(df):
|
|
| 221 |
'model_id': row['model_id'],
|
| 222 |
'organization': row.get('organization', 'Unknown'),
|
| 223 |
'model_type': row.get('model_type', 'Unknown'),
|
| 224 |
-
'hidden_size': config.get('hidden_size', 0),
|
| 225 |
-
'num_layers': config.get('num_hidden_layers', config.get('num_layers', 0)),
|
| 226 |
-
'max_position': config.get('max_position_embeddings', 0),
|
| 227 |
-
'vocab_size': config.get('vocab_size', 0),
|
| 228 |
-
'intermediate_size': config.get('intermediate_size', 0),
|
| 229 |
-
'rope_type': techniques.get('rope_type', techniques.get('positional_encoding', 'Unknown')),
|
| 230 |
-
'attention_type': techniques.get('attention_implementation', 'Unknown'),
|
| 231 |
-
'sliding_window': techniques.get('sliding_window_size', 0)
|
| 232 |
}
|
| 233 |
metrics.append(metric)
|
| 234 |
|
|
@@ -317,7 +317,8 @@ with tab3:
|
|
| 317 |
|
| 318 |
# Extract key techniques
|
| 319 |
rope_type = techniques.get('rope_type', techniques.get('positional_encoding', 'standard'))
|
| 320 |
-
|
|
|
|
| 321 |
attention_impl = techniques.get('attention_implementation', 'standard')
|
| 322 |
|
| 323 |
org_techniques.append({
|
|
|
|
| 221 |
'model_id': row['model_id'],
|
| 222 |
'organization': row.get('organization', 'Unknown'),
|
| 223 |
'model_type': row.get('model_type', 'Unknown'),
|
| 224 |
+
'hidden_size': config.get('hidden_size', 0) or 0,
|
| 225 |
+
'num_layers': config.get('num_hidden_layers', config.get('num_layers', 0)) or 0,
|
| 226 |
+
'max_position': config.get('max_position_embeddings', 0) or 0,
|
| 227 |
+
'vocab_size': config.get('vocab_size', 0) or 0,
|
| 228 |
+
'intermediate_size': config.get('intermediate_size', 0) or 0,
|
| 229 |
+
'rope_type': techniques.get('rope_type', techniques.get('positional_encoding', 'Unknown')) or 'Unknown',
|
| 230 |
+
'attention_type': techniques.get('attention_implementation', 'Unknown') or 'Unknown',
|
| 231 |
+
'sliding_window': techniques.get('sliding_window_size', 0) or 0
|
| 232 |
}
|
| 233 |
metrics.append(metric)
|
| 234 |
|
|
|
|
| 317 |
|
| 318 |
# Extract key techniques
|
| 319 |
rope_type = techniques.get('rope_type', techniques.get('positional_encoding', 'standard'))
|
| 320 |
+
sliding_window_size = techniques.get('sliding_window_size', 0)
|
| 321 |
+
has_sliding_window = sliding_window_size is not None and sliding_window_size > 0
|
| 322 |
attention_impl = techniques.get('attention_implementation', 'standard')
|
| 323 |
|
| 324 |
org_techniques.append({
|