logo
0
0
WeChat Login

DLLM Models

预下载的 Diffusion LLM 模型,用于 CNB 云原生环境快速部署。

包含的模型

模型Hugging Face类型
LLaDA-8B-InstructGSAI-ML/LLaDA-8B-InstructGeneral
LLaDA-1.5GSAI-ML/LLaDA-1.5General
Dream-v0-Instruct-7BDream-org/Dream-v0-Instruct-7BGeneral
Dream-Coder-v0-Instruct-7BDream-org/Dream-Coder-v0-Instruct-7BCode
DreamOn-v0-7BDream-org/DreamOn-v0-7BCode
DiffuCoder-7B-cpGRPOapple/DiffuCoder-7B-cpGRPOCode

使用方法

步骤 1: 在 CNB 创建仓库

  1. 登录 cnb.cool
  2. 新建仓库 dllm-models
  3. 推送此代码到仓库
git init git add . git commit -m "Initial commit" git remote add origin https://cnb.cool/你的用户名/dllm-models.git git push -u origin main

步骤 2: 在 CPU 环境下载模型

  1. 进入仓库页面,点击 云原生开发
  2. 选择 CPU 环境(下载不需要 GPU)
  3. 在终端执行:
# 运行下载脚本 bash download_models.sh

下载大约需要 80-90GB 空间,请耐心等待。

步骤 3: 构建并推送 Docker 镜像

下载完成后,在同一个环境中执行:

# 构建包含模型的镜像 docker build -t cnb.cool/你的用户名/dllm-models:v1 . # 推送到 CNB 制品库 docker push cnb.cool/你的用户名/dllm-models:v1

步骤 4: 在 GPU 环境使用

在你的 GPU 项目中:

# 拉取模型镜像 docker pull cnb.cool/你的用户名/dllm-models:v1 # 复制模型到本地 docker run --rm -v $(pwd)/models:/dest cnb.cool/你的用户名/dllm-models:v1 \ cp -r /models/. /dest/

或者在代码中直接挂载:

from transformers import AutoModel, AutoTokenizer import torch model_path = "/path/to/models/LLaDA-8B-Instruct" tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True) model = AutoModel.from_pretrained(model_path, trust_remote_code=True, torch_dtype=torch.bfloat16)

单独下载某个模型

如果只需要下载特定模型:

# 设置模型目录 export MODEL_DIR=/workspace/models # 下载单个模型 huggingface-cli download GSAI-ML/LLaDA-8B-Instruct \ --local-dir $MODEL_DIR/LLaDA-8B-Instruct \ --local-dir-use-symlinks False

文件说明

  • download_models.sh - 批量下载模型的脚本
  • Dockerfile - 包含模型的最终镜像
  • Dockerfile.downloader - 下载器镜像
  • .cnb.yml - CNB 构建配置

About

No description, topics, or website provided.