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 ToInt16 = require('./ToInt16');7var ToInt32 = require('./ToInt32');8var ToInt8 = require('./ToInt8');9var ToUint16 = require('./ToUint16');10var ToUint32 = require('./ToUint32');11var ToUint8 = require('./ToUint8');12var ToUint8Clamp = require('./ToUint8Clamp');13 14var valueToFloat32Bytes = require('../helpers/valueToFloat32Bytes');15var valueToFloat64Bytes = require('../helpers/valueToFloat64Bytes');16var integerToNBytes = require('../helpers/integerToNBytes');17 18var tableTAO = require('./tables/typed-array-objects');19 20// https://262.ecma-international.org/8.0/#table-5021 22var TypeToAO = {23 __proto__: null,24 $Int8: ToInt8,25 $Uint8: ToUint8,26 $Uint8C: ToUint8Clamp,27 $Int16: ToInt16,28 $Uint16: ToUint16,29 $Int32: ToInt32,30 $Uint32: ToUint3231};32 33// https://262.ecma-international.org/8.0/#sec-numbertorawbytes34 35module.exports = function NumberToRawBytes(type, value, isLittleEndian) {36 if (typeof type !== 'string' || !hasOwnProperty(tableTAO.size, '$' + type)) {37 throw new $TypeError('Assertion failed: `type` must be a TypedArray element type');38 }39 if (typeof value !== 'number') {40 throw new $TypeError('Assertion failed: `value` must be a Number');41 }42 if (typeof isLittleEndian !== 'boolean') {43 throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean');44 }45 46 if (type === 'Float32') { // step 147 return valueToFloat32Bytes(value, isLittleEndian);48 } else if (type === 'Float64') { // step 249 return valueToFloat64Bytes(value, isLittleEndian);50 } // step 351 52 var n = tableTAO.size['$' + type]; // step 3.a53 54 var convOp = TypeToAO['$' + type]; // step 3.b55 56 var intValue = convOp(value); // step 3.c57 58 return integerToNBytes(intValue, n, isLittleEndian); // step 3.d, 3.e, 459};60 