Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Support Sequence parallel #456

Merged
merged 31 commits into from
Mar 22, 2024
Merged

Conversation

HIT-cwh
Copy link
Collaborator

@HIT-cwh HIT-cwh commented Mar 8, 2024

【已完成】

  1. 序列并行相关功能开发,每一部分都提供api,可供XTuner及其他repo调用
    a. 分布式环境初始化
    b. 数据pad与切分
    c. data sampler 适配
    d. Attention 部分适配序列并行
    e. 训练loss sequence parallel group 内reduce
  2. llama 64k上下文训练示例config
  3. 用户文档

【待完成】

  1. 支持 HF Trainer 序列并行训练示例
  2. release llama 64k 128k 上下文评测结果
  3. 支持Internlm、llama之外的模型的序列并行
  4. 完善文档

@pppppM pppppM changed the title [WIP] Support Sequence parallel [Feature] Support Sequence parallel Mar 22, 2024
@pppppM pppppM merged commit 5983403 into InternLM:main Mar 22, 2024
1 check passed
pppppM pushed a commit to pppppM/xtuner that referenced this pull request Mar 29, 2024
* support sequence

* add configs

* add sp example to custom dataset

* WIP

* add dispatch utils

* delete useless codes

* move xtuner/engine/sequence_parallel to xtuner/parallel/sequence

* fix lint

* fix lint

* add init_dist to xtuner and add trust_remote_code=True to AutoConfig

* add internlm2 custom_dataset sp4 config

* Sequence Parallel doc V1

* Sequence Parallel doc V1

* Sequence Parallel doc V1

* fix bugs in llama_varlen_attn_forward

* rename indexes to position_ids

* add attn_implementation to config

* delete useless codes

* fix lint

* refine default_collate_fn

* refine doc

* refine doc

* refine doc

* delete replace_internlm2_rote

* add repeat_kv_bshd

* fix apply_rotary_pos_emb bug

* add enable_sequence_parallel flag

* refine doc

* assert {'input_ids', 'labels'}.issubset(dataset.column_names)

* refine doc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants