Skip to content

Conversation

@googs1025
Copy link
Contributor

No description provided.

…trics

Signed-off-by: CYJiang <googs1025@gmail.com>
@googs1025
Copy link
Contributor Author

var promptTotal int64
s.initFakeHistogram(s.metrics.requestPromptTokens, buckets, s.config.FakeMetrics.RequestPromptTokens)
for _, v := range s.config.FakeMetrics.RequestPromptTokens {
promptTotal += int64(v)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Values in the FakeMetrics.RequestPromptTokens means number of requests for each bucket. Summarizing all values in the array gives number of requests and not number of tokens.
Same for RequestGenerationTokens.
I would add an additional field for total number of tokens and support 2 cases:

  • if user defined the total number of tokens - use it
  • if total number of tokens is not defined - use middle value of each bucket * number of requests in this bucket for total number of tokens calculation.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants