Skip to content
Merged
Show file tree
Hide file tree
Changes from 39 commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
efa354d
hardcode the dtype depending on the model
stas00 Jul 10, 2022
cafc3f5
change the mp based on the world_size
Jul 10, 2022
daeb293
remove hardcoded world_size
stas00 Jul 10, 2022
7d5f7d4
add bigscience/bigscience-small-testing
stas00 Jul 10, 2022
2d3d271
Merge branch 'bloom-inference' of https://github.com/bigscience-works…
Jul 10, 2022
1ff0f69
fixes
stas00 Jul 10, 2022
56b24ed
add zero-inference script
stas00 Jul 10, 2022
67aab37
fixes
stas00 Jul 11, 2022
328ab0c
fix
stas00 Jul 11, 2022
f2628b0
working script
stas00 Jul 12, 2022
195288e
renames
stas00 Jul 12, 2022
3c7b2cb
fixes
stas00 Jul 12, 2022
6c5c23b
fix for offline use
stas00 Jul 13, 2022
6b19227
add benchmark
stas00 Jul 13, 2022
10cbb2d
add benchmark
stas00 Jul 13, 2022
494c212
update
stas00 Jul 13, 2022
2b67c0d
cleanup
stas00 Jul 13, 2022
3853724
update
stas00 Jul 13, 2022
1896739
msecs
stas00 Jul 13, 2022
7c9daaf
cleanup
stas00 Jul 13, 2022
dca2c8f
improve
stas00 Jul 13, 2022
85580c0
fix benchmark, add warmup
stas00 Jul 13, 2022
5ea3dee
update
stas00 Jul 13, 2022
737c681
fix; thanks Michael Wyatt
stas00 Jul 13, 2022
6be0cca
clarify
stas00 Jul 13, 2022
fea3902
Merge branch 'bloom-inference' of https://github.com/bigscience-works…
Jul 13, 2022
fc9b458
add bloom batch-inference script
Jul 13, 2022
7b0edef
removed the names :-)
Jul 13, 2022
2120dd2
fold the bs functionality from the other script
stas00 Jul 13, 2022
78bcbb7
fix
stas00 Jul 13, 2022
e7468cd
restore do_sample
stas00 Jul 13, 2022
68f5ca6
dump generate args
stas00 Jul 13, 2022
1eca7c5
fix
stas00 Jul 14, 2022
8815fc3
fix
stas00 Jul 14, 2022
034cc6f
support any batchsize
stas00 Jul 14, 2022
155c3c3
div by bs
stas00 Jul 14, 2022
73a8b7b
mul by bs
stas00 Jul 14, 2022
09d7408
add cpu_offload; sync scripts
stas00 Jul 14, 2022
695265d
wip
stas00 Jul 14, 2022
1a7e891
improvements
stas00 Jul 15, 2022
aba4055
fixes
stas00 Jul 15, 2022
5e92d55
fixes
stas00 Jul 15, 2022
3992112
add accelerate script
stas00 Jul 15, 2022
5a7057b
fix
stas00 Jul 15, 2022
4758531
wip
stas00 Jul 16, 2022
7550ee0
wip
stas00 Jul 16, 2022
5153c40
stats
stas00 Jul 18, 2022
cb50ea5
add OnDevice and remove zero-inference (#316)
jeffra Jul 19, 2022
a53fcaa
wip
stas00 Jul 19, 2022
7252879
rework generate + benchmark
stas00 Jul 19, 2022
2aa419d
figure out the memory map dynamically
stas00 Jul 19, 2022
4bd8ca5
bug fix
stas00 Jul 19, 2022
b76e516
fix ds-zero-inference wrt device
stas00 Jul 19, 2022
ecfd577
bug fix
stas00 Jul 20, 2022
fd26b9c
update
stas00 Jul 20, 2022
e2bfe91
update
stas00 Jul 22, 2022
b9a67ea
fix
stas00 Aug 9, 2022
3862ef0
Merge remote-tracking branch 'origin/main' into bloom-inference
stas00 Aug 9, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions scripts/inference/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,74 @@
# Inference scripts for BLOOM

## Deepspeed-Inference

Tensor-Parallelism and efficient fused CUDA kernels:
https://www.deepspeed.ai/tutorials/inference-tutorial/

```
deepspeed --num_gpus 8 bloom-ds-inference.py --name bigscience/bloom --batch_size 1
```

Performance on a single node of 8x80GB A100 w/ 512GB CPU RAM (JeanZay) - just a batch of 1 (would be more efficient to run a larger batch)

Adding `--benchmark` to activate the benchmarks


BS=1
```
deepspeed --num_gpus 8 scripts/inference/bloom-ds-inference.py --name bigscience/bloom --batch_size 1 --benchmark
[...]

```

While processing memory per process:

- GPU: ~50GB
- CPU: ~10GB


BS=8
```
$ deepspeed --num_gpus 8 scripts/inference/bloom-ds-inference.py --name bigscience/bloom --batch_size 8 --benchmark
[...]

```

BS=64

```
$ deepspeed --num_gpus 8 scripts/inference/bloom-ds-inference.py --name bigscience/bloom --batch_size 64 --benchmark


```


## Deepspeed ZeRO-Inference

https://www.deepspeed.ai/tutorials/zero/

```
$ deepspeed --num_gpus 8 bloom-ds-zero-inference.py --name bigscience/bloom --batch_size 1 --benchmark
[...]




```

```
$ deepspeed --num_gpus 8 bloom-ds-zero-inference.py --name bigscience/bloom --batch_size 8 --benchmark
[...]



```


```
$ deepspeed --num_gpus 8 bloom-ds-zero-inference.py --name bigscience/bloom --batch_size 64 --benchmark
[...]



```
Loading