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

Ideas for faster training #742

Open
casper-hansen opened this issue Oct 18, 2023 · 0 comments
Open

Ideas for faster training #742

casper-hansen opened this issue Oct 18, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@casper-hansen
Copy link
Collaborator

casper-hansen commented Oct 18, 2023

Here are my ideas:

  1. Fuse layers
  2. ONNX Runtime (ORT) - full fine-tune only (optimum.onnxruntime.ORTTrainer)

Already implemented

Flash Attention - RMSNorm

Use flash_attn_rms_norm: true in config after installing. Speedup: 15-20%.

pip install 'git+https://github.com/Dao-AILab/flash-attention.git#egg=dropout_layer_norm&subdirectory=csrc/layer_norm'

Flash Attention - Cross Entropy

Use flash_attn_cross_entropy: true in config after installing. Speedup: 0%.

pip install 'git+https://github.com/Dao-AILab/flash-attention.git#egg=xentropy_cuda_lib&subdirectory=csrc/xentropy'
@casper-hansen casper-hansen added the enhancement New feature or request label Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant