模型:
OpenAssistant/stablelm-7b-sft-v7-epoch-3
这是 Open-Assistant 项目的第7次迭代的英文监督细调(SFT)模型。它基于一个在2023年4月12日之前通过 https://open-assistant.io/ 人类反馈Web应用程序收集的助手对话的人类示范的StableLM 7B进行了微调。
有两个特殊令牌用于标记用户和助手交替的开始:<|prompter|>和<|assistant|>。每个交替以<|endoftext|>令牌结束。
输入提示示例:
<|prompter|>What is a meme, and what's the history behind this word?<|endoftext|><|assistant|>
输入以<|assistant|>令牌结尾,以表示模型应开始生成助手的回复。
命令:deepspeed trainer_sft.py --configs defaults stablelm-7b oasst-mix --cache_dir /home/ubuntu/data_cache --output_dir .saved/stable-lm-7b-1 --num_train_epochs 4 --deepspeed
数据:
oasst-mix: save_strategy: epoch sort_by_length: false use_custom_sampler: false datasets: - oasst_export: lang: "bg,ca,cs,da,de,en,es,fr,hr,hu,it,nl,pl,pt,ro,ru,sl,sr,sv,uk" input_file_path: 2023-04-12_oasst_release_ready_synth.jsonl.gz - vicuna: val_split: 0.05 max_val_set: 800 fraction: 1.0 - dolly15k: val_split: 0.05 max_val_set: 300 - grade_school_math_instructions: val_split: 0.05 - code_alpaca: val_split: 0.05 max_val_set: 250
stablelm:
stablelm-7b: dtype: fp16 log_dir: stablelm_log_7b model_name: stabilityai/stablelm-base-alpha-7b output_dir: stablelm_7b max_length: 4096 warmup_steps: 100 gradient_checkpointing: true gradient_accumulation_steps: 2 per_device_train_batch_size: 4 per_device_eval_batch_size: 4 eval_steps: 100 save_steps: 500 num_train_epochs: 4 save_total_limit: 4 use_flash_attention: true
零配置:
{ "fp16": { "enabled": "auto", "loss_scale": 0, "loss_scale_window": 1000, "initial_scale_power": 16, "hysteresis": 2, "min_loss_scale": 1 }, "bf16": { "enabled": "auto" }, "optimizer": { "type": "AdamW", "params": { "lr": "auto", "betas": "auto", "eps": "auto", "weight_decay": "auto" } }, "scheduler": { "type": "WarmupDecayLR", "params": { "warmup_min_lr": "auto", "warmup_max_lr": "auto", "warmup_num_steps": "auto", "total_num_steps": "auto" } }, "zero_optimization": { "stage": 2, "allgather_partitions": true, "allgather_bucket_size": 1e9, "overlap_comm": false, "reduce_scatter": true, "reduce_bucket_size": 1e9, "contiguous_gradients": true }, "gradient_accumulation_steps": "auto", "gradient_clipping": "auto", "steps_per_print": 2000, "train_batch_size": "auto", "train_micro_batch_size_per_gpu": "auto", "wall_clock_breakdown": false }