Bluear7878/FBCache

2

stars

122

commits

Jupyter Notebook

primary language

Apr 5, 2025

updated

README

BatchResultsInference Time (sec)
Batch 1Batch 127.7s
Batch 2Batch 255.0s
Batch 3Batch 31m.24s

##. Potential Overhead from Loop-Based Batch Processing

In some parts of the code, you may see a pattern like:

for (int i = 0; i < batch_size; i++) {
    concat.slice(0, i, i + 1).copy_(encoder_hidden_states.slice(0, i, i + 1));
    qkv_proj.forward(...);
    // ...
}

Contributors

lmxyy

89 commits

sxtyzhangzk

23 commits

Bluear7878

4 commits

Aprilhuu

2 commits

Bluear7878/FBCache

2

stars

122

commits

Jupyter Notebook

primary language

Apr 5, 2025

updated

README

BatchResultsInference Time (sec)
Batch 1Batch 127.7s
Batch 2Batch 255.0s
Batch 3Batch 31m.24s

##. Potential Overhead from Loop-Based Batch Processing

In some parts of the code, you may see a pattern like:

for (int i = 0; i < batch_size; i++) {
    concat.slice(0, i, i + 1).copy_(encoder_hidden_states.slice(0, i, i + 1));
    qkv_proj.forward(...);
    // ...
}

Contributors

lmxyy

89 commits

sxtyzhangzk

23 commits

Bluear7878

4 commits

Aprilhuu

2 commits

Languages

Jupyter Notebook

88.4%

Cuda

5.1%

Python

3.8%

C++

2.3%