# ═══════════════════════════════════════════════════════════════════════════════ # INFERENCEX — Router Simulation Tool # Copyright (C) 2025-2026 Salka Elmadani. All rights reserved. # Licensed under the Business Source License 1.1 (BSL-1.1) # See LICENSE file for full terms. See LICENSE for terms. # # NOTICE: This file is part of InferenceX by Salka Elmadani. # Commercial use by entities with revenue >= $1M USD requires a license. # Contact: Elmadani.SALKA@proton.me # ═══════════════════════════════════════════════════════════════════════════════ """ IX-PROFILER | Router Simulation ===================================== Read F32 router weights directly from GGUF, simulate routing with random embeddings, profile which experts get selected. NO model loading. NO inference. Just math on the gates. ~630MB RAM, runs in minutes. Copyright (C) 2025-2026 Salka Elmadani — Morocco """ import struct import numpy as np import sys from pathlib import Path GGUF_MAGIC = 0x46554747 GGML_TYPE_F32 = 0 def read_string(f): length = struct.unpack('