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
RawBytesToNumber.js59 linesDownload Raw Back to 2017
1'use strict';2 3var callBound = require('call-bound');4 5var $RangeError = require('es-errors/range');6var $TypeError = require('es-errors/type');7 8var $charAt = callBound('String.prototype.charAt');9var $reverse = callBound('Array.prototype.reverse');10var $slice = callBound('Array.prototype.slice');11 12var hasOwnProperty = require('./HasOwnProperty');13var IsArray = require('./IsArray');14 15var bytesAsFloat32 = require('../helpers/bytesAsFloat32');16var bytesAsFloat64 = require('../helpers/bytesAsFloat64');17var bytesAsInteger = require('../helpers/bytesAsInteger');18var every = require('../helpers/every');19var isByteValue = require('../helpers/isByteValue');20 21var tableTAO = require('./tables/typed-array-objects');22 23// https://262.ecma-international.org/8.0/#sec-rawbytestonumber24 25module.exports = function RawBytesToNumber(type, rawBytes, isLittleEndian) {26	if (typeof type !== 'string' || !hasOwnProperty(tableTAO.size, '$' + type)) {27		throw new $TypeError('Assertion failed: `type` must be a TypedArray element type');28	}29	if (!IsArray(rawBytes) || !every(rawBytes, isByteValue)) {30		throw new $TypeError('Assertion failed: `rawBytes` must be an Array of bytes');31	}32	if (typeof isLittleEndian !== 'boolean') {33		throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean');34	}35 36	var elementSize = tableTAO.size['$' + type]; // step 137 38	if (rawBytes.length !== elementSize) {39		// this assertion is not in the spec, but it'd be an editorial error if it were ever violated40		throw new $RangeError('Assertion failed: `rawBytes` must have a length of ' + elementSize + ' for type ' + type);41	}42 43	// eslint-disable-next-line no-param-reassign44	rawBytes = $slice(rawBytes, 0, elementSize);45	if (!isLittleEndian) {46		$reverse(rawBytes); // step 247	}48 49	if (type === 'Float32') { // step 350		return bytesAsFloat32(rawBytes);51	}52 53	if (type === 'Float64') { // step 454		return bytesAsFloat64(rawBytes);55	}56 57	return bytesAsInteger(rawBytes, elementSize, $charAt(type, 0) === 'U', false);58};59 
Brunobkr/llama.cpp_AlgMor24_github · Team Ai