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