removed main.exe to reduce clutter, added support for rep pen in gptj

This commit is contained in:
Concedo 2023-04-04 20:43:13 +08:00
parent 9c0dbbb08b
commit 52de932842
11 changed files with 46 additions and 22 deletions

View file

@ -11,16 +11,19 @@
#include "model_adapter.h"
static clock_t bench_timer = 0;
#include <chrono>
static auto bench_timer = std::chrono::high_resolution_clock().now();
void timer_start()
{
bench_timer = clock();
bench_timer = std::chrono::high_resolution_clock().now();
}
double timer_check()
{
double ticks = clock() - bench_timer;
double time_taken = ((double)ticks) / CLOCKS_PER_SEC;
auto endtime = std::chrono::high_resolution_clock().now();
auto duration = std::chrono::duration_cast<std::chrono::milliseconds>(endtime - bench_timer);
double time_taken = duration.count()/1000.0;
return time_taken;
}