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';2 3Object.defineProperty(exports, '__esModule', { value: true });4 5var wrapIdbValue = require('./wrap-idb-value.cjs');6 7/**8 * Open a database.9 *10 * @param name Name of the database.11 * @param version Schema version.12 * @param callbacks Additional callbacks.13 */14function openDB(name, version, { blocked, upgrade, blocking, terminated } = {}) {15 const request = indexedDB.open(name, version);16 const openPromise = wrapIdbValue.wrap(request);17 if (upgrade) {18 request.addEventListener('upgradeneeded', (event) => {19 upgrade(wrapIdbValue.wrap(request.result), event.oldVersion, event.newVersion, wrapIdbValue.wrap(request.transaction), event);20 });21 }22 if (blocked) {23 request.addEventListener('blocked', (event) => blocked(24 // Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/140525 event.oldVersion, event.newVersion, event));26 }27 openPromise28 .then((db) => {29 if (terminated)30 db.addEventListener('close', () => terminated());31 if (blocking) {32 db.addEventListener('versionchange', (event) => blocking(event.oldVersion, event.newVersion, event));33 }34 })35 .catch(() => { });36 return openPromise;37}38/**39 * Delete a database.40 *41 * @param name Name of the database.42 */43function deleteDB(name, { blocked } = {}) {44 const request = indexedDB.deleteDatabase(name);45 if (blocked) {46 request.addEventListener('blocked', (event) => blocked(47 // Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/140548 event.oldVersion, event));49 }50 return wrapIdbValue.wrap(request).then(() => undefined);51}52 53const readMethods = ['get', 'getKey', 'getAll', 'getAllKeys', 'count'];54const writeMethods = ['put', 'add', 'delete', 'clear'];55const cachedMethods = new Map();56function getMethod(target, prop) {57 if (!(target instanceof IDBDatabase &&58 !(prop in target) &&59 typeof prop === 'string')) {60 return;61 }62 if (cachedMethods.get(prop))63 return cachedMethods.get(prop);64 const targetFuncName = prop.replace(/FromIndex$/, '');65 const useIndex = prop !== targetFuncName;66 const isWrite = writeMethods.includes(targetFuncName);67 if (68 // Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.69 !(targetFuncName in (useIndex ? IDBIndex : IDBObjectStore).prototype) ||70 !(isWrite || readMethods.includes(targetFuncName))) {71 return;72 }73 const method = async function (storeName, ...args) {74 // isWrite ? 'readwrite' : undefined gzipps better, but fails in Edge :(75 const tx = this.transaction(storeName, isWrite ? 'readwrite' : 'readonly');76 let target = tx.store;77 if (useIndex)78 target = target.index(args.shift());79 // Must reject if op rejects.80 // If it's a write operation, must reject if tx.done rejects.81 // Must reject with op rejection first.82 // Must resolve with op value.83 // Must handle both promises (no unhandled rejections)84 return (await Promise.all([85 target[targetFuncName](...args),86 isWrite && tx.done,87 ]))[0];88 };89 cachedMethods.set(prop, method);90 return method;91}92wrapIdbValue.replaceTraps((oldTraps) => ({93 ...oldTraps,94 get: (target, prop, receiver) => getMethod(target, prop) || oldTraps.get(target, prop, receiver),95 has: (target, prop) => !!getMethod(target, prop) || oldTraps.has(target, prop),96}));97 98exports.unwrap = wrapIdbValue.unwrap;99exports.wrap = wrapIdbValue.wrap;100exports.deleteDB = deleteDB;101exports.openDB = openDB;102 