CoolFace
Modelpublic

psikosen/canopy-258m-r3-v3

sourceHugging Faceapache-2.0updated 21d agoView on Hugging Face
0likes411downloads
Model Card

Canopy-258M-R3 v3: Ultra-Accelerated Edge Browser Agent & MoE Flagship

Canopy-258M-R3 v3 is an ultra-efficient 258.56M parameter Recurrent Mixture-of-Experts (MoE) model optimized for high-speed edge computing, tool synthesis, and browser automation.

v3 introduces the Hybrid Input Protocol and Event-Driven DOM Synchronization, achieving a 2.02x speedup across real-world browser batteries and a 5.1x acceleration (500%+) on multi-step interactive forms.


What is New in v3

  1. 1.Hybrid Input Protocol (`ActionExecutor`):
  2. 2.Automatically differentiates static form fields (passwords, emails, registration, multi-step wizards) from reactive stream targets (search autocompletes, live comboboxes, typeaheads).
  3. 3.Static Form Inputs: Uses atomic CDP fill() with standard DOM input and change event dispatch, dropping typing latency from >1,400 ms down to <40 ms (35x acceleration).
  4. 4.Interactive Streams: Automatically detects search/combobox targets and preserves natural Gaussian typing cadence ($\mu=35 ext{ms}$) so reactive debounce and AJAX handlers populate suggestions properly.
  5. 5.Developer control supported via BrowserAction(stream_input=True|False).
  1. 1.Snappy Cubic Bézier Motor Kinematics:
  2. 2.Calibrated cubic Bézier trajectory duration (80 ms – 220 ms, 8–16 steps) with smoothstep ease-in/ease-out curves and sub-pixel micro-jitter.
  3. 3.Preserves human motor telemetry to avoid synthetic robotic detection while eliminating sluggish travel lag.
  1. 1.Event-Driven Scroll Mutation Synchronization:
  2. 2.Streamlined wheel step dispatch with immediate scroll and resize window event notifications.
  3. 3.Instantly triggers IntersectionObserver handlers and dynamic infinite scroll listeners without stalling.
  1. 1.Structured Data Scraping & Web Extraction Engine:
  2. 2.First-class structured parsing for tables (2D row/column matrices), lists, and individual element attributes via controller.scrape_table(), controller.scrape_element(), and controller.scrape_page().
  1. 1.Visual Step Logging & Audit Receipts:
  2. 2.Step-by-step high-resolution PNG screenshot auditing with illuminated green bounding boxes on target marks, glowing red coordinate reticles, and top-left HUD step badges.

Performance Benchmarks: v2 vs v3 (7-Scenario Battery)

Test ScenarioModalityv2 Latencyv3 LatencyLatency ReductionSpeedup
1. Dropdowns & Multi-Select3 Selects + 1 Button Click434.6 ms375.0 ms-59.6 ms1.16x
2. Modal Dialog OverlaysOpen Modal + Email Entry + Save1,893.8 ms497.1 ms-1,396.7 ms3.81x
3. Paginated Data TablesNext Page + Row Approve Action499.6 ms433.1 ms-66.5 ms1.15x
4. Infinite Scroll HydrationWheel Scroll + Checkpoint Ack1,484.0 ms984.1 ms-499.9 ms1.51x
5. Radio & Checkbox TogglesRadio Sel + Webhook Check + Save935.7 ms749.9 ms-185.8 ms1.25x
6. Autocomplete & TypeaheadStream Search + Suggestion Click715.6 ms465.6 ms-250.0 ms1.54x
7. Multi-Step Form Wizard2-Stage Multi-Field Flow + Finish2,381.4 ms433.3 ms-1,948.1 ms5.50x (550%+)
Cumulative Battery Total7 Scenarios / 20 Actions8,344.6 ms3,938.1 ms-4,406.5 ms2.12x FASTER

Complex Chained Actions Benchmark (Multi-Stage Orchestration)

Chained Complex Action ScenarioTotal ActionsExecution LatencyVerdict
Chain 1: E-Commerce Multi-Stage Cart & Checkout12 actions across 3 stages1,774.4 ms✓ PASS
Chain 2: ETL Bulk Filter & Modal Dispatch7 actions1,313.8 ms✓ PASS
Chain 3: Spatial Grounding & Dynamic Extraction4 actions453.0 ms✓ PASS
Live Public Web Navigation (Hacker News)Real Network577.7 ms✓ PASS
Speculative Action Chunking SpeedupMulti-Field Form1.50x Faster (224 ms vs 336 ms)✓ PASS

Model Architecture Specifications

HyperparameterValueDescription
Total Parameters258,555,654Exact standalone weights with tied embeddings
Active Parameters~112,000,000Active parameter compute per token
Recurrent Visited Layers18 effective layers3 Prelude + 6 Recurrent (visited 2x) + 3 Coda
MoE RoutingTop-2 of 8 ExpertsDense first 3 layers, MoE middle/coda layers
Tokenwise Thought Bus192 channelsAuxiliary persistent reasoning state across recurrent passes
Context Window2,048 tokensRoPE position embeddings
Vocabulary Size49,152Byte-level BPE tokenizer (Cosmo-2)

Quickstart: Python Inference & Web Automation

1. Model Loading

python
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "psikosen/canopy-258m-r3-v3"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    trust_remote_code=True,
    torch_dtype=torch.bfloat16,
    device_map="auto",
)

prompt = "<|im_start|>user\nWrite a Python function to extract all email addresses from a web page.<|im_end|>\n<|im_start|>assistant\n"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=256, temperature=0.2)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

2. Fast Browser Agent Execution (miniswardbower)

python
import asyncio
from miniswardbower.browser.controller import BrowserController
from miniswardbower.core.config import BrowserConfig
from miniswardbower.core.schemas import BrowserAction, BrowserActionType

async def run_agent():
    controller = BrowserController(BrowserConfig(headless=True))
    await controller.start()
    try:
        await controller.goto("https://news.ycombinator.com")
        
        # 1. Scrape structured data
        page_data = await controller.scrape_page()
        print("Page Title:", page_data.get("title"))
        
        # 2. Fast atomic fill
        await controller.execute_action(
            BrowserAction(op=BrowserActionType.TYPE, target="input[name='q']", text="LLM Edge", stream_input=False)
        )
        await controller.execute_action(
            BrowserAction(op=BrowserActionType.PRESS, key="Enter")
        )
    finally:
        await controller.stop()

asyncio.run(run_agent())

License

Released under the Apache 2.0 License.