MoonshotAI / MoonshotAI/FlashKDA

Add random seed to bench_fwd.py for reproducible benchmarks

Open Beginner friendly
#22 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Cuda
Stars
1.3k
Forks
122
PR merge metrics
No merged PRs in 30d

Description

Problem

bench_fwd.py generates random inputs on every run with no seed control, making benchmarks non-reproducible across runs. This makes it difficult to compare performance across commits or verify optimization improvements.

Recommendation

Add at the top of the benchmark script:

torch.manual_seed(42)

Impact

Reproducibility. Ensures benchmark results are comparable across runs and commits.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open bench_fwd.py and locate where random benchmark inputs are generated. Add the specified torch seed at the top of the script, then run the benchmark twice to verify that input generation is reproducible across runs.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
performance
Issue type
Feature
Difficulty
1/5
Estimated time
Under an hour
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
88/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.