Bilinear pointer routing, schema scaling in MCU memory budgets, and coordinate indexing in sub-1M AFMs

#1
by AndrewThompson1233 - opened

Hi Jaswanth,

Replacing autoregressive token-by-token generation with a learned bilinear PointerHead (s_i = h_decide^T * W_pointer * h_opt_i) for on-device hardware orchestration is a brilliant architectural decision. Bypassing autoregressive text decoding completely eliminates JSON schema syntax errors and KV-cache latency, making 692k parameters perform with sub-5ms determinism on embedded CPUs.

Looking at your prefill-only topology (2 layers, d_model=128, GQA 4/2, 1,049 vocab) and edge runtime constraints:

  1. The Bilinear PointerHead vs Schema Registry Scaling:
    Bilinear projection directly solves the generative hallucination problem for registered primitives. However, as the Model Context Protocol (MCP) expands the candidate tool registry from a handful of GPIO pins to dozens or hundreds of ambient micro-services, scoring every candidate schema linearly scales memory bandwidth during the forward pass.
    On extreme edge targets like the ESP32-S3 with strict SRAM limits (often 2 MB - 8 MB total PSRAM), evaluating large candidate schema matrices can cause memory contention and cache thrashing.

  2. RoPE in shallow 2-layer coordinate regimes:
    In standard deep transformers, Rotary Position Embeddings (RoPE) provide essential relative distance bias. But in a 2-layer, 128-dim prefill architecture with head dimension 32, frequency rotations over 1,024 tokens can induce significant coordinate distortion.
    Because command-to-tool routing is largely order-tolerant across slot parameters (e.g. "brightness 30 room living room" vs "room living room brightness 30"), heavy rotary phase encoding can sometimes penalize permutations of valid slot arguments unless explicitly supervised in SFT traces.

  3. Centroid hierarchical filtering for large MCP registries:
    In an open architecture project called Maba v2 (reference release: https://huggingface.co/AndrewThompson1233/maba-v2-architecture), we explore sub-millisecond coordinate routing using DG-Indexer (a centroid-based block-sparse indexer):
    Instead of running a full bilinear projection across all candidate options, token/schema coordinate clusters are indexed via a hybrid mean-max pooling filter.
    For a micro-agent like Mara, applying a lightweight centroid pre-filter could prune hundreds of incoming MCP schemas down to top-k candidates before running the bilinear pointer matrix, keeping MCU execution strictly sub-5ms regardless of how large the local tool library grows.

When dynamic MCP schemas are discovered at runtime, does the model compute h_opt embeddings on the fly in the forward pass, or does the registry cache pre-computed schema vectors offline?

Best,
Andrew

Sign up or log in to comment