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 toArr(any) {2 return any == null ? [] : Array.isArray(any) ? any : [any];3}4 5function toVal(out, key, val, opts) {6 var x, old=out[key], nxt=(7 !!~opts.string.indexOf(key) ? (val == null || val === true ? '' : String(val))8 : typeof val === 'boolean' ? val9 : !!~opts.boolean.indexOf(key) ? (val === 'false' ? false : val === 'true' || (out._.push((x = +val,x * 0 === 0) ? x : val),!!val))10 : (x = +val,x * 0 === 0) ? x : val11 );12 out[key] = old == null ? nxt : (Array.isArray(old) ? old.concat(nxt) : [old, nxt]);13}14 15module.exports = function (args, opts) {16 args = args || [];17 opts = opts || {};18 19 var k, arr, arg, name, val, out={ _:[] };20 var i=0, j=0, idx=0, len=args.length;21 22 const alibi = opts.alias !== void 0;23 const strict = opts.unknown !== void 0;24 const defaults = opts.default !== void 0;25 26 opts.alias = opts.alias || {};27 opts.string = toArr(opts.string);28 opts.boolean = toArr(opts.boolean);29 30 if (alibi) {31 for (k in opts.alias) {32 arr = opts.alias[k] = toArr(opts.alias[k]);33 for (i=0; i < arr.length; i++) {34 (opts.alias[arr[i]] = arr.concat(k)).splice(i, 1);35 }36 }37 }38 39 for (i=opts.boolean.length; i-- > 0;) {40 arr = opts.alias[opts.boolean[i]] || [];41 for (j=arr.length; j-- > 0;) opts.boolean.push(arr[j]);42 }43 44 for (i=opts.string.length; i-- > 0;) {45 arr = opts.alias[opts.string[i]] || [];46 for (j=arr.length; j-- > 0;) opts.string.push(arr[j]);47 }48 49 if (defaults) {50 for (k in opts.default) {51 name = typeof opts.default[k];52 arr = opts.alias[k] = opts.alias[k] || [];53 if (opts[name] !== void 0) {54 opts[name].push(k);55 for (i=0; i < arr.length; i++) {56 opts[name].push(arr[i]);57 }58 }59 }60 }61 62 const keys = strict ? Object.keys(opts.alias) : [];63 64 for (i=0; i < len; i++) {65 arg = args[i];66 67 if (arg === '--') {68 out._ = out._.concat(args.slice(++i));69 break;70 }71 72 for (j=0; j < arg.length; j++) {73 if (arg.charCodeAt(j) !== 45) break; // "-"74 }75 76 if (j === 0) {77 out._.push(arg);78 } else if (arg.substring(j, j + 3) === 'no-') {79 name = arg.substring(j + 3);80 if (strict && !~keys.indexOf(name)) {81 return opts.unknown(arg);82 }83 out[name] = false;84 } else {85 for (idx=j+1; idx < arg.length; idx++) {86 if (arg.charCodeAt(idx) === 61) break; // "="87 }88 89 name = arg.substring(j, idx);90 val = arg.substring(++idx) || (i+1 === len || (''+args[i+1]).charCodeAt(0) === 45 || args[++i]);91 arr = (j === 2 ? [name] : name);92 93 for (idx=0; idx < arr.length; idx++) {94 name = arr[idx];95 if (strict && !~keys.indexOf(name)) return opts.unknown('-'.repeat(j) + name);96 toVal(out, name, (idx + 1 < arr.length) || val, opts);97 }98 }99 }100 101 if (defaults) {102 for (k in opts.default) {103 if (out[k] === void 0) {104 out[k] = opts.default[k];105 }106 }107 }108 109 if (alibi) {110 for (k in out) {111 arr = opts.alias[k] || [];112 while (arr.length > 0) {113 out[arr.shift()] = out[k];114 }115 }116 }117 118 return out;119}120 