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

Add axolotl training example #2744

Closed
casper-hansen opened this issue Oct 30, 2023 · 5 comments
Closed

Add axolotl training example #2744

casper-hansen opened this issue Oct 30, 2023 · 5 comments

Comments

@casper-hansen
Copy link

Axolotl is one of the most popular open-source pertaining and fine-tuning packages that make use of the Huggingface ecosystem.

Speed ups achieved in axolotl:

  • Implements sample packing (can be up to 10x faster)
  • Implements flash attention
  • Implements fused RMSNorm that speeds training 15-20
  • Memory efficiency with bitsandbytes 8-bit optimizer

Ease of use:

  • Specify a config, start training
  • Implements LoRA and QLoRA
  • Implements DeepSpeed and FSDP
  • Easy monitoring with wandb
  • Built-in prompt templates
  • Pulls and pushes datasets and models from and to Huggingface

https://github.com/OpenAccess-AI-Collective/axolotl

@concretevitamin
Copy link
Member

This would be great to have. Some users are already using axolotl:

#2671 (comment)

#2689 (comment)

@manishiitg
Copy link
Contributor

# jupyter.yaml

name: axolotl

resources:
  accelerators: A100:1
  cloud: gcp
  use_spot: True

file_mounts:
  /sky-notebook:
    source: gs://sky-notebook
    mode: MOUNT

workdir: mistral

setup: |
  docker pull winglian/axolotl:main-py3.10-cu118-2.0.1
  pip install autoawq peft

  

run: |
  docker run --gpus all \
    -v /home/gcpuser/sky_workdir:/sky_workdir \
    -v /root/.cache:/root/.cache \
    winglian/axolotl:main-latest \
    huggingface-cli login --token XXX

  docker run --gpus all \
    -v /home/gcpuser/sky_workdir:/sky_workdir \
    -v /root/.cache:/root/.cache \
    winglian/axolotl:main-latest \
                accelerate launch -m axolotl.cli.train /sky_workdir/hi-qlora.yaml

  
  
  
  


  


this would work

@concretevitamin
Copy link
Member

Awesome @manishiitg !! Would you like to open a PR and push it to llm/axolotl?

@manishiitg
Copy link
Contributor

@concretevitamin #2784

check this out

@concretevitamin
Copy link
Member

@casper-hansen This has been added by @manishiitg. Closing this.

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

No branches or pull requests

3 participants