Commit
·
a002825
1
Parent(s):
4d46abb
UI updates
Browse files
app.py
CHANGED
|
@@ -27,6 +27,9 @@ precision_options = {
|
|
| 27 |
'half': 2
|
| 28 |
}
|
| 29 |
|
|
|
|
|
|
|
|
|
|
| 30 |
# Constants from the paper, now exposed as user inputs
|
| 31 |
layers = st.number_input("Number of Layers", value=32, step=1)
|
| 32 |
attention_heads = st.number_input("Number of Attention Heads", value=32, step=1)
|
|
@@ -64,9 +67,6 @@ def calculate_activations(parameter_count, context_length, batch_size, vocab_siz
|
|
| 64 |
|
| 65 |
return total_activations
|
| 66 |
|
| 67 |
-
# Streamlit app
|
| 68 |
-
st.title("Memory Usage Calculator for Large Language Models")
|
| 69 |
-
|
| 70 |
# User inputs
|
| 71 |
parameter_count = st.number_input("Parameter Count (in billions)", value=1, step=1) * 1e9
|
| 72 |
context_length = st.number_input("Context Length (number of tokens)", value=512, step=1)
|
|
|
|
| 27 |
'half': 2
|
| 28 |
}
|
| 29 |
|
| 30 |
+
# Streamlit app
|
| 31 |
+
st.title("Memory Usage Calculator for Large Language Models")
|
| 32 |
+
|
| 33 |
# Constants from the paper, now exposed as user inputs
|
| 34 |
layers = st.number_input("Number of Layers", value=32, step=1)
|
| 35 |
attention_heads = st.number_input("Number of Attention Heads", value=32, step=1)
|
|
|
|
| 67 |
|
| 68 |
return total_activations
|
| 69 |
|
|
|
|
|
|
|
|
|
|
| 70 |
# User inputs
|
| 71 |
parameter_count = st.number_input("Parameter Count (in billions)", value=1, step=1) * 1e9
|
| 72 |
context_length = st.number_input("Context Length (number of tokens)", value=512, step=1)
|