forked from ModelCloud/GPTQModel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add torch inference benchmark * add torch benchmark test * code review * code review * update model path * code clean up * update torch value * code clean * code clean * code opt * code opt * code refactor * code opt * add other test * update model * add d_type * fix torch dtype * rm dtype * cleanup * cleanup * code opt * code clean up * update model id * update code * update score --------- Co-authored-by: LRL-ModelCloud <[email protected]>
- Loading branch information
1 parent
33791ce
commit 94a3911
Showing
2 changed files
with
21 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from benchmark_test import BenchmarkTest | ||
from gptqmodel import BACKEND | ||
from parameterized import parameterized # noqa: E402 | ||
|
||
|
||
class TestInference(BenchmarkTest): | ||
@parameterized.expand( | ||
[ | ||
(BACKEND.TORCH, 'cuda', 292.50), | ||
(BACKEND.TORCH, 'cpu', 5.50), | ||
(BACKEND.TORCH, 'xpu', 58.20), | ||
(BACKEND.TORCH, 'mps', 3.40), | ||
] | ||
) | ||
def test_inference(self, backend, device, tokens_per_second): | ||
if device == 'mps': | ||
self.skipTest(f"MacOS env skip") | ||
self.benchmark(backend=backend, device=device, tokens_per_second=tokens_per_second) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters