Downloads · 30 days
14
32% of all-time downloads
penpenzh/pocketvla-3m-sft-2d-grab
pocketvla-3m-sft-2d-grab is a robotics model from penpenzh. Use it for the robotics task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
Vision-language-action model for language-guided pick-and-place with a 2-link planar arm. Stage 1 of 2: supervised behavior cloning on expert demonstrations. The GRPO fine-tuned successor is PocketVLA-3M-GRPO-2D-Grab.
Downloads · 30 days
14
32% of all-time downloads
All-time downloads
44
Public
Parameters
3M
12.1 MB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors12.1 MB · 100%
From the Hugging Face model README
Vision-language-action model for language-guided pick-and-place with a 2-link planar arm. Stage 1 of 2: supervised behavior cloning on expert demonstrations. The GRPO fine-tuned successor is PocketVLA-3M-GRPO-2D-Grab.
Part of penpenzh/pocketvla — an end-to-end VLA pipeline (simulator, data generation, SFT, GRPO, evaluation) that trains on a single GPU in under an hour. All training data is generated by the project's built-in simulator; no external data is used.
| Parameters | 3,017,469 (3.02M) |
| Architecture | CNN vision encoder (24/48/72/96/96 ch) -> linear projection -> shared LM trunk (3 layers, d_model 160, d_ff 1024) fused with text, proprioception, and action-query tokens -> action head MLP (1280/640) + tanh; auxiliary ball/bin offset readout heads (deep supervision only) |
| Input | 64x64x3 top-down RGB image (uint8 0-255 or float [0,1]); instruction token ids (max 10); proprioception (q1/pi, q2/pi, ee_x/1.1, ee_y/1.1, gripper state, holding flag) |
| Output | Action (dq1, dq2, grip): joint deltas in rad, clamped to +-0.15; grip in [-1, 1], >0 = close. Aux readouts: commanded-ball and bin offsets from end effector |
| Format | HuggingFace-style directory: config.json, model.safetensors, tokenizer files (22-token vocabulary) |
Three balls (red / green / blue) and one bin, randomly placed. The instruction names one color (e.g. "put the blue ball into the bin"). Grasp succeeds when the end effector closes within 0.09 of a ball center; an episode succeeds when the commanded ball lies fully inside the bin rim within 90 steps.
Closed-loop evaluation, greedy policy, fixed seeds.
| Test set | Success | Grasp right ball | Ball-bin dist | Steps if success |
|---|---|---|---|---|
| ID test set (500 scenarios) | 74.2% | 79.0% | 0.251 | 30.8 |
| OOD test set (300 scenarios, unseen distractor) | 34.7% | 66.7% | 0.485 | 31.1 |
The model class is not registered with AutoModel; loading requires the
pvla package from the GitHub repository.
git clone https://github.com/penpenzh/pocketvla
cd pocketvla && pip install -r requirements.txt
import torch
from huggingface_hub import snapshot_download
from pvla.model.vla import PocketVLA, PocketVLATokenizer
ckpt = snapshot_download("penpenzh/pocketvla-3m-sft-2d-grab") # this repository
model, _ = PocketVLA.load_hf(ckpt, torch.device("cpu"))
model.eval()
tok = PocketVLATokenizer()
image = torch.randint(0, 256, (1, 3, 64, 64), dtype=torch.uint8) # (B, 3, H, W)
enc = tok("put the green ball into the bin")
tokens = torch.tensor([enc["input_ids"]]) # (B, 10)
pad = tokens != 0
proprio = torch.tensor([[0.69, -0.28, -0.14, 0.89, 0.0, 0.0]]) # (B, 6)
with torch.no_grad():
action, ball_off, bin_off = model(image, tokens, pad, proprio)
print(action[0].tolist()) # [dq1, dq2, grip]
Closed-loop evaluation on the fixed test sets:
python3 -m pvla evaluate --ckpt <ckpt_dir>
python3 -m pvla.eval_ood --config configs/sft_3m.yaml --ckpt <ckpt_dir>
Behavior cloning on 184,364 state-action pairs from 7,000 expert episodes
(closed-form IK expert, 100% success), 15 epochs, lr 3e-4, class-balanced
grip and offset losses plus auxiliary deep supervision. Config:
configs/sft_3m.yaml (seed 42) in the GitHub repository.
Apache License 2.0.