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
decode_sourcemap.js97 linesDownload Raw Back to preprocess
1/** @import { Processed } from './public.js' */2import { decode as decode_mappings } from '@jridgewell/sourcemap-codec';3 4/**5 * Import decoded sourcemap from mozilla/source-map/SourceMapGenerator6 * Forked from source-map/lib/source-map-generator.js7 * from methods _serializeMappings and toJSON.8 * We cannot use source-map.d.ts types, because we access hidden properties.9 * @param {any} generator10 */11function decoded_sourcemap_from_generator(generator) {12	let previous_generated_line = 1;13	/** @type {number[][][]} */14	const converted_mappings = [[]];15	let result_line = converted_mappings[0];16	let result_segment;17	let mapping;18	const source_idx = generator._sources19		.toArray()20		// @ts-ignore21		.reduce((acc, val, idx) => ((acc[val] = idx), acc), {});22	const name_idx = generator._names23		.toArray()24		// @ts-ignore25		.reduce((acc, val, idx) => ((acc[val] = idx), acc), {});26	const mappings = generator._mappings.toArray();27	for (let i = 0, len = mappings.length; i < len; i++) {28		mapping = mappings[i];29		if (mapping.generatedLine > previous_generated_line) {30			while (mapping.generatedLine > previous_generated_line) {31				converted_mappings.push([]);32				previous_generated_line++;33			}34			result_line = converted_mappings[mapping.generatedLine - 1]; // line is one-based35		} else if (i > 0) {36			const previous_mapping = mappings[i - 1];37			if (38				// sorted by selectivity39				mapping.generatedColumn === previous_mapping.generatedColumn &&40				mapping.originalColumn === previous_mapping.originalColumn &&41				mapping.name === previous_mapping.name &&42				mapping.generatedLine === previous_mapping.generatedLine &&43				mapping.originalLine === previous_mapping.originalLine &&44				mapping.source === previous_mapping.source45			) {46				continue;47			}48		}49		result_line.push([mapping.generatedColumn]);50		result_segment = result_line[result_line.length - 1];51		if (mapping.source != null) {52			result_segment.push(53				...[source_idx[mapping.source], mapping.originalLine - 1, mapping.originalColumn]54			);55			if (mapping.name != null) {56				result_segment.push(name_idx[mapping.name]);57			}58		}59	}60 61	/**62	 * @type {{63	 *  version: number;64	 * sources: string[];65	 * names: string[];66	 * mappings: number[][][];67	 * file?: string;68	 * }}69	 */70	const map = {71		version: generator._version,72		sources: generator._sources.toArray(),73		names: generator._names.toArray(),74		mappings: converted_mappings75	};76	if (generator._file != null) {77		map.file = generator._file;78	}79	// not needed: map.sourcesContent and map.sourceRoot80	return map;81}82 83/**84 * @param {Processed} processed85 */86export function decode_map(processed) {87	let decoded_map = typeof processed.map === 'string' ? JSON.parse(processed.map) : processed.map;88	if (typeof decoded_map.mappings === 'string') {89		decoded_map.mappings = decode_mappings(decoded_map.mappings);90	}91	if (decoded_map._mappings && decoded_map.constructor.name === 'SourceMapGenerator') {92		// import decoded sourcemap from mozilla/source-map/SourceMapGenerator93		decoded_map = decoded_sourcemap_from_generator(decoded_map);94	}95	return decoded_map;96}97 
Brunobkr/llama.cpp_AlgMor24_github · Team Ai