Views
No views yet
| 実行系 | 1チャンク(50手)生成 | ピークメモリ |
|---|---|---|
| 本移植(MLX) | 160ms(313 actions/s) | 1.6GB |
| PyTorch MPS(参照実装) | 263ms | |
| PyTorch CPU(参照実装) | 5,835ms |
1pip install mlx-vlm pillow transformers
2hf download tokimoa/smolvla-mlx --local-dir smolvla-mlx1from smolvla_mlx import SmolVLAMLX
2import numpy as np
3
4model = SmolVLAMLX.from_pretrained("smolvla-mlx")
5actions = model.predict(
6 images=[cam1, cam2, cam3], # HWC uint8(1〜3カメラ)
7 instruction="Pick up the red cube",
8 state=[0.1, -0.2, 0.3, 0.0, 0.5, 0.0], # 関節状態(実次元のまま)
9) # -> (50, 6) アクションチャンク1python smolvla-mlx/smolvla_mlx.py --images cam0.png cam1.png cam2.png \
2 --instruction "pick up the red cube" --state 0,0,0,0,0,0model.safetensorsを差し替えれば動きます。