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"use strict";2var __defProp = Object.defineProperty;3var __getOwnPropDesc = Object.getOwnPropertyDescriptor;4var __getOwnPropNames = Object.getOwnPropertyNames;5var __hasOwnProp = Object.prototype.hasOwnProperty;6var __export = (target, all) => {7 for (var name in all)8 __defProp(target, name, { get: all[name], enumerable: true });9};10var __copyProps = (to, from, except, desc) => {11 if (from && typeof from === "object" || typeof from === "function") {12 for (let key of __getOwnPropNames(from))13 if (!__hasOwnProp.call(to, key) && key !== except)14 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });15 }16 return to;17};18var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);19var progress_exports = {};20__export(progress_exports, {21 ProgressController: () => ProgressController,22 isAbortError: () => isAbortError,23 raceUncancellableOperationWithCleanup: () => raceUncancellableOperationWithCleanup24});25module.exports = __toCommonJS(progress_exports);26var import_errors = require("./errors");27var import_utils = require("../utils");28var import_manualPromise = require("../utils/isomorphic/manualPromise");29class ProgressController {30 constructor(metadata, onCallLog) {31 this._forceAbortPromise = new import_manualPromise.ManualPromise();32 this._donePromise = new import_manualPromise.ManualPromise();33 this._state = "before";34 this.metadata = metadata || { id: "", startTime: 0, endTime: 0, type: "Internal", method: "", params: {}, log: [], internal: true };35 this._onCallLog = onCallLog;36 this._forceAbortPromise.catch((e) => null);37 }38 async abort(error) {39 if (this._state === "running") {40 error[kAbortErrorSymbol] = true;41 this._state = { error };42 this._forceAbortPromise.reject(error);43 }44 await this._donePromise;45 }46 async run(task, timeout) {47 (0, import_utils.assert)(this._state === "before");48 this._state = "running";49 const progress = {50 log: (message) => {51 if (this._state === "running")52 this.metadata.log.push(message);53 this._onCallLog?.(message);54 },55 metadata: this.metadata,56 race: (promise) => {57 const promises = Array.isArray(promise) ? promise : [promise];58 return Promise.race([...promises, this._forceAbortPromise]);59 },60 wait: async (timeout2) => {61 let timer2;62 const promise = new Promise((f) => timer2 = setTimeout(f, timeout2));63 return progress.race(promise).finally(() => clearTimeout(timer2));64 }65 };66 let timer;67 if (timeout) {68 const timeoutError = new import_errors.TimeoutError(`Timeout ${timeout}ms exceeded.`);69 timer = setTimeout(() => {70 if (this._state === "running") {71 timeoutError[kAbortErrorSymbol] = true;72 this._state = { error: timeoutError };73 this._forceAbortPromise.reject(timeoutError);74 }75 }, timeout);76 }77 try {78 const result = await task(progress);79 this._state = "finished";80 return result;81 } catch (error) {82 this._state = { error };83 throw error;84 } finally {85 clearTimeout(timer);86 this._donePromise.resolve();87 }88 }89}90const kAbortErrorSymbol = Symbol("kAbortError");91function isAbortError(error) {92 return !!error[kAbortErrorSymbol];93}94async function raceUncancellableOperationWithCleanup(progress, run, cleanup) {95 let aborted = false;96 try {97 return await progress.race(run().then(async (t) => {98 if (aborted)99 await cleanup(t);100 return t;101 }));102 } catch (error) {103 aborted = true;104 throw error;105 }106}107// Annotate the CommonJS export names for ESM import in node:1080 && (module.exports = {109 ProgressController,110 isAbortError,111 raceUncancellableOperationWithCleanup112});113 