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'use strict';2 3var $TypeError = require('es-errors/type');4 5var hasOwnProperty = require('./HasOwnProperty');6var ToBigInt64 = require('./ToBigInt64');7var ToBigUint64 = require('./ToBigUint64');8var ToInt16 = require('./ToInt16');9var ToInt32 = require('./ToInt32');10var ToInt8 = require('./ToInt8');11var ToUint16 = require('./ToUint16');12var ToUint32 = require('./ToUint32');13var ToUint8 = require('./ToUint8');14var ToUint8Clamp = require('./ToUint8Clamp');15 16var valueToFloat32Bytes = require('../helpers/valueToFloat32Bytes');17var valueToFloat64Bytes = require('../helpers/valueToFloat64Bytes');18var integerToNBytes = require('../helpers/integerToNBytes');19 20var tableTAO = require('./tables/typed-array-objects');21 22// https://262.ecma-international.org/15.0/#table-the-typedarray-constructors23var TypeToAO = {24 __proto__: null,25 $INT8: ToInt8,26 $UINT8: ToUint8,27 $UINT8C: ToUint8Clamp,28 $INT16: ToInt16,29 $UINT16: ToUint16,30 $INT32: ToInt32,31 $UINT32: ToUint32,32 $BIGINT64: ToBigInt64,33 $BIGUINT64: ToBigUint6434};35 36// https://262.ecma-international.org/15.0/#sec-numerictorawbytes37 38module.exports = function NumericToRawBytes(type, value, isLittleEndian) {39 if (typeof type !== 'string' || !hasOwnProperty(tableTAO.size, '$' + type)) {40 throw new $TypeError('Assertion failed: `type` must be a TypedArray element type');41 }42 if (typeof value !== 'number' && typeof value !== 'bigint') {43 throw new $TypeError('Assertion failed: `value` must be a Number or a BigInt');44 }45 if (typeof isLittleEndian !== 'boolean') {46 throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean');47 }48 49 if (type === 'FLOAT32') { // step 150 return valueToFloat32Bytes(value, isLittleEndian);51 } else if (type === 'FLOAT64') { // step 252 return valueToFloat64Bytes(value, isLittleEndian);53 } // step 354 55 var n = tableTAO.size['$' + type]; // step 3.a56 57 var convOp = TypeToAO['$' + type]; // step 3.b58 59 var intValue = convOp(value); // step 3.c60 61 return integerToNBytes(intValue, n, isLittleEndian); // step 3.d, 3.e, 462};63 