Brunobkr/llama.cpp_AlgMor24_github
ΩFFFΣLLIa • llama.cpp • AlgMor24 ██████╗ ███████╗███████╗███████╗██╗ ██╗ ██╗ █████╗ ██╔═══██╗██╔════╝██╔════╝██╔════╝██║ ██║ ██║██╔══██╗ ██║ ██║█████╗ █████╗ █████╗ ██║ ██║ ██║███████║ ██║ ██║██╔══╝ ██╔══╝ ██╔══╝ ██║ ██║ ██║██╔══██║ ╚██████╔╝██║ ██║ ███████╗███████╗███████╗██║██║ ██║ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝╚══════╝╚═╝╚═╝ ╚═╝ High-Performance LLM / VLM Inference & Autonomous Agentic Ecosystem… See the full description on the dataset page: https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github.
03.1k
1/**2 * A class that represents each benchmark task in Tinybench. It keeps track of the3 * results, name, Bench instance, the task function and the number times the task4 * function has been executed.5 */6declare class Task extends EventTarget {7 bench: Bench;8 /**9 * task name10 */11 name: string;12 fn: Fn;13 runs: number;14 /**15 * the result object16 */17 result?: TaskResult;18 /**19 * Task options20 */21 opts: FnOptions;22 constructor(bench: Bench, name: string, fn: Fn, opts?: FnOptions);23 private loop;24 /**25 * run the current task and write the results in `Task.result` object26 */27 run(): Promise<this>;28 /**29 * warmup the current task30 */31 warmup(): Promise<void>;32 addEventListener<K extends TaskEvents, T = TaskEventsMap[K]>(type: K, listener: T, options?: AddEventListenerOptionsArgument): void;33 removeEventListener<K extends TaskEvents, T = TaskEventsMap[K]>(type: K, listener: T, options?: RemoveEventListenerOptionsArgument): void;34 /**35 * change the result object values36 */37 setResult(result: Partial<TaskResult>): void;38 /**39 * reset the task to make the `Task.runs` a zero-value and remove the `Task.result`40 * object41 */42 reset(): void;43}44 45/**46 * the task function47 */48type Fn = () => any | Promise<any>;49interface FnOptions {50 /**51 * An optional function that is run before iterations of this task begin52 */53 beforeAll?: (this: Task) => void | Promise<void>;54 /**55 * An optional function that is run before each iteration of this task56 */57 beforeEach?: (this: Task) => void | Promise<void>;58 /**59 * An optional function that is run after each iteration of this task60 */61 afterEach?: (this: Task) => void | Promise<void>;62 /**63 * An optional function that is run after all iterations of this task end64 */65 afterAll?: (this: Task) => void | Promise<void>;66}67/**68 * the benchmark task result object69 */70type TaskResult = {71 error?: unknown;72 /**73 * The amount of time in milliseconds to run the benchmark task (cycle).74 */75 totalTime: number;76 /**77 * the minimum value in the samples78 */79 min: number;80 /**81 * the maximum value in the samples82 */83 max: number;84 /**85 * the number of operations per second86 */87 hz: number;88 /**89 * how long each operation takes (ms)90 */91 period: number;92 /**93 * task samples of each task iteration time (ms)94 */95 samples: number[];96 /**97 * samples mean/average (estimate of the population mean)98 */99 mean: number;100 /**101 * samples variance (estimate of the population variance)102 */103 variance: number;104 /**105 * samples standard deviation (estimate of the population standard deviation)106 */107 sd: number;108 /**109 * standard error of the mean (a.k.a. the standard deviation of the sampling distribution of the sample mean)110 */111 sem: number;112 /**113 * degrees of freedom114 */115 df: number;116 /**117 * critical value of the samples118 */119 critical: number;120 /**121 * margin of error122 */123 moe: number;124 /**125 * relative margin of error126 */127 rme: number;128 /**129 * p75 percentile130 */131 p75: number;132 /**133 * p99 percentile134 */135 p99: number;136 /**137 * p995 percentile138 */139 p995: number;140 /**141 * p999 percentile142 */143 p999: number;144};145/**146 * Both the `Task` and `Bench` objects extend the `EventTarget` object,147 * so you can attach a listeners to different types of events148 * to each class instance using the universal `addEventListener` and149 * `removeEventListener`150 */151/**152 * Bench events153 */154type BenchEvents = 'abort' | 'complete' | 'error' | 'reset' | 'start' | 'warmup' | 'cycle' | 'add' | 'remove' | 'todo';155type Hook = (task: Task, mode: 'warmup' | 'run') => void | Promise<void>;156type NoopEventListener = () => any | Promise<any>;157type TaskEventListener = (e: Event & {158 task: Task;159}) => any | Promise<any>;160interface BenchEventsMap {161 abort: NoopEventListener;162 start: NoopEventListener;163 complete: NoopEventListener;164 warmup: NoopEventListener;165 reset: NoopEventListener;166 add: TaskEventListener;167 remove: TaskEventListener;168 cycle: TaskEventListener;169 error: TaskEventListener;170 todo: TaskEventListener;171}172/**173 * task events174 */175type TaskEvents = 'abort' | 'complete' | 'error' | 'reset' | 'start' | 'warmup' | 'cycle';176type TaskEventsMap = {177 abort: NoopEventListener;178 start: TaskEventListener;179 error: TaskEventListener;180 cycle: TaskEventListener;181 complete: TaskEventListener;182 warmup: TaskEventListener;183 reset: TaskEventListener;184};185type Options = {186 /**187 * time needed for running a benchmark task (milliseconds) @default 500188 */189 time?: number;190 /**191 * number of times that a task should run if even the time option is finished @default 10192 */193 iterations?: number;194 /**195 * function to get the current timestamp in milliseconds196 */197 now?: () => number;198 /**199 * An AbortSignal for aborting the benchmark200 */201 signal?: AbortSignal;202 /**203 * Throw if a task fails (events will not work if true)204 */205 throws?: boolean;206 /**207 * warmup time (milliseconds) @default 100ms208 */209 warmupTime?: number;210 /**211 * warmup iterations @default 5212 */213 warmupIterations?: number;214 /**215 * setup function to run before each benchmark task (cycle)216 */217 setup?: Hook;218 /**219 * teardown function to run after each benchmark task (cycle)220 */221 teardown?: Hook;222};223type BenchEvent = Event & {224 task: Task | null;225};226type RemoveEventListenerOptionsArgument = Parameters<typeof EventTarget.prototype.removeEventListener>[2];227type AddEventListenerOptionsArgument = Parameters<typeof EventTarget.prototype.addEventListener>[2];228 229/**230 * The Benchmark instance for keeping track of the benchmark tasks and controlling231 * them.232 */233declare class Bench extends EventTarget {234 _tasks: Map<string, Task>;235 _todos: Map<string, Task>;236 /**237 * Executes tasks concurrently based on the specified concurrency mode.238 *239 * - When `mode` is set to `null` (default), concurrency is disabled.240 * - When `mode` is set to 'task', each task's iterations (calls of a task function) run concurrently.241 * - When `mode` is set to 'bench', different tasks within the bench run concurrently.242 */243 concurrency: 'task' | 'bench' | null;244 /**245 * The maximum number of concurrent tasks to run. Defaults to Infinity.246 */247 threshold: number;248 signal?: AbortSignal;249 throws: boolean;250 warmupTime: number;251 warmupIterations: number;252 time: number;253 iterations: number;254 now: () => number;255 setup: Hook;256 teardown: Hook;257 constructor(options?: Options);258 private runTask;259 /**260 * run the added tasks that were registered using the261 * {@link add} method.262 * Note: This method does not do any warmup. Call {@link warmup} for that.263 */264 run(): Promise<Task[]>;265 /**266 * See Bench.{@link concurrency}267 */268 runConcurrently(threshold?: number, mode?: NonNullable<Bench['concurrency']>): Promise<Task[]>;269 /**270 * warmup the benchmark tasks.271 * This is not run by default by the {@link run} method.272 */273 warmup(): Promise<void>;274 /**275 * warmup the benchmark tasks concurrently.276 * This is not run by default by the {@link runConcurrently} method.277 */278 warmupConcurrently(threshold?: number, mode?: NonNullable<Bench['concurrency']>): Promise<void>;279 /**280 * reset each task and remove its result281 */282 reset(): void;283 /**284 * add a benchmark task to the task map285 */286 add(name: string, fn: Fn, opts?: FnOptions): this;287 /**288 * add a benchmark todo to the todo map289 */290 todo(name: string, fn?: Fn, opts?: FnOptions): this;291 /**292 * remove a benchmark task from the task map293 */294 remove(name: string): this;295 addEventListener<K extends BenchEvents, T = BenchEventsMap[K]>(type: K, listener: T, options?: AddEventListenerOptionsArgument): void;296 removeEventListener<K extends BenchEvents, T = BenchEventsMap[K]>(type: K, listener: T, options?: RemoveEventListenerOptionsArgument): void;297 /**298 * table of the tasks results299 */300 table(convert?: (task: Task) => Record<string, string | number> | undefined): (Record<string, string | number> | null)[];301 /**302 * (getter) tasks results as an array303 */304 get results(): (TaskResult | undefined)[];305 /**306 * (getter) tasks as an array307 */308 get tasks(): Task[];309 get todos(): Task[];310 /**311 * get a task based on the task name312 */313 getTask(name: string): Task | undefined;314}315 316declare const hrtimeNow: () => number;317declare const now: () => number;318 319export { Bench, type BenchEvent, type BenchEvents, type Fn, type Hook, type Options, Task, type TaskEvents, type TaskResult, hrtimeNow, now };320 