Downloads · 30 days
13
18% of all-time downloads
FlagRelease/pi0-FlagOS
pi0-FlagOS is a machine learning model from FlagRelease. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
FlagOS is a unified heterogeneous computing software stack for large models, co-developed with leading global chip manufacturers. With core technologies such as the FlagScale distributed training/inference framework,…
Downloads · 30 days
13
18% of all-time downloads
All-time downloads
73
Public
Parameters
3.5B
14 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors14 GB · 100%
From the Hugging Face model README
FlagOS is a unified heterogeneous computing software stack for large models, co-developed with leading global chip manufacturers. With core technologies such as the FlagScale distributed training/inference framework, FlagGems universal operator library, FlagCX communication library, and FlagTree unified compiler, the FlagRelease platform leverages the FlagOS stack to automatically produce and release various combinations of <chip + open-source model>. This enables efficient and automated model migration across diverse chips, opening a new chapter for large model deployment and application.
Based on this, the pi0-FlagOS model is adapted for the Nvidia chip using the FlagOS software stack, enabling:
FlagScale is an end-to-end framework for large models across heterogeneous computing resources, maximizing computational efficiency and ensuring model validity through core technologies. Its key advantages include:
FlagGems is a Triton-based, cross-architecture operator library collaboratively developed with industry partners. Its core strengths include:
FlagEval (Libra)** is a comprehensive evaluation system and open platform for large models launched in 2023. It aims to establish scientific, fair, and open benchmarks, methodologies, and tools to help researchers assess model and training algorithm performance. It features:
Unlike other models, we use the MAPE (Mean Absolute Percentage Error) of the action tensor to evaluate whether the FlagOS version of the model computes correctly. To achieve this, we built upon the standard usage of the Pi0 model while controlling the random seeds of the random, numpy, and torch libraries, and configured PyTorch to use deterministic GPU kernels. Additionally, before each inference step, we replaced the randomly generated noise tensor with a fixed tensor. In the subsequent usage section, we will provide detailed instructions on how to restore these randomized settings for normal Pi0 model operation. The MAPE between CUDA and FlagOS(CUDA as ground truth) is 1.4152%. You can easily reproduce this result using our image.
Environment Setup
| Item | Version |
|---|---|
| Docker Version | Docker version 28.1.0, build 4d8c241 |
| Operating System | Ubuntu 22.04.5 LTS |
| FlagScale | Version: 0.8.0 |
| FlagGems | Version: 3.0 |
docker pull harbor.baai.ac.cn/flagrelease-public/flagrelease_nvidia_pi0_norand
We have already download pi0 and its tokenizer's weights into /workspace in docker image. You don't need to download it again. If you really want to download it, you can run:
pip install modelscope
modelscope download --model lerobot/pi0 --local_dir /workspace/pi0
modelscope download --model google/paligemma-3b-pt-224 --local_dir /workspace/paligemma-3b-pt-224
#Container Startup
docker run --rm --init --detach --net=host --uts=host --ipc=host --security-opt=seccomp=unconfined --privileged=true --ulimit stack=67108864 --ulimit memlock=-1 --ulimit nofile=1048576:1048576 --shm-size=32G -v /share:/share --gpus all --name flagos harbor.baai.ac.cn/flagrelease-public/flagrelease_nvidia_pi0_norand sleep infinity
docker exec -it flagos bash
cd /workspace/FlagScale
python run.py --config-path ./examples/pi0/conf --config-name train action=run
docker exec -it flagos bash
cd /workspace/FlagScale
python examples/pi0/client_pi0.py \
--host 127.0.0.1 \
--port 9010 \
--base-img orbbec_0_latest.jpg \
--left-wrist-img orbbec_1_latest.jpg \
--right-wrist-img orbbec_2_latest.jpg \
--num-steps 20
If you want to validate the MAPE between CUDA and FlagOS, you can:
random.seed(42)
np.random.seed(42)
torch.manual_seed(42)
torch.cuda.manual_seed(42)
torch.cuda.manual_seed_all(42)
torch.backends.cudnn.deterministic = True
torch.backends.cudnn.benchmark = False
We warmly welcome global developers to join us:
本模型的权重来源于lerobot/pi0,以apache2.0协议https://www.apache.org/licenses/LICENSE-2.0.txt开源。