Team Ai
Datasetpublic

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.

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes3.1kdownloads
RawBytesToNumeric.js68 linesDownload Raw Back to 2021
1'use strict';2 3var GetIntrinsic = require('get-intrinsic');4var callBound = require('call-bound');5 6var $RangeError = require('es-errors/range');7var $SyntaxError = require('es-errors/syntax');8var $TypeError = require('es-errors/type');9var $BigInt = GetIntrinsic('%BigInt%', true);10 11var hasOwnProperty = require('./HasOwnProperty');12var IsArray = require('./IsArray');13var IsBigIntElementType = require('./IsBigIntElementType');14var IsUnsignedElementType = require('./IsUnsignedElementType');15 16var bytesAsFloat32 = require('../helpers/bytesAsFloat32');17var bytesAsFloat64 = require('../helpers/bytesAsFloat64');18var bytesAsInteger = require('../helpers/bytesAsInteger');19var every = require('../helpers/every');20var isByteValue = require('../helpers/isByteValue');21 22var $reverse = callBound('Array.prototype.reverse');23var $slice = callBound('Array.prototype.slice');24 25var tableTAO = require('./tables/typed-array-objects');26 27// https://262.ecma-international.org/11.0/#sec-rawbytestonumeric28 29module.exports = function RawBytesToNumeric(type, rawBytes, isLittleEndian) {30	if (typeof type !== 'string' || !hasOwnProperty(tableTAO.size, '$' + type)) {31		throw new $TypeError('Assertion failed: `type` must be a TypedArray element type');32	}33	if (!IsArray(rawBytes) || !every(rawBytes, isByteValue)) {34		throw new $TypeError('Assertion failed: `rawBytes` must be an Array of bytes');35	}36	if (typeof isLittleEndian !== 'boolean') {37		throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean');38	}39 40	var elementSize = tableTAO.size['$' + type]; // step 141 42	if (rawBytes.length !== elementSize) {43		// this assertion is not in the spec, but it'd be an editorial error if it were ever violated44		throw new $RangeError('Assertion failed: `rawBytes` must have a length of ' + elementSize + ' for type ' + type);45	}46 47	var isBigInt = IsBigIntElementType(type);48	if (isBigInt && !$BigInt) {49		throw new $SyntaxError('this environment does not support BigInts');50	}51 52	// eslint-disable-next-line no-param-reassign53	rawBytes = $slice(rawBytes, 0, elementSize);54	if (!isLittleEndian) {55		$reverse(rawBytes); // step 256	}57 58	if (type === 'Float32') { // step 359		return bytesAsFloat32(rawBytes);60	}61 62	if (type === 'Float64') { // step 463		return bytesAsFloat64(rawBytes);64	}65 66	return bytesAsInteger(rawBytes, elementSize, IsUnsignedElementType(type), isBigInt);67};68 
Brunobkr/llama.cpp_AlgMor24_github · Team Ai