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/*!2 Copyright 2013 Lovell Fuller and others.3 SPDX-License-Identifier: Apache-2.04*/5 6/**7 * Is this value defined and not null?8 * @private9 */10const defined = (val) => typeof val !== 'undefined' && val !== null;11 12/**13 * Is this value an object?14 * @private15 */16const object = (val) => typeof val === 'object';17 18/**19 * Is this value a plain object?20 * @private21 */22const plainObject = (val) => Object.prototype.toString.call(val) === '[object Object]';23 24/**25 * Is this value a function?26 * @private27 */28const fn = (val) => typeof val === 'function';29 30/**31 * Is this value a boolean?32 * @private33 */34const bool = (val) => typeof val === 'boolean';35 36/**37 * Is this value a Buffer object?38 * @private39 */40const buffer = (val) => val instanceof Buffer;41 42/**43 * Is this value a typed array object?. E.g. Uint8Array or Uint8ClampedArray?44 * @private45 */46const typedArray = (val) => {47 if (defined(val)) {48 switch (val.constructor) {49 case Uint8Array:50 case Uint8ClampedArray:51 case Int8Array:52 case Uint16Array:53 case Int16Array:54 case Uint32Array:55 case Int32Array:56 case Float32Array:57 case Float64Array:58 return true;59 }60 }61 62 return false;63};64 65/**66 * Is this value an ArrayBuffer object?67 * @private68 */69const arrayBuffer = (val) => val instanceof ArrayBuffer;70 71/**72 * Is this value a non-empty string?73 * @private74 */75const string = (val) => typeof val === 'string' && val.length > 0;76 77/**78 * Is this value a real number?79 * @private80 */81const number = (val) => typeof val === 'number' && Number.isFinite(val);82 83/**84 * Is this value an integer?85 * @private86 */87const integer = (val) => Number.isInteger(val);88 89/**90 * Is this value within an inclusive given range?91 * @private92 */93const inRange = (val, min, max) => val >= min && val <= max;94 95/**96 * Is this value within the elements of an array?97 * @private98 */99const inArray = (val, list) => list.includes(val);100 101/**102 * Create an Error with a message relating to an invalid parameter.103 *104 * @param {string} name - parameter name.105 * @param {string} expected - description of the type/value/range expected.106 * @param {*} actual - the value received.107 * @returns {Error} Containing the formatted message.108 * @private109 */110const invalidParameterError = (name, expected, actual) => new Error(111 `Expected ${expected} for ${name} but received ${actual} of type ${typeof actual}`112 );113 114/**115 * Ensures an Error from C++ contains a JS stack.116 *117 * @param {Error} native - Error with message from C++.118 * @param {Error} context - Error with stack from JS.119 * @returns {Error} Error with message and stack.120 * @private121 */122const nativeError = (native, context) => {123 context.message = native.message;124 return context;125};126 127export default {128 defined,129 object,130 plainObject,131 fn,132 bool,133 buffer,134 typedArray,135 arrayBuffer,136 string,137 number,138 integer,139 inRange,140 inArray,141 invalidParameterError,142 nativeError143};144 