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
tracing.js163 linesDownload Raw Back to dev
1/** @import { Derived, Reaction, Value } from '#client' */2import { UNINITIALIZED } from '../../../constants.js';3import { snapshot } from '../../shared/clone.js';4import { DERIVED, ASYNC, PROXY_PATH_SYMBOL, STATE_SYMBOL } from '#client/constants';5import { effect_tracking } from '../reactivity/effects.js';6import { active_reaction, untrack } from '../runtime.js';7 8/**9 * @typedef {{10 *   traces: Error[];11 * }} TraceEntry12 */13 14/** @type {{ reaction: Reaction | null, entries: Map<Value, TraceEntry> } | null} */15export let tracing_expressions = null;16 17/**18 * @param {Value} signal19 * @param {TraceEntry} [entry]20 */21function log_entry(signal, entry) {22	const value = signal.v;23 24	if (value === UNINITIALIZED) {25		return;26	}27 28	const type = get_type(signal);29	const current_reaction = /** @type {Reaction} */ (active_reaction);30	const dirty = signal.wv > current_reaction.wv || current_reaction.wv === 0;31	const style = dirty32		? 'color: CornflowerBlue; font-weight: bold'33		: 'color: grey; font-weight: normal';34 35	// eslint-disable-next-line no-console36	console.groupCollapsed(37		signal.label ? `%c${type}%c ${signal.label}` : `%c${type}%c`,38		style,39		dirty ? 'font-weight: normal' : style,40		typeof value === 'object' && value !== null && STATE_SYMBOL in value41			? snapshot(value, true)42			: value43	);44 45	if (type === '$derived') {46		const deps = new Set(/** @type {Derived} */ (signal).deps);47		for (const dep of deps) {48			log_entry(dep);49		}50	}51 52	if (signal.created) {53		// eslint-disable-next-line no-console54		console.log(signal.created);55	}56 57	if (dirty && signal.updated) {58		for (const updated of signal.updated.values()) {59			if (updated.error) {60				// eslint-disable-next-line no-console61				console.log(updated.error);62			}63		}64	}65 66	if (entry) {67		for (var trace of entry.traces) {68			// eslint-disable-next-line no-console69			console.log(trace);70		}71	}72 73	// eslint-disable-next-line no-console74	console.groupEnd();75}76 77/**78 * @param {Value} signal79 * @returns {'$state' | '$derived' | 'store'}80 */81function get_type(signal) {82	if ((signal.f & (DERIVED | ASYNC)) !== 0) return '$derived';83	return signal.label?.startsWith('$') ? 'store' : '$state';84}85 86/**87 * @template T88 * @param {() => string} label89 * @param {() => T} fn90 */91export function trace(label, fn) {92	var previously_tracing_expressions = tracing_expressions;93 94	try {95		tracing_expressions = { entries: new Map(), reaction: active_reaction };96 97		var start = performance.now();98		var value = fn();99		var time = (performance.now() - start).toFixed(2);100 101		var prefix = untrack(label);102 103		if (!effect_tracking()) {104			// eslint-disable-next-line no-console105			console.log(`${prefix} %cran outside of an effect (${time}ms)`, 'color: grey');106		} else if (tracing_expressions.entries.size === 0) {107			// eslint-disable-next-line no-console108			console.log(`${prefix} %cno reactive dependencies (${time}ms)`, 'color: grey');109		} else {110			// eslint-disable-next-line no-console111			console.group(`${prefix} %c(${time}ms)`, 'color: grey');112 113			var entries = tracing_expressions.entries;114 115			untrack(() => {116				for (const [signal, traces] of entries) {117					log_entry(signal, traces);118				}119			});120 121			tracing_expressions = null;122 123			// eslint-disable-next-line no-console124			console.groupEnd();125		}126 127		return value;128	} finally {129		tracing_expressions = previously_tracing_expressions;130	}131}132 133/**134 * @param {Value} source135 * @param {string} label136 */137export function tag(source, label) {138	source.label = label;139	tag_proxy(source.v, label);140 141	return source;142}143 144/**145 * @param {unknown} value146 * @param {string} label147 */148export function tag_proxy(value, label) {149	// @ts-expect-error150	value?.[PROXY_PATH_SYMBOL]?.(label);151	return value;152}153 154/**155 * @param {unknown} value156 */157export function label(value) {158	if (typeof value === 'symbol') return `Symbol(${value.description})`;159	if (typeof value === 'function') return '<function>';160	if (typeof value === 'object' && value) return '<object>';161	return String(value);162}163 
Brunobkr/llama.cpp_AlgMor24_github · Team Ai