Skip to content

Profile the Transformers compaction path with torch.profiler #5

Description

@DaBestCode

Identify where the measured single-request Apple M4 overhead comes from before any kernel optimization is proposed.

Acceptance criteria:

  • Add an opt-in profiling script or flag; normal generation must remain unchanged.
  • Profile dense and RandKV runs after warm-up using the same model, prompt, and generation length.
  • Summarize the top CPU/device operators by self time and total time.
  • Record exact hardware, PyTorch, Transformers, model revision, budget, and buffer.
  • Document how to reproduce the profile without checking large trace files into Git.
  • Make no speedup claim and add no runtime dependency to the core package.

A CPU or MPS profile is sufficient for this issue; GPU kernel work is tracked separately.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: evaluationBenchmarks, quality evaluation, and result artifactsgood first issueGood for newcomershelp wantedExtra attention is needed

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions