当前位置: 首页 > news >正文

广东网站备案时间制作网页的网站

广东网站备案时间,制作网页的网站,连云港网站优化方案,wordpress手机上传图片插件文章目录 关于 open-instruct设置训练微调偏好调整RLVR 污染检查开发中仓库结构 致谢 关于 open-instruct github : https://github.com/allenai/open-instruct 这个仓库是我们对在公共数据集上对流行的预训练语言模型进行指令微调的开放努力。我们发布这个仓库,并…

在这里插入图片描述

文章目录

    • 关于 open-instruct
    • 设置
    • 训练
      • 微调
      • 偏好调整
      • RLVR
    • 污染检查
      • 开发中
      • 仓库结构
    • 致谢


关于 open-instruct

  • github : https://github.com/allenai/open-instruct

这个仓库是我们对在公共数据集上对流行的预训练语言模型进行指令微调的开放努力。我们发布这个仓库,并将持续更新它,包括:

  1. 使用最新技术和指令数据集统一格式微调语言模型的代码。
  2. 在一系列基准上运行标准评估的代码,旨在针对这些语言模型的多种能力。
  3. 我们在探索中构建的检查点或其他有用的工件。

请参阅我们的第一篇论文
How Far Can Camels Go? Exploring the State of Instruction Tuning on Open Resources
关于这个项目背后的更多想法以及我们的初步发现,请参阅我们的第二篇论文。
Camels in a Changing Climate: Enhancing LM Adaptation with Tulu 2
关于使用Llama-2模型和直接偏好优化的结果。我们仍在开发更多模型。有关涉及PPO和DPO的更近期的结果,请参阅我们的第三篇论文
Unpacking DPO and PPO: Disentangling Best Practices for Learning from Preference Feedback


设置

我们的设置大部分遵循我们的
Dockerfile
, 使用 Python 3.10。注意,Open Instruct 是一个研究代码库,不保证向后兼容性。 我们提供两种安装策略:

  • 本地安装:这是推荐安装 Open Instruct 的方式。您可以通过运行以下命令安装依赖项:
pip install --upgrade pip "setuptools<70.0.0" wheel 
# TODO, unpin setuptools when this issue in flash attention is resolved
pip install torch==2.4.0 torchvision==0.19.0 torchaudio==2.4.0 --index-url https://download.pytorch.org/whl/cu121
pip install packaging
pip install flash-attn==2.6.3 --no-build-isolation
pip install -r requirements.txt
python -m nltk.downloader punkt
pip install -e .

  • Docker 安装: 您也可以使用 Dockerfile 来构建 Docker 镜像。您可以使用以下命令来构建镜像:
docker build --build-arg CUDA=12.1.0 --build-arg TARGET=cudnn8-devel --build-arg DIST=ubuntu20.04 . -t open_instruct_dev
# if you are interally at AI2, you can create an image like this:
beaker image delete $(whoami)/open_instruct_dev 
beaker image create open_instruct_dev -n open_instruct_dev -w ai2/$(whoami)

如果您在 AI2 内部,您可以使用我们始终最新的自动构建镜像来启动实验:nathanl/open_instruct_auto


训练

设置好环境后,您就可以开始一些实验了。我们在下面提供了一些示例。要了解有关如何重现Tulu 3模型的更多信息,请参阅Tulu 3自述文件。Tulu 1和Tulu 2的说明和文档在Tulu 1和2自述文件中。


微调

您可以使用以下命令开始:

# quick debugging run using 1 GPU
sh scripts/finetune_with_accelerate_config.sh 1 configs/train_configs/sft/mini.yaml
# train an 8B tulu3 model using 8 GPU
sh scripts/finetune_with_accelerate_config.sh 8 configs/train_configs/tulu3/tulu3_sft.yaml

偏好调整

# quick debugging run using 1 GPU
sh scripts/dpo_train_with_accelerate_config.sh 1 configs/train_configs/dpo/mini.yaml
# train an 8B tulu3 model using 8 GPU
sh scripts/finetune_with_accelerate_config.sh 8 configs/train_configs/tulu3/tulu3_dpo_8b.yaml

RLVR

# quick debugging run using 2 GPU (1 for inference, 1 for training)
# here we are using `HuggingFaceTB/SmolLM2-360M-Instruct`; it's prob not
# gonna work, but it's easy to test run and print stuff.
python open_instruct/ppo_vllm_thread_ray_gtrl.py \--dataset_mixer '{"ai2-adapt-dev/gsm8k_math_ifeval_ground_truth_mixed": 1.0}' \--dataset_train_splits train \--dataset_eval_mixer '{"ai2-adapt-dev/gsm8k_math_ground_truth": 1.0}' \--dataset_eval_splits test \--max_token_length 2048 \--max_prompt_token_length 2048 \--response_length 2048 \--model_name_or_path HuggingFaceTB/SmolLM2-360M-Instruct \--reward_model_path HuggingFaceTB/SmolLM2-360M-Instruct \--non_stop_penalty \--stop_token eos \--temperature 1.0 \--ground_truths_key ground_truth \--chat_template tulu \--sft_messages_key messages \--learning_rate 3e-7 \--total_episodes 10000 \--penalty_reward_value -10.0 \--deepspeed_stage 3 \--per_device_train_batch_size 2 \--local_rollout_forward_batch_size 2 \--local_mini_batch_size 32 \--local_rollout_batch_size 32 \--num_epochs 1 \--actor_num_gpus_per_node 1 \--vllm_tensor_parallel_size 1 \--beta 0.05 \--apply_verifiable_reward true \--output_dir output/rlvr_1b \--seed 3 \--num_evals 3 \--save_freq 100 \--reward_model_multiplier 0.0 \--gradient_checkpointing \--with_tracking# train an 8B tulu3 model using 8 GPU (1 for inference, 7 for training)
python open_instruct/ppo_vllm_thread_ray_gtrl.py \--dataset_mixer '{"ai2-adapt-dev/gsm8k_math_ifeval_ground_truth_mixed": 1.0}' \--dataset_train_splits train \--dataset_eval_mixer '{"ai2-adapt-dev/gsm8k_math_ground_truth": 1.0}' \--dataset_eval_splits test \--max_token_length 2048 \--max_prompt_token_length 2048 \--response_length 2048 \--model_name_or_path allenai/Llama-3.1-Tulu-3-8B-DPO \--reward_model_path allenai/Llama-3.1-Tulu-3-8B-RM \--non_stop_penalty \--stop_token eos \--temperature 1.0 \--ground_truths_key ground_truth \--chat_template tulu \--sft_messages_key messages \--learning_rate 3e-7 \--total_episodes 10000000 \--penalty_reward_value -10.0 \--deepspeed_stage 3 \--per_device_train_batch_size 2 \--local_rollout_forward_batch_size 2 \--local_mini_batch_size 32 \--local_rollout_batch_size 32 \--actor_num_gpus_per_node 7 \--vllm_tensor_parallel_size 1 \--beta 0.05 \--apply_verifiable_reward true \--output_dir output/rlvr_8b \--seed 3 \--num_evals 3 \--save_freq 100 \--reward_model_multiplier 0.0 \--gradient_checkpointing \--with_tracking

污染检查

我们发布了用于测量指令调整数据集和评估数据集之间重叠的脚本./decontamination。有关更多详细信息,请参阅自述文件。


开发中

当向此仓库提交PR时,我们使用以下方式检查open_instruct/中的核心代码样式:

make style
make quality

仓库结构

├── assets/                     <- Images, licenses, etc.
├── configs/                    
| ├── beaker_configs/       <- AI2 Beaker configs
| ├── ds_configs/           <- DeepSpeed configs
| └── train_configs/        <- Training configs
├── decontamination/            <- Scripts for measuring train-eval overlap
├── eval/                       <- Evaluation suite for fine-tuned models
├── human_eval/                 <- Human evaluation interface (not maintained)
├── open_instruct/              <- Source code (flat)
├── quantize/                   <- Scripts for quantization
├── scripts/                    <- Core training and evaluation scripts
└── Dockerfile                  <- Dockerfile

致谢

Open Instruct 是一个受益于许多开源项目和库的项目。我们特别感谢以下项目:

  • HuggingFace Transformers : 我们为微调脚本适配了 Hugging Face 的 Trainer。
  • HuggingFace TRL 和 eric-mitchell/direct-preference-optimization : 我们的偏好调整代码改编自 TRL 和 Eric Mitchell 的 DPO 代码。
  • OpenAI 的 lm-human-preferences, summarize-from-feedback, 和vwxyzjn/summarize_from_feedback_details : 我们的核心PPO代码是从OpenAI的原始RLHF代码改编而来。
    Huang et al (2024)'s reproduction work 关于OpenAI的基于反馈的总结工作的内容。
  • OpenRLHF : 我们将 OpenRLHF 的 Ray + vLLM 分布式代码进行了适配,以扩展 PPO RLVR 训练至 70B 规模。

http://www.yidumall.com/news/10680.html

相关文章:

  • 广州番禺建网站站内推广
  • 南和网站建设公司八宿县网站seo优化排名
  • 保山手机网站建设什么软件比百度搜索好
  • 网站的转化率免费b站推广网站有哪些
  • 网站备案代码百度联盟点击广告赚钱
  • 怀远建设局门户网站游戏优化大师官网
  • 平阴县网站建设微信朋友圈产品推广语
  • 天津微外卖网站建设seo如何快速排名
  • 直接做的视频网站小说关键词生成器
  • 涪陵网站制作my63777免费域名查询2023年
  • 佛山网站建设佛山网络推广厦门网站到首页排名
  • h5哪个网站可以做线上推广方式都有哪些
  • 网站策划书我与音乐搞一个公司网站得多少钱
  • 做网站建设优化的公司排名个人做外贸怎样起步
  • 小公司做网站推广好不好十大搜索引擎
  • 网站footer怎么做西安疫情最新数据消息中高风险地区
  • 青岛网站设计公司价格自己开发网站
  • 所有的网站都要用htmlu做吗湘潭网站设计外包公司
  • 海报设计制作平台重庆seo排名优化费用
  • 山西两学一做登录网站付费内容网站
  • 网站banner分辨率站长工具seo综合查询降级
  • web网站设计案例百度seoo优化软件
  • 网站防注入制作网站的基本流程
  • 四川网站建设电话买卖链接网
  • 哈尔滨网站推广关键词优化公司排名榜
  • vip影视网站如何做app免费建网页
  • 如何学习制作网站交换友链是什么意思
  • 零基础学做网站教程环球贸易网
  • 怎么做web网站百度登录个人中心官网
  • 凡科邮箱登录seo优化推广