Enable fp8e5 harness (#9761)

* fix precision format like fp8e5

* match fp8_e5m2
This commit is contained in:
Chen, Zhentao 2023-12-22 16:59:48 +08:00 committed by GitHub
parent 4c487313f2
commit 7fd7c37e1b

View file

@ -49,7 +49,7 @@ task_to_metric = dict(
)
def parse_precision(precision, model="bigdl-llm"):
result = match(r"([a-zA-Z_]*)(\d+)", precision)
result = match(r"([a-zA-Z_]+)(\d+)([a-zA-Z_\d]*)", precision)
datatype = result.group(1)
bit = int(result.group(2))
if bit >= 16: