jondurbin / mpt-30b-qlora-compatible

huggingface.co
Total runs: 98
24-hour runs: -1
7-day runs: -6
30-day runs: 25
Model's Last Updated: July 14 2023
text-generation

Introduction of mpt-30b-qlora-compatible

Model Details of mpt-30b-qlora-compatible

Slightly modified mpt-30b, which has some updates to allow gradient checkpointing/etc., to be compatible with qlora training code.

Original model: https://huggingface.co/mosaicml/mpt-30b

My fork of qlora with mpt-30b support: https://github.com/jondurbin/qlora

Differences in the qlora scripts:

  • requires adding --mpt True for mpt-based models
  • uses --num_train_epochs instead of --max_steps
  • uses airoboros prompt format (mostly 1:1 with vicuna) rather than alpaca, and expects an input file in JSONL format with "instruction" and "response"

I think there's a bug in gradient accumulation, so if you try this, maybe set gradient accumulation steps to 1

my first attempts used batch size 6, with gradient accumulation steps 16, but results of three epochs with gradient accumulation vs without were quite a bit worse

5 epochs seemed to achieve the best results, but YMMV

Full example of tuning (used for airoboros-mpt-30b-gpt4-1.4):

source /workspace/venv/bin/activate
export PYTHONPATH=./mpt-30b
export WANDB_API_KEY=[redacted]
export WANDB_PROJECT=airoboros-mpt-30b-gpt4-1.4

python qlora.py \
    --model_name_or_path ./mpt-30b \
    --output_dir ./$WANDB_PROJECT-checkpoints \
    --num_train_epochs 5 \
    --logging_steps 1 \
    --save_strategy steps \
    --data_seed 11422 \
    --save_steps 100 \
    --save_total_limit 3 \
    --evaluation_strategy "no" \
    --eval_dataset_size 2 \
    --max_new_tokens 8192 \
    --dataloader_num_workers 3 \
    --logging_strategy steps \
    --remove_unused_columns False \
    --do_train \
    --lora_r 64 \
    --lora_alpha 16 \
    --lora_modules all \
    --double_quant \
    --quant_type nf4 \
    --bf16 \
    --bits 4 \
    --warmup_ratio 0.03 \
    --lr_scheduler_type constant \
    --dataset ./instructions.jsonl \
    --dataset_format airoboros \
    --model_max_len 8192 \
    --gradient_checkpointing \
    --per_device_train_batch_size 6 \
    --gradient_accumulation_steps 1 \
    --learning_rate 0.0001 \
    --adam_beta2 0.999 \
    --max_grad_norm 0.3 \
    --lora_dropout 0.05 \
    --weight_decay 0.0 \
    --seed 11422 \
    --trust_remote_code \
    --mpt True \
    --report_to wandb
Merged model

Run the merge_weights.py script in the qlora repo: https://github.com/jondurbin/qlora/blob/main/merge_weights.py

Then, copy all of the original python files from the mpt-30b repo into your output directory: https://huggingface.co/mosaicml/mpt-30b/tree/main

Runs of jondurbin mpt-30b-qlora-compatible on huggingface.co

98
Total runs
-1
24-hour runs
-10
3-day runs
-6
7-day runs
25
30-day runs

More Information About mpt-30b-qlora-compatible huggingface.co Model

mpt-30b-qlora-compatible huggingface.co

mpt-30b-qlora-compatible huggingface.co is an AI model on huggingface.co that provides mpt-30b-qlora-compatible's model effect (), which can be used instantly with this jondurbin mpt-30b-qlora-compatible model. huggingface.co supports a free trial of the mpt-30b-qlora-compatible model, and also provides paid use of the mpt-30b-qlora-compatible. Support call mpt-30b-qlora-compatible model through api, including Node.js, Python, http.

mpt-30b-qlora-compatible huggingface.co Url

https://huggingface.co/jondurbin/mpt-30b-qlora-compatible

jondurbin mpt-30b-qlora-compatible online free

mpt-30b-qlora-compatible huggingface.co is an online trial and call api platform, which integrates mpt-30b-qlora-compatible's modeling effects, including api services, and provides a free online trial of mpt-30b-qlora-compatible, you can try mpt-30b-qlora-compatible online for free by clicking the link below.

jondurbin mpt-30b-qlora-compatible online free url in huggingface.co:

https://huggingface.co/jondurbin/mpt-30b-qlora-compatible

mpt-30b-qlora-compatible install

mpt-30b-qlora-compatible is an open source model from GitHub that offers a free installation service, and any user can find mpt-30b-qlora-compatible on GitHub to install. At the same time, huggingface.co provides the effect of mpt-30b-qlora-compatible install, users can directly use mpt-30b-qlora-compatible installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

mpt-30b-qlora-compatible install url in huggingface.co:

https://huggingface.co/jondurbin/mpt-30b-qlora-compatible

Url of mpt-30b-qlora-compatible

mpt-30b-qlora-compatible huggingface.co Url

Provider of mpt-30b-qlora-compatible huggingface.co

jondurbin
ORGANIZATIONS

Other API from jondurbin

huggingface.co

Total runs: 25
Run Growth: 3
Growth Rate: 12.00%
Updated:December 28 2023