CoolFace
Modelpublic

webbrain-one/webbrain-compass-tiny-v2.1

sourceHugging Faceotherupdated 1d agoView on Hugging Face
0likes833downloads
Model Card

WebBrain Compass Tiny v2.1

WebBrain Compass Tiny v2.1 is a compact language model optimized for low-latency decision making, structured tool use, and in-browser agentic execution inside the WebBrain runtime.

Fine-tuned from OpenBMB MiniCPM5-2B (~2.6B parameters) via webbrain-one/webbrain-compass-tiny-v2, v2.1 is an export/runtime revision delivering native in-browser execution through quantized asymmetric INT4 weights with FP16 activations (q4f16) on ONNX Runtime WebGPU.

It unifies three core WebBrain behavioral modes:

  1. 1.Ask & Clarify — Answer directly or request missing information when execution is underspecified or unnecessary.
  2. 2.Direct Compact Tool Execution — Select exact browser tools and generate grounded arguments for low-latency accessibility-tree actions.
  3. 3.Safe Escalation & Abstention — Refuse, pause, or defer to higher execution tiers when actions lack adequate grounding or violate safety boundaries.
Note: Compass Tiny v2.1 is an export/runtime optimization (v24 candidate), not a new pre-training or fine-tuning run. The merged BF16 base remains webbrain-one/webbrain-compass-tiny-v2 (54bcab6731939137d0489ac01463c9404dff9da8). The previous v23 release is separate and unchanged.

Role in WebBrain

text
User request
     │
     ▼
WebBrain observation & policy layer
     │
     ▼
WebBrain Compass Tiny v2.1 (WebGPU / q4f16)
     ├─ Clarify or answer directly
     ├─ Emit grounded browser tool call
     └─ Abstain / safely escalate when execution is ungrounded

The outer WebBrain runtime enforces tool-schema validation, evidence and parameter grounding, destination URL verification, browser-state freshness, and sandboxed security policies. Model output is never proof that an external action succeeded.


Intended Capabilities

  • Browser Action Selection: Grounded accessibility-tree interactions and structured function calling.
  • In-Browser WebGPU Inference: Zero-cloud, client-side execution using Transformers.js and ONNX Runtime Web.
  • Unified Ask and Compact Modes: Asking for missing information before acting, answering direct questions, or choosing tools.
  • Safe Refusal & Escalation: Refusing unsupported actions or escalating when Compact execution lacks evidence, avoiding invented URLs or fabricated success states.

What Improved in v2.1

In this revision, the ONNX graph's 211 MatMulNBits accuracy_level attributes were changed from 4 to 2, disabling the dynamic INT8-activation path used in the pinned WebGPU runtime. Quantized weight shards, tokenizer, config, and vendored runtime remain byte-identical to v23.

Checkv23v2.1 / v24Status
Quantized PyTorch vs WebGPU numerical checks2/12 pass12/12 passPassed
Worst relative RMS logit difference (limit: 2%)6.5274%1.8334%Passed
Minimum cosine similarity (limit: 0.999)0.9980655000.999833960Passed

Generation smoke (8 cases), bounded 16,384-total-token context/cache checks, and a cold-browser restart with model downloads disabled passed. All three cold-cache native tool-call outputs were unchanged. Numerical tests cover three prompts, prefill plus three cached steps each, with identical token prefixes. They establish runtime parity in those probes—not BF16 equivalence, universal numerical accuracy, or a percentage loss in task accuracy. INT4 quality loss remains a separate issue; a Turkish smoke response remained awkward despite passing structural checks.


Fixed Next-Response Routing Results

MetricBF16 Referencev2.1 / v24 WebGPU
First-turn structured calls94/10098/100
Strict exact action16/8915/89
Loose tool-family match41/8943/89

Evaluated on 100 first-turn scenarios (89 scored, 11 predetermined skips) without output repair or result-based retries.

Behavioral Gate Audit: The full predeclared behavioral gate failed: 3 explicitly discouraged actions versus a limit of 1. These were retrying an access-blocked URL, continuing a listing before reporting available results, and inventing a pagination URL. Other declared gates passed, with zero transport errors, zero native-decoder parser errors, and zero length-limited responses. The owner authorized this separate release with these findings disclosed; it is not certified for unattended consequential actions.

Exact Package

  • GPTQ asymmetric INT4 weights, group size 32; FP16 scales/activations/KV cache.
  • Default graph: onnx/model_q4f16.onnx. Both external data files are required: model_q4f16.onnx_data and model_q4f16.onnx_data_1 (1,868,992,512 bytes combined).
  • The inherited BF16 dtype and 131072 architecture field in config.json do not describe this quantized graph or establish a tested browser context limit.
  • Exact tested runtime under runtime/: Transformers.js 4.2.0, ONNX Runtime Web 1.27.0, WebBrain worker/parser and dependency licences. Tested with Chrome 150.0.7871.187, NVIDIA RTX 5090. Other devices/runtimes are not verified here.
  • Generation-only, last-token logits; thinking disabled. No cloud or visual model.
  • Tests used a local model transport alias; this repository name is the release identifier. All 39 tested model/runtime files are mapped and hashed in provenance.
  • validation/ contains results and compact audit summaries. Complete original local audit hashes are recorded; private training/calibration data, browser profiles, credentials, and raw benchmark requests are not included.

Integration

  1. 1.Download the pinned commit returned with the release, using an HF account with private-repository access:
bash
   hf download webbrain-one/webbrain-compass-tiny-v2.1 --revision <PINNED_COMMIT> --local-dir ./compass-tiny-v2.1

Keep onnx/, tokenizer/config files, and both external shards together. Never embed a personal/write token in an extension, webpage, source file, or log. Use a trusted authenticated asset proxy or a private local mirror pinned to that same commit. Anonymous HF downloads cannot access this private release.

  1. 1.In WebBrain, choose the custom model ID webbrain-one/webbrain-compass-tiny-v2.1, device `webgpu`, dtype `q4f16`, default filename stem model. Use the supplied runtime assets. The unchanged worker has no revision option: pin the asset proxy, or explicitly pass revision at pipeline initialization in your integration. The new model ID has a separate cache key; do not alias it onto v23's cached graph.

Equivalent library initialization, with executable runtime assets served locally:

javascript
   import { env, pipeline } from './runtime/vendor/transformers.web.js';
   import { parseMiniCpmToolCalls } from './integration/minicpm5-tool-parser.mjs';

   env.backends.onnx.wasm.numThreads = 1;
   env.backends.onnx.wasm.wasmPaths = {
     mjs: new URL('./runtime/vendor/ort-wasm-simd-threaded.asyncify.mjs', import.meta.url).href,
     wasm: new URL('./runtime/vendor/ort-wasm-simd-threaded.asyncify.wasm', import.meta.url).href,
   };
   // Configure your trusted authenticated asset proxy before accessing this private repo.
   const generator = await pipeline('text-generation',
     'webbrain-one/webbrain-compass-tiny-v2.1', {
       revision: '<PINNED_COMMIT>', device: 'webgpu', dtype: 'q4f16',
       session_options: { extra: {
         'ep.webgpuexecutionprovider.storageBufferCacheMode': 'simple',
       } },
     });
   try {
     const result = await generator(messages, {
       tools, do_sample: false, max_new_tokens: 256,
       tokenizer_encode_kwargs: { enable_thinking: false },
     });
     const generated = result[0].generated_text;
     const text = Array.isArray(generated) ? generated.at(-1).content : generated;
     const calls = parseMiniCpmToolCalls(text, tools);
     // Retain raw text. Validate argument schemas and user authorization before dispatch.
     // An empty calls list is not automatically successful task completion.
   } finally {
     await generator.dispose();
   }

The native custom-model worker defaults to greedy generation and caps output at 256 tokens. The routing benchmark used its documented test hook (4096-token budget, temperature 0.15/0.3, seed 3407); do not claim those scores for the default UI settings. Budget input plus output within the tested 16K limit and start with short tasks.

  1. 1.Parser integration is explicit, not silently changed. The exact bundled parser under runtime/ matches 162/194 recorded native-decoder responses. It can leave Python-style False and ['green', 'amber'] as strings. The optional, separately audited integration/minicpm5-tool-parser.mjs matches 194/194 recorded responses and passed its allowlist checks; it is not automatically wired into the worker. Pass the full tool schemas so string-valued JSON bodies remain strings. The helper does not execute literals, validate every schema constraint, or grant action approval. Preserve downstream validation, confirmations, and raw-output/error logging.

CPU-only helper checks: node --test integration/parser.test.mjs.


License & Attribution

This release remains subject to ATTRIBUTIONS.md, including the project's noncommercial-research restrictions. Private hosting does not expand usage rights.