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
1function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }2function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }3function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }4function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }5function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }6const dedent = createDedent({});7export default dedent;8function createDedent(options) {9 dedent.withOptions = newOptions => createDedent(_objectSpread(_objectSpread({}, options), newOptions));10 return dedent;11 function dedent(strings, ...values) {12 const raw = typeof strings === "string" ? [strings] : strings.raw;13 const {14 alignValues = false,15 escapeSpecialCharacters = Array.isArray(strings),16 trimWhitespace = true17 } = options;18 19 // first, perform interpolation20 let result = "";21 for (let i = 0; i < raw.length; i++) {22 let next = raw[i];23 if (escapeSpecialCharacters) {24 // handle escaped newlines, backticks, and interpolation characters25 next = next.replace(/\\\n[ \t]*/g, "").replace(/\\`/g, "`").replace(/\\\$/g, "$").replace(/\\\{/g, "{");26 }27 result += next;28 if (i < values.length) {29 const value = alignValues ? alignValue(values[i], result) : values[i];30 31 // eslint-disable-next-line @typescript-eslint/restrict-plus-operands32 result += value;33 }34 }35 36 // now strip indentation37 const lines = result.split("\n");38 let mindent = null;39 for (const l of lines) {40 const m = l.match(/^(\s+)\S+/);41 if (m) {42 const indent = m[1].length;43 if (!mindent) {44 // this is the first indented line45 mindent = indent;46 } else {47 mindent = Math.min(mindent, indent);48 }49 }50 }51 if (mindent !== null) {52 const m = mindent; // appease TypeScript53 result = lines54 // https://github.com/typescript-eslint/typescript-eslint/issues/714055 // eslint-disable-next-line @typescript-eslint/prefer-string-starts-ends-with56 .map(l => l[0] === " " || l[0] === "\t" ? l.slice(m) : l).join("\n");57 }58 59 // dedent eats leading and trailing whitespace too60 if (trimWhitespace) {61 result = result.trim();62 }63 64 // Unescape escapes after trimming so sequences like `\n`, `\t`,65 // `\xHH` and `\u{...}` are preserved (fixes #24)66 if (escapeSpecialCharacters) {67 result = result.replace(/\\n/g, "\n").replace(/\\t/g, "\t").replace(/\\r/g, "\r").replace(/\\v/g, "\v").replace(/\\b/g, "\b").replace(/\\f/g, "\f").replace(/\\0/g, "\0").replace(/\\x([\da-fA-F]{2})/g, (_, h) => String.fromCharCode(parseInt(h, 16))).replace(/\\u\{([\da-fA-F]{1,6})\}/g, (_, h) => String.fromCodePoint(parseInt(h, 16))).replace(/\\u([\da-fA-F]{4})/g, (_, h) => String.fromCharCode(parseInt(h, 16)));68 }69 70 // Workaround for Bun issue with Unicode characters71 // https://github.com/oven-sh/bun/issues/874572 if (typeof Bun !== "undefined") {73 result = result.replace(74 // Matches e.g. \\u{1f60a} or \\u5F1F75 /\\u(?:\{([\da-fA-F]{1,6})\}|([\da-fA-F]{4}))/g, (_, braced, unbraced) => {76 var _ref;77 const hex = (_ref = braced !== null && braced !== void 0 ? braced : unbraced) !== null && _ref !== void 0 ? _ref : "";78 return String.fromCodePoint(parseInt(hex, 16));79 });80 }81 return result;82 }83}84 85/**86 * Adjusts the indentation of a multi-line interpolated value to match the current line.87 */88function alignValue(value, precedingText) {89 if (typeof value !== "string" || !value.includes("\n")) {90 return value;91 }92 const currentLine = precedingText.slice(precedingText.lastIndexOf("\n") + 1);93 const indentMatch = currentLine.match(/^(\s+)/);94 if (indentMatch) {95 const indent = indentMatch[1];96 return value.replace(/\n/g, `\n${indent}`);97 }98 return value;99}100 