Commit
•
ee7c71e
1
Parent(s):
8abcf2d
Update app.py
Browse files
app.py
CHANGED
@@ -64,14 +64,17 @@ with gr.Blocks() as demo:
|
|
64 |
hidden_size = gr.Number(label="Hidden Size", value=6144)
|
65 |
sequence_length = gr.Number(label="Sequence Length", value=2048)
|
66 |
num_layers = gr.Number(label="Number of Layers", value=44)
|
67 |
-
moe = gr.Checkbox(label="MoE", value=False)
|
68 |
-
num_experts = gr.Number(label="Number of Experts", value=8)
|
69 |
-
expert_interval = gr.Number(label="Expert Interval", value=1)
|
70 |
-
topk = gr.Number(label="Top k Routing", value=1)
|
71 |
ffn_expansion_factor = gr.Number(label="FFN Expansion Factor", value=4)
|
72 |
num_mlp_linears = gr.Number(label="Number of Linear Layers per MLP Block", value=2)
|
73 |
kv_size_ratio = gr.Number(label="KV Size Ratio", value=1.0)
|
74 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
result = gr.Textbox(label="Output", interactive=False)
|
76 |
|
77 |
def run_calculation(vocab_size, tied_embeddings, hidden_size, sequence_length, num_layers, moe, num_experts, expert_interval, topk, ffn_expansion_factor, num_mlp_linears, kv_size_ratio):
|
|
|
64 |
hidden_size = gr.Number(label="Hidden Size", value=6144)
|
65 |
sequence_length = gr.Number(label="Sequence Length", value=2048)
|
66 |
num_layers = gr.Number(label="Number of Layers", value=44)
|
|
|
|
|
|
|
|
|
67 |
ffn_expansion_factor = gr.Number(label="FFN Expansion Factor", value=4)
|
68 |
num_mlp_linears = gr.Number(label="Number of Linear Layers per MLP Block", value=2)
|
69 |
kv_size_ratio = gr.Number(label="KV Size Ratio", value=1.0)
|
70 |
|
71 |
+
# MoE Parameters inside an accordion
|
72 |
+
with gr.Accordion("MoE Parameters", open=False):
|
73 |
+
moe = gr.Checkbox(label="MoE", value=False)
|
74 |
+
num_experts = gr.Number(label="Number of Experts", value=8)
|
75 |
+
expert_interval = gr.Number(label="Expert Interval", value=1)
|
76 |
+
topk = gr.Number(label="Top k Routing", value=1)
|
77 |
+
|
78 |
result = gr.Textbox(label="Output", interactive=False)
|
79 |
|
80 |
def run_calculation(vocab_size, tied_embeddings, hidden_size, sequence_length, num_layers, moe, num_experts, expert_interval, topk, ffn_expansion_factor, num_mlp_linears, kv_size_ratio):
|