cellbot1
controlling a robot swarm with text instructions
2 min readupdated
The model controls a swarm of about 100 robots on a 32 by 32 grid using plain English instructions. At each step, the model reads the text task and the grid state, then outputs a movement direction for each cell. The project is built on the Qwen3-0.6B model with a rank-64 LoRA (a small add-on to the base model) added to the attention and MLP layers, alongside new input and output layers. This solution will appeal to robotics researchers and developers interested in multi-agent systems and language model-based control.
Key features
- Architecture: Uses Qwen3-0.6B alongside custom scene tokens for a 10-channel grid.
- Control: A linear reader outputs a distribution across 9 directions for each grid square.
- Parameters: About 41 million parameters in the trained layers (LoRA and new layers, safetensors format file).
- Training: Behavioral cloning on mixed task demonstrations and base language model distillation.
What you can do
- Install via pip and run a Python inference example to process a world grid.
- Render task execution as a video in MuJoCo alongside the grid via the command line.
- Test the model on simulations of various tasks (color-based cheese gathering, moving items into boxes).
Example
import numpy as np
import torch
from cellbot.policy.inference import lm_sampler, load_policy, tokens
from cellbot.sim.world import observe, step
from cellbot.tasks import suite as T
device = torch.device("cpu")
policy, tokenizer = load_policy("fringewidth/cellbot1", device)
sample = lm_sampler(policy, guidance=2.0, n=T.SIZE // 4)
scene = T.sample_scene(np.random.default_rng(0), cheeses=(1, 4), boxes=(0, 2))
world, _ = T.stack([scene])
cond = tokens(tokenizer, ["clear the board of cheese"], device)
with torch.no_grad():
for _ in range(100):
_, field = sample(observe(world), cond)
world, info = step(world, field)Read more
DetailsBenchmarks: up to 8/8 success rate in MuJoCo simulations for tasks like red cheese collection and moving into a box.
Requirements: trained weights take up about 41M parameters (float16), training took about 40 hours on a Kaggle T4.
Limitations: trained only on a simulated 32x32 grid with no memory of past frames, not tested on real robots.










Comments