# Twinkle安装 ## Wheel包安装 可以使用pip进行安装: ```shell pip install 'twinkle-kit' ``` ## 源代码安装 ```shell git clone https://github.com/modelscope/twinkle.git cd twinkle pip install -e . ``` ## Docker 镜像 你也可以使用我们的预构建 Docker 镜像: ```text modelscope-registry.cn-hangzhou.cr.aliyuncs.com/modelscope-repo/modelscope:twinkle-0.2.1 ``` ## 客户端安装 如果你需要使用 Twinkle 的 Client 进行远程训练,可以使用我们的一键安装脚本: ```shell # Mac or Linux sh INSTALL_CLIENT.sh # Windows, Open with PowerShell Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser .\INSTALL_CLIENT.ps1 ``` 这个脚本会下载或利用 conda,创建一个叫 `twinkle-client` 的虚拟环境,这个环境可以直接用于远端训练。 ## Megatron 依赖安装 如果你需要安装 Megatron 相关依赖,可以使用如下脚本: ```shell sh INSTALL_MEGATRON.sh ``` ## 支持的硬件 | 硬件环境 | 备注 | |--------------------------|-----------------------------| | GPU A10/A100/H100/RTX系列等 | | | GPU T4/V100等 | 不支持bfloat16、Flash-Attention | | Ascend NPU | 部分算子不支持 | | PPU | 支持 | | CPU | 支持dataset、dataloader等部分组件 |