mlc-ai / mlc-llm

Universal LLM Deployment Engine with ML Compilation
https://llm.mlc.ai/
Apache License 2.0
19.26k stars 1.58k forks source link

[Metric] Fix the devision-by-zero in spec-decode metrics #2959

Closed MasterJH5574 closed 1 month ago

MasterJH5574 commented 1 month ago

This PR fixes the metrics serialization where the division-by-zero may happen, producing "nan" in the serialized string and failing JSON parsing.