Instructions to use psikosen/mini-swarm-browser-258m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use psikosen/mini-swarm-browser-258m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="psikosen/mini-swarm-browser-258m", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("psikosen/mini-swarm-browser-258m", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use psikosen/mini-swarm-browser-258m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "psikosen/mini-swarm-browser-258m" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "psikosen/mini-swarm-browser-258m", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/psikosen/mini-swarm-browser-258m
- SGLang
How to use psikosen/mini-swarm-browser-258m with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "psikosen/mini-swarm-browser-258m" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "psikosen/mini-swarm-browser-258m", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "psikosen/mini-swarm-browser-258m" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "psikosen/mini-swarm-browser-258m", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use psikosen/mini-swarm-browser-258m with Docker Model Runner:
docker model run hf.co/psikosen/mini-swarm-browser-258m
π Mini-Swarm-Browser (258M)
Mini-Swarm-Browser is an ultra-fast, cooperative multi-agent browser navigation model and architecture based on Canopy-R3 258M.
Instead of routing massive full-DOM trees and screenshots to a monolithic 14Bβ70B model, Mini-Swarm employs a collaborative swarm of specialized sub-agents that operate concurrently on distilled accessibility trees (AXTree) and Set-of-Marks tags (@e1, @e2), completing real browser actions in under 5 seconds on consumer hardware.
β‘ Key Highlights & Benchmark Stats
- Total Parameter Count: 258,555,654 (~258.5M parameters)
- Active Parameters / Token: ~112M parameters
- Memory Footprint: ~566 MB weights (FP16/BF16) / < 1.2 GB active VRAM
- Interaction Speed: ~5 seconds for end-to-end multi-field form completion
- Token Efficiency: ~3,500+ tokens saved per action step via Set-of-Marks and AXTree distillation (reducing context from 40k+ tokens to ~400 tokens)
- Cooperative Swarm Architecture:
- Coordinator: High-level semantic planning and goal decomposition.
- DOM Distiller: AXTree pruning, Set-of-Marks interactive visual tagging.
- Speculative Action Engine: Multi-action batch emission (predicting dependent steps like click-then-type in a single pass).
- Fast Verifier: Real-time outcome assertions and local error diagnosis.
π Quickstart
1. Load the Model with Hugging Face Transformers
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
repo_id = "psikosen/mini-swarm-browser-258m"
tokenizer = AutoTokenizer.from_pretrained(repo_id)
model = AutoModelForCausalLM.from_pretrained(
repo_id,
trust_remote_code=True,
torch_dtype=torch.bfloat16,
device_map="auto",
)
prompt = "<|im_start|>user\nGoal: Click search button and type 'AI agents'\nElements: [@e1: search_input, @e2: search_btn]<|im_end|>\n<|im_start|>assistant\n"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=64)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
2. Run the Swarm Live Browser Controller
Clone the repo and run the interactive browser agent:
git clone https://huggingface.co/psikosen/mini-swarm-browser-258m
cd mini-swarm-browser-258m
# Launch live headed browser test
python test_interactive.py --workflow form
π οΈ Multi-Agent Architecture
User Objective
β
βΌ
ββββββββββββββββββββββββββββββββ
β Swarm Coordinator β
ββββββββββββββββ¬ββββββββββββββββ
β
AXTree / SoM Tokens
β
βββββββββ΄ββββββββββββββββ
βΌ βΌ
ββββββββββββββββ ββββββββββββββββββββββββββββββββ
β DOM Distillerβ β Speculative Action Engine β
ββββββββββββββββ β (Canopy-R3 258M Planner) β
ββββββββββββββββ¬ββββββββββββββββ
β Action Batch: [@e1, @e2]
βΌ
ββββββββββββββββββββββββββββββββ
β Fast Verifier HUD β
ββββββββββββββββββββββββββββββββ
π License
Released under the Apache 2.0 License.
- Downloads last month
- -