Team Ai
Datasetpublic

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.

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes3.1kdownloads
index.js561 linesDownload Raw Back to dist
1var $ = Object.defineProperty;2var C = (s) => {3  throw TypeError(s);4};5var D = (s, n, t) => n in s ? $(s, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[n] = t;6var O = (s, n, t) => D(s, typeof n != "symbol" ? n + "" : n, t), q = (s, n, t) => n.has(s) || C("Cannot " + t);7var d = (s, n, t) => (q(s, n, "read from private field"), t ? t.call(s) : n.get(s)), k = (s, n, t) => n.has(s) ? C("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(s) : n.set(s, t), f = (s, n, t, e) => (q(s, n, "write to private field"), e ? e.call(s, t) : n.set(s, t), t);8var F = (s, n, t, e) => ({9  set _(r) {10    f(s, n, r, t);11  },12  get _() {13    return d(s, n, e);14  }15});16 17// node_modules/.pnpm/yocto-queue@1.0.0/node_modules/yocto-queue/index.js18var M = class {19  constructor(n) {20    O(this, "value");21    O(this, "next");22    this.value = n;23  }24}, m, w, E, g = class {25  constructor() {26    k(this, m);27    k(this, w);28    k(this, E);29    this.clear();30  }31  enqueue(n) {32    let t = new M(n);33    d(this, m) ? (d(this, w).next = t, f(this, w, t)) : (f(this, m, t), f(this, w, t)), F(this, E)._++;34  }35  dequeue() {36    let n = d(this, m);37    if (n)38      return f(this, m, d(this, m).next), F(this, E)._--, n.value;39  }40  clear() {41    f(this, m, void 0), f(this, w, void 0), f(this, E, 0);42  }43  get size() {44    return d(this, E);45  }46  *[Symbol.iterator]() {47    let n = d(this, m);48    for (; n; )49      yield n.value, n = n.next;50  }51};52m = new WeakMap(), w = new WeakMap(), E = new WeakMap();53 54// node_modules/.pnpm/p-limit@4.0.0/node_modules/p-limit/index.js55function y(s) {56  if (!((Number.isInteger(s) || s === Number.POSITIVE_INFINITY) && s > 0))57    throw new TypeError("Expected `concurrency` to be a number from 1 and up");58  let n = new g(), t = 0, e = () => {59    t--, n.size > 0 && n.dequeue()();60  }, r = async (h, p, a) => {61    t++;62    let l = (async () => h(...a))();63    p(l);64    try {65      await l;66    } catch (T) {67    }68    e();69  }, i = (h, p, a) => {70    n.enqueue(r.bind(void 0, h, p, a)), (async () => (await Promise.resolve(), t < s && n.size > 0 && n.dequeue()()))();71  }, c = (h, ...p) => new Promise((a) => {72    i(h, a, p);73  });74  return Object.defineProperties(c, {75    activeCount: {76      get: () => t77    },78    pendingCount: {79      get: () => n.size80    },81    clearQueue: {82      value: () => {83        n.clear();84      }85    }86  }), c;87}88 89// src/event.ts90function o(s, n = null) {91  let t = new Event(s);92  return n && Object.defineProperty(t, "task", {93    value: n,94    enumerable: !0,95    writable: !1,96    configurable: !197  }), t;98}99 100// src/constants.ts101var G = {102  1: 12.71,103  2: 4.303,104  3: 3.182,105  4: 2.776,106  5: 2.571,107  6: 2.447,108  7: 2.365,109  8: 2.306,110  9: 2.262,111  10: 2.228,112  11: 2.201,113  12: 2.179,114  13: 2.16,115  14: 2.145,116  15: 2.131,117  16: 2.12,118  17: 2.11,119  18: 2.101,120  19: 2.093,121  20: 2.086,122  21: 2.08,123  22: 2.074,124  23: 2.069,125  24: 2.064,126  25: 2.06,127  26: 2.056,128  27: 2.052,129  28: 2.048,130  29: 2.045,131  30: 2.042,132  31: 2.0399,133  32: 2.0378,134  33: 2.0357,135  34: 2.0336,136  35: 2.0315,137  36: 2.0294,138  37: 2.0273,139  38: 2.0252,140  39: 2.0231,141  40: 2.021,142  41: 2.0198,143  42: 2.0186,144  43: 2.0174,145  44: 2.0162,146  45: 2.015,147  46: 2.0138,148  47: 2.0126,149  48: 2.0114,150  49: 2.0102,151  50: 2.009,152  51: 2.0081,153  52: 2.0072,154  53: 2.0063,155  54: 2.0054,156  55: 2.0045,157  56: 2.0036,158  57: 2.0027,159  58: 2.0018,160  59: 2.0009,161  60: 2,162  61: 1.9995,163  62: 1.999,164  63: 1.9985,165  64: 1.998,166  65: 1.9975,167  66: 1.997,168  67: 1.9965,169  68: 1.996,170  69: 1.9955,171  70: 1.995,172  71: 1.9945,173  72: 1.994,174  73: 1.9935,175  74: 1.993,176  75: 1.9925,177  76: 1.992,178  77: 1.9915,179  78: 1.991,180  79: 1.9905,181  80: 1.99,182  81: 1.9897,183  82: 1.9894,184  83: 1.9891,185  84: 1.9888,186  85: 1.9885,187  86: 1.9882,188  87: 1.9879,189  88: 1.9876,190  89: 1.9873,191  90: 1.987,192  91: 1.9867,193  92: 1.9864,194  93: 1.9861,195  94: 1.9858,196  95: 1.9855,197  96: 1.9852,198  97: 1.9849,199  98: 1.9846,200  99: 1.9843,201  100: 1.984,202  101: 1.9838,203  102: 1.9836,204  103: 1.9834,205  104: 1.9832,206  105: 1.983,207  106: 1.9828,208  107: 1.9826,209  108: 1.9824,210  109: 1.9822,211  110: 1.982,212  111: 1.9818,213  112: 1.9816,214  113: 1.9814,215  114: 1.9812,216  115: 1.9819,217  116: 1.9808,218  117: 1.9806,219  118: 1.9804,220  119: 1.9802,221  120: 1.98,222  infinity: 1.96223}, N = G;224 225// src/utils.ts226var J = (s) => s / 1e6, U = () => J(Number(process.hrtime.bigint())), B = () => performance.now();227function W(s) {228  return s !== null && typeof s == "object" && typeof s.then == "function";229}230var S = (s, n) => s.reduce((e, r) => e + (r - n) ** 2, 0) / (s.length - 1) || 0, X = (async () => {231}).constructor, Z = (s) => s.constructor === X, z = async (s) => {232  if (Z(s.fn))233    return !0;234  try {235    if (s.opts.beforeEach != null)236      try {237        await s.opts.beforeEach.call(s);238      } catch (e) {239      }240    let n = s.fn(), t = W(n);241    if (t)242      try {243        await n;244      } catch (e) {245      }246    if (s.opts.afterEach != null)247      try {248        await s.opts.afterEach.call(s);249      } catch (e) {250      }251    return t;252  } catch (n) {253    return !1;254  }255};256 257// src/task.ts258var b = class extends EventTarget {259  constructor(t, e, r, i = {}) {260    super();261    /*262     * the number of times the task263     * function has been executed264     */265    this.runs = 0;266    this.bench = t, this.name = e, this.fn = r, this.opts = i;267  }268  async loop(t, e) {269    var T;270    let r = this.bench.concurrency === "task", { threshold: i } = this.bench, c = 0, h = [];271    if (this.opts.beforeAll != null)272      try {273        await this.opts.beforeAll.call(this);274      } catch (u) {275        return { error: u };276      }277    let p = await z(this), a = async () => {278      this.opts.beforeEach != null && await this.opts.beforeEach.call(this);279      let u = 0;280      if (p) {281        let v = this.bench.now();282        await this.fn.call(this), u = this.bench.now() - v;283      } else {284        let v = this.bench.now();285        this.fn.call(this), u = this.bench.now() - v;286      }287      h.push(u), c += u, this.opts.afterEach != null && await this.opts.afterEach.call(this);288    }, l = y(i);289    try {290      let u = [];291      for (; (c < t || h.length + l.activeCount + l.pendingCount < e) && !((T = this.bench.signal) != null && T.aborted); )292        r ? u.push(l(a)) : await a();293      u.length && await Promise.all(u);294    } catch (u) {295      return { error: u };296    }297    if (this.opts.afterAll != null)298      try {299        await this.opts.afterAll.call(this);300      } catch (u) {301        return { error: u };302      }303    return { samples: h };304  }305  /**306   * run the current task and write the results in `Task.result` object307   */308  async run() {309    var r, i;310    if ((r = this.result) != null && r.error)311      return this;312    this.dispatchEvent(o("start", this)), await this.bench.setup(this, "run");313    let { samples: t, error: e } = await this.loop(this.bench.time, this.bench.iterations);314    if (this.bench.teardown(this, "run"), t) {315      let c = t.reduce((L, A) => L + A, 0);316      this.runs = t.length, t.sort((L, A) => L - A);317      let h = c / this.runs, p = 1e3 / h, a = t.length, l = a - 1, T = t[0], u = t[l], v = c / t.length || 0, P = S(t, v), R = Math.sqrt(P), I = R / Math.sqrt(a), _ = N[String(Math.round(l) || 1)] || N.infinity, K = I * _, j = K / v * 100, H = t[Math.ceil(a * 0.75) - 1], V = t[Math.ceil(a * 0.99) - 1], Q = t[Math.ceil(a * 0.995) - 1], Y = t[Math.ceil(a * 0.999) - 1];318      if ((i = this.bench.signal) != null && i.aborted)319        return this;320      this.setResult({321        totalTime: c,322        min: T,323        max: u,324        hz: p,325        period: h,326        samples: t,327        mean: v,328        variance: P,329        sd: R,330        sem: I,331        df: l,332        critical: _,333        moe: K,334        rme: j,335        p75: H,336        p99: V,337        p995: Q,338        p999: Y339      });340    }341    if (e) {342      if (this.setResult({ error: e }), this.bench.throws)343        throw e;344      this.dispatchEvent(o("error", this)), this.bench.dispatchEvent(o("error", this));345    }346    return this.dispatchEvent(o("cycle", this)), this.bench.dispatchEvent(o("cycle", this)), this.dispatchEvent(o("complete", this)), this;347  }348  /**349   * warmup the current task350   */351  async warmup() {352    var e;353    if ((e = this.result) != null && e.error)354      return;355    this.dispatchEvent(o("warmup", this)), await this.bench.setup(this, "warmup");356    let { error: t } = await this.loop(this.bench.warmupTime, this.bench.warmupIterations);357    if (this.bench.teardown(this, "warmup"), t && (this.setResult({ error: t }), this.bench.throws))358      throw t;359  }360  addEventListener(t, e, r) {361    super.addEventListener(t, e, r);362  }363  removeEventListener(t, e, r) {364    super.removeEventListener(t, e, r);365  }366  /**367   * change the result object values368   */369  setResult(t) {370    this.result = { ...this.result, ...t }, Object.freeze(this.result);371  }372  /**373   * reset the task to make the `Task.runs` a zero-value and remove the `Task.result`374   * object375   */376  reset() {377    this.dispatchEvent(o("reset", this)), this.runs = 0, this.result = void 0;378  }379};380 381// src/bench.ts382var x = class extends EventTarget {383  constructor(t = {}) {384    var e, r, i, c, h, p, a, l;385    super();386    /*387     * @private the task map388     */389    this._tasks = /* @__PURE__ */ new Map();390    this._todos = /* @__PURE__ */ new Map();391    /**392    * Executes tasks concurrently based on the specified concurrency mode.393    *394    * - When `mode` is set to `null` (default), concurrency is disabled.395    * - When `mode` is set to 'task', each task's iterations (calls of a task function) run concurrently.396    * - When `mode` is set to 'bench', different tasks within the bench run concurrently.397    */398    this.concurrency = null;399    /**400     * The maximum number of concurrent tasks to run. Defaults to Infinity.401     */402    this.threshold = 1 / 0;403    this.warmupTime = 100;404    this.warmupIterations = 5;405    this.time = 500;406    this.iterations = 10;407    this.now = B;408    this.now = (e = t.now) != null ? e : this.now, this.warmupTime = (r = t.warmupTime) != null ? r : this.warmupTime, this.warmupIterations = (i = t.warmupIterations) != null ? i : this.warmupIterations, this.time = (c = t.time) != null ? c : this.time, this.iterations = (h = t.iterations) != null ? h : this.iterations, this.signal = t.signal, this.throws = (p = t.throws) != null ? p : !1, this.setup = (a = t.setup) != null ? a : () => {409    }, this.teardown = (l = t.teardown) != null ? l : () => {410    }, this.signal && this.signal.addEventListener(411      "abort",412      () => {413        this.dispatchEvent(o("abort"));414      },415      { once: !0 }416    );417  }418  runTask(t) {419    var e;420    return (e = this.signal) != null && e.aborted ? t : t.run();421  }422  /**423   * run the added tasks that were registered using the424   * {@link add} method.425   * Note: This method does not do any warmup. Call {@link warmup} for that.426   */427  async run() {428    if (this.concurrency === "bench")429      return this.runConcurrently(this.threshold, this.concurrency);430    this.dispatchEvent(o("start"));431    let t = [];432    for (let e of [...this._tasks.values()])433      t.push(await this.runTask(e));434    return this.dispatchEvent(o("complete")), t;435  }436  /**437   * See Bench.{@link concurrency}438   */439  async runConcurrently(t = 1 / 0, e = "bench") {440    if (this.threshold = t, this.concurrency = e, e === "task")441      return this.run();442    this.dispatchEvent(o("start"));443    let r = y(t), i = [];444    for (let h of [...this._tasks.values()])445      i.push(r(() => this.runTask(h)));446    let c = await Promise.all(i);447    return this.dispatchEvent(o("complete")), c;448  }449  /**450   * warmup the benchmark tasks.451   * This is not run by default by the {@link run} method.452   */453  async warmup() {454    if (this.concurrency === "bench") {455      await this.warmupConcurrently(this.threshold, this.concurrency);456      return;457    }458    this.dispatchEvent(o("warmup"));459    for (let [, t] of this._tasks)460      await t.warmup();461  }462  /**463   * warmup the benchmark tasks concurrently.464   * This is not run by default by the {@link runConcurrently} method.465   */466  async warmupConcurrently(t = 1 / 0, e = "bench") {467    if (this.threshold = t, this.concurrency = e, e === "task") {468      await this.warmup();469      return;470    }471    this.dispatchEvent(o("warmup"));472    let r = y(t), i = [];473    for (let [, c] of this._tasks)474      i.push(r(() => c.warmup()));475    await Promise.all(i);476  }477  /**478   * reset each task and remove its result479   */480  reset() {481    this.dispatchEvent(o("reset")), this._tasks.forEach((t) => {482      t.reset();483    });484  }485  /**486   * add a benchmark task to the task map487   */488  add(t, e, r = {}) {489    let i = new b(this, t, e, r);490    return this._tasks.set(t, i), this.dispatchEvent(o("add", i)), this;491  }492  /**493   * add a benchmark todo to the todo map494   */495  // eslint-disable-next-line @typescript-eslint/no-empty-function496  todo(t, e = () => {497  }, r = {}) {498    let i = new b(this, t, e, r);499    return this._todos.set(t, i), this.dispatchEvent(o("todo", i)), this;500  }501  /**502   * remove a benchmark task from the task map503   */504  remove(t) {505    let e = this.getTask(t);506    return e && (this.dispatchEvent(o("remove", e)), this._tasks.delete(t)), this;507  }508  addEventListener(t, e, r) {509    super.addEventListener(t, e, r);510  }511  removeEventListener(t, e, r) {512    super.removeEventListener(t, e, r);513  }514  /**515   * table of the tasks results516   */517  table(t) {518    return this.tasks.map((e) => {519      if (e.result) {520        if (e.result.error)521          throw e.result.error;522        return (t == null ? void 0 : t(e)) || {523          "Task Name": e.name,524          "ops/sec": e.result.error ? "NaN" : parseInt(e.result.hz.toString(), 10).toLocaleString(),525          "Average Time (ns)": e.result.error ? "NaN" : e.result.mean * 1e3 * 1e3,526          Margin: e.result.error ? "NaN" : `\xB1${e.result.rme.toFixed(2)}%`,527          Samples: e.result.error ? "NaN" : e.result.samples.length528        };529      }530      return null;531    });532  }533  /**534   * (getter) tasks results as an array535   */536  get results() {537    return [...this._tasks.values()].map((t) => t.result);538  }539  /**540   * (getter) tasks as an array541   */542  get tasks() {543    return [...this._tasks.values()];544  }545  get todos() {546    return [...this._todos.values()];547  }548  /**549   * get a task based on the task name550   */551  getTask(t) {552    return this._tasks.get(t);553  }554};555export {556  x as Bench,557  b as Task,558  U as hrtimeNow,559  B as now560};561 
Brunobkr/llama.cpp_AlgMor24_github · Team Ai