Skip to content

Add --json output mode for PPL measurement #8

@unamedkr

Description

@unamedkr

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions