The --ppl (perplexity) mode in tools/quant.c currently prints human-readable text output. For CI pipelines and automated benchmarking, a machine-parseable JSON output mode would be very useful.
What to do:
- Add a
--json flag that can be combined with --ppl.
- When both flags are set, output a JSON object with fields like
{"perplexity": 5.42, "tokens": 1024, "model": "..."} instead of the formatted text.
- Keep the default behavior unchanged when
--json is not specified.
Files to touch: tools/quant.c (argument parsing and PPL output section).
The
--ppl(perplexity) mode intools/quant.ccurrently prints human-readable text output. For CI pipelines and automated benchmarking, a machine-parseable JSON output mode would be very useful.What to do:
--jsonflag that can be combined with--ppl.{"perplexity": 5.42, "tokens": 1024, "model": "..."}instead of the formatted text.--jsonis not specified.Files to touch:
tools/quant.c(argument parsing and PPL output section).