Skip to content

Commit 1660529

Browse files
Minor YAML updates
1 parent 63fad48 commit 1660529

4 files changed

Lines changed: 14 additions & 11 deletions

File tree

examples/arches/nvdla.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,7 @@ arch:
3333
- !Memory
3434
name: Register
3535
size: weight.bits_per_value if weight else 1
36-
area: 0
37-
leak_power: 0
38-
actions:
39-
- {name: read, energy: 0, latency: 0}
40-
- {name: write, energy: 0, latency: 0}
36+
component_class: Dummy
4137
tensors: {keep: weight}
4238

4339
- !Compute

examples/workloads/gpt3_175B_kv_cache.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ workload:
2020
einsums:
2121
- {einsum: "I[b, m, d] = I_in[b, m, d]", is_copy_operation: True}
2222

23-
# V and K containing the new tokens only. Assume N_TOKENS >> N_NEW_TOKENS, so we're
24-
# just going to ignore these tensors and assume that the concatenation with the full K
25-
# and V is cheap relative to the movement of K and V.
23+
# V and K containing the new tokens only. Note that these two tensors aren't used
24+
# later. We assume that N_TOKENS >> N_NEW_TOKENS, making the full K and V much larger
25+
# than these. In real transformers, we'd concatenate these with the full K and V, but
26+
# since K >> K_new and V >> V_new, we can ignore these tensors and assume that the
27+
# concatenation is cheap relative to the movement of K and V.
2628
- "V_new[b, m, h, e] = I[b, m, d] * WV[h, e, d]"
2729
- "K_new[b, m, h, e] = I[b, m, d] * WK[h, e, d]"
2830

examples/workloads/gpt3_6.7B.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,15 @@ workload:
3434
einsums:
3535
- einsum: "I[b, m, d] = I_in[b, m, d]"
3636
is_copy_operation: True
37+
3738
- "V[b, m, h, e] = I[b, m, d] * WV[h, e, d]"
3839
- "K[b, m, h, e] = I[b, m, d] * WK[h, e, d]"
3940
- "Q[b, m, h, e] = I[b, m, d] * WQ[h, e, d]"
41+
4042
- einsum: "QK[b, m, p, h] = Q[b, m, h, e] * K[b, M: p, h, e]"
4143
renames: {input: Q}
4244
- "QK_softmax[b, m, p, h] = QK[b, m, p, h]"
45+
4346
- einsum: "AV[b, m, h, f] = QK_softmax[b, m, p, h] * V[b, M: p, h, E: f]"
4447
renames: {input: QK_softmax}
4548
- "Z[b, m, g] = AV[b, m, h, f] * WZ[h, f, g]"

examples/workloads/gpt3_6.7B_kv_cache.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ workload:
2020
einsums:
2121
- {einsum: "I[b, m, d] = I_in[b, m, d]", is_copy_operation: True}
2222

23-
# V and K containing the new tokens only. Assume N_TOKENS >> N_NEW_TOKENS, so we're
24-
# just going to ignore these tensors and assume that the concatenation with the full K
25-
# and V is cheap relative to the movement of K and V.
23+
# V and K containing the new tokens only. Note that these two tensors aren't used
24+
# later. We assume that N_TOKENS >> N_NEW_TOKENS, making the full K and V much larger
25+
# than these. In real transformers, we'd concatenate these with the full K and V, but
26+
# since K >> K_new and V >> V_new, we can ignore these tensors and assume that the
27+
# concatenation is cheap relative to the movement of K and V.
2628
- "V_new[b, m, h, e] = I[b, m, d] * WV[h, e, d]"
2729
- "K_new[b, m, h, e] = I[b, m, d] * WK[h, e, d]"
2830

0 commit comments

Comments
 (0)