add plotting files
This commit is contained in:
parent
da53236bf3
commit
97c809448f
2 changed files with 29 additions and 0 deletions
6
benchmark.sh
Executable file
6
benchmark.sh
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
for ngl in {0..35}
|
||||
do
|
||||
./main --model models/nvme/llama-7b-ggml-q4_0.bin --seed 1337 --ignore-eos --n-predict 128 --ctx-size 2048 --threads 8 -ngl $ngl -mmq
|
||||
done
|
23
plot_ts_per_ngl.py
Normal file
23
plot_ts_per_ngl.py
Normal file
|
@ -0,0 +1,23 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import sqlite3
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
con = sqlite3.connect("llama.sqlite")
|
||||
cur = con.cursor()
|
||||
|
||||
ts = []
|
||||
|
||||
for ngl in range(0, 36):
|
||||
res = cur.execute(f"SELECT t_eval_us,n_eval FROM llama_runs WHERE n_gpu_layers={ngl};")
|
||||
t_eval_us, n_eval = res.fetchone()
|
||||
ts.append(n_eval * 1000000/t_eval_us)
|
||||
|
||||
plt.plot(ts)
|
||||
plt.xlim(0, 35)
|
||||
plt.ylim(0, 130)
|
||||
plt.title("7b q4_0, 3700X, 3200 MHz dual-channel RAM, RTX 3090")
|
||||
plt.xlabel("-ngl")
|
||||
plt.ylabel("Generated t/s")
|
||||
plt.savefig("benchmark.png", dpi=240)
|
||||
plt.show()
|
Loading…
Add table
Add a link
Reference in a new issue