diff --git a/README.md b/README.md index 9b49a76..4571398 100755 --- a/README.md +++ b/README.md @@ -51,12 +51,21 @@ Run the example: python example-cpu.py ``` +### Some measurements + +Running the model on Windows computer equipped with 12700k, fast nvme and 128 Gb of RAM. + +| Model | RAM usage fp32 | RAM usage bf16 | fp32 inference | bf16 inference | +| ------------- | ------------- | ------------- | ------------- | ------------- | +| 7B | 44 Gb | 22 Gb | 170 seconds | 850 seconds | +| 13B | 77 Gb, peak to 100 Gb | 380 seconds | can't handle to wait | + ### RAM usage optimization By default, torch uses Float32 precision while running on CPU, that leads, for example, to using 44 GB of RAM for 7B model. We may use Bfloat16 precision on CPU too, which decreases RAM consumption/2, down to 22 GB for 7B model, but inference processing much slower. Uncomment this line in the example-cpu.py to enable Bfloat16 and save memory. ``` -# torch.set_default_dtype(torch.bfloat16) +torch.set_default_dtype(torch.bfloat16) ``` ### Model Card