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
crypto.js46 linesDownload Raw Back to server
1import { BROWSER } from 'esm-env';2 3let text_encoder;4// TODO - remove this and use global `crypto` when we drop Node 185let crypto;6 7/** @param {string} module_name */8const obfuscated_import = (module_name) => import(/* @vite-ignore */ module_name);9 10/** @param {string} data */11export async function sha256(data) {12	text_encoder ??= new TextEncoder();13 14	// @ts-expect-error15	crypto ??= globalThis.crypto?.subtle?.digest16		? globalThis.crypto17		: // @ts-ignore - we don't install node types in the prod build18			// don't use import('node:crypto') directly because static analysers will think we rely on node when we don't19			(await obfuscated_import('node:crypto')).webcrypto;20 21	const hash_buffer = await crypto.subtle.digest('SHA-256', text_encoder.encode(data));22 23	return base64_encode(hash_buffer);24}25 26/**27 * @param {Uint8Array} bytes28 * @returns {string}29 */30export function base64_encode(bytes) {31	// Using `Buffer` is faster than iterating32	// @ts-ignore33	if (!BROWSER && globalThis.Buffer) {34		// @ts-ignore35		return globalThis.Buffer.from(bytes).toString('base64');36	}37 38	let binary = '';39 40	for (let i = 0; i < bytes.length; i++) {41		binary += String.fromCharCode(bytes[i]);42	}43 44	return btoa(binary);45}46 
Brunobkr/llama.cpp_AlgMor24_github · Team Ai