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
1import * as path from "node:path";2function isNodeLike(value) {3 return typeof (value === null || value === void 0 ? void 0 : value.type) === "string";4}5function visit(ast, callbackMap) {6 function _visit(node, path, meta) {7 if (typeof callbackMap === "function") {8 if (callbackMap(node, path, meta) === false) return;9 } else if (node.type in callbackMap) {10 if (callbackMap[node.type](node, path, meta) === false) return;11 }12 const keys = Object.keys(node);13 for (let i = 0; i < keys.length; i++) {14 const child = node[keys[i]];15 if (Array.isArray(child)) {16 for (let j = 0; j < child.length; j++) if (isNodeLike(child[j])) {17 let newMeta = { ...meta };18 let newPath = [{19 node: child[j],20 parent: node,21 key: keys[i],22 index: j,23 meta: newMeta24 }, ...path];25 _visit(child[j], newPath, newMeta);26 }27 } else if (isNodeLike(child)) {28 let newMeta = { ...meta };29 _visit(child, [{30 node: child,31 parent: node,32 key: keys[i],33 index: i,34 meta: newMeta35 }, ...path], newMeta);36 }37 }38 }39 let newMeta = {};40 _visit(ast, [{41 node: ast,42 parent: null,43 key: null,44 index: null,45 meta: newMeta46 }], newMeta);47}48function spliceChangesIntoString(str, changes) {49 if (!changes[0]) return str;50 changes.sort((a, b) => {51 return a.end - b.end || a.start - b.start;52 });53 let result = "";54 let previous = changes[0];55 result += str.slice(0, previous.start);56 result += previous.after;57 for (let i = 1; i < changes.length; ++i) {58 let change = changes[i];59 result += str.slice(previous.end, change.start);60 result += change.after;61 previous = change;62 }63 result += str.slice(previous.end);64 return result;65}66function bigSign(bigIntValue) {67 return Number(bigIntValue > 0n) - Number(bigIntValue < 0n);68}69function cacheForDirs(cache, inputDir, value, targetDir, makeKey = (dir) => dir) {70 let dir = inputDir;71 while (dir !== path.dirname(dir) && dir.length >= targetDir.length) {72 const key = makeKey(dir);73 if (cache.get(key) !== void 0) break;74 cache.set(key, value);75 if (dir === targetDir) break;76 dir = path.dirname(dir);77 }78}79export { visit as i, cacheForDirs as n, spliceChangesIntoString as r, bigSign as t };80 