-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add detokenization metric; refactor split to perf_conter & perf_metrics
- Loading branch information
1 parent
f0e4190
commit 7cab496
Showing
15 changed files
with
282 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
// Copyright (C) 2023-2024 Intel Corporation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
#pragma once | ||
|
||
#include <chrono> | ||
#include "openvino/genai/visibility.hpp" | ||
#include <vector> | ||
#include <memory> | ||
|
||
namespace ov { | ||
namespace genai { | ||
|
||
using TimePoint = std::chrono::steady_clock::time_point; | ||
|
||
struct PerfCounters; | ||
|
||
struct OPENVINO_GENAI_EXPORTS PerfMetrics { | ||
// First token time. | ||
float mean_ttft; | ||
float std_ttft; | ||
|
||
// Time per output token. | ||
float mean_tpot; | ||
float std_tpot; | ||
|
||
float load_time; | ||
float start_time; | ||
|
||
float mean_generate_duration; | ||
float mean_decoding_duration; | ||
float mean_encoding_duration; | ||
|
||
float mean_throughput; | ||
float std_throughput; | ||
|
||
size_t num_generated_tokens; | ||
size_t num_input_tokens; | ||
|
||
std::shared_ptr<PerfCounters> m_counters; | ||
void evaluate(TimePoint start_time); | ||
|
||
PerfMetrics operator+(const PerfMetrics& metrics) const; | ||
PerfMetrics& operator+=(const PerfMetrics& right); | ||
|
||
|
||
}; | ||
|
||
} // namespace genai | ||
} // namespace ov |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.