Skip to content

Commit

Permalink
chore(config): refactor old mistral config (#1435)
Browse files Browse the repository at this point in the history
* chore(config): refactor old mistral config

* chore: add link to colab on readme
  • Loading branch information
NanoCode012 authored Mar 25, 2024
1 parent 99c708f commit 7a5972b
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 1,022 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Features:
- [Bare Metal Cloud GPU](#bare-metal-cloud-gpu)
- [Windows](#windows)
- [Mac](#mac)
- [Google Colab](#google-colab)
- [Launching on public clouds via SkyPilot](#launching-on-public-clouds-via-skypilot)
- [Dataset](#dataset)
- [How to Add Custom Prompts](#how-to-add-custom-prompts)
Expand Down Expand Up @@ -269,6 +270,10 @@ pip3 install -e '.'
```
More info: [mac.md](/docs/mac.qmd)

#### Google Colab

Please use this example [notebook](examples/colab-notebooks/colab-axolotl-example.ipynb).

#### Launching on public clouds via SkyPilot
To launch on GPU instances (both on-demand and spot instances) on 7+ clouds (GCP, AWS, Azure, OCI, and more), you can use [SkyPilot](https://skypilot.readthedocs.io/en/latest/index.html):

Expand Down
12 changes: 0 additions & 12 deletions examples/mistral/Mistral-7b-example/README.md

This file was deleted.

970 changes: 0 additions & 970 deletions examples/mistral/Mistral-7b-example/code.ipynb

This file was deleted.

10 changes: 0 additions & 10 deletions examples/mistral/Mistral-7b-example/data.jsonl

This file was deleted.

3 changes: 0 additions & 3 deletions examples/mistral/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,3 @@ weight_decay: 0.0
fsdp:
fsdp_config:
special_tokens:
bos_token: "<s>"
eos_token: "</s>"
unk_token: "<unk>"
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#Mistral-7b
base_model: mistralai/Mistral-7B-v0.1
model_type: MistralForCausalLM
tokenizer_type: LlamaTokenizer
Expand All @@ -8,45 +7,50 @@ load_in_4bit: false
strict: false

datasets:
- path: tilemachos/Demo-Dataset #Path to json dataset file in huggingface
#for type,conversation arguments read axolotl readme and pick what is suited for your project, I wanted a chatbot and put sharegpt and chatml
type: sharegpt
conversation: chatml
dataset_prepared_path: tilemachos/Demo-Dataset #Path to json dataset file in huggingface
val_set_size: 0.05
output_dir: ./out
- path: mhenrichsen/alpaca_2k_test
type: alpaca
dataset_prepared_path: last_run_prepared
val_set_size: 0.1
output_dir: ./lora-out

#using lora for lower cost
adapter: lora
lora_r: 8
lora_model_dir:

sequence_len: 8192
sample_packing: true
pad_to_sequence_len: true

lora_r: 32
lora_alpha: 16
lora_dropout: 0.05
lora_target_linear: true
lora_fan_in_fan_out:
lora_target_modules:
- gate_proj
- down_proj
- up_proj
- q_proj
- v_proj

sequence_len: 512
sample_packing: false
pad_to_sequence_len: true
- k_proj
- o_proj

wandb_project:
wandb_entity:
wandb_watch:
wandb_name:
wandb_log_model:

#only 2 epochs because of small dataset
gradient_accumulation_steps: 3
gradient_accumulation_steps: 4
micro_batch_size: 2
num_epochs: 2
num_epochs: 1
optimizer: adamw_bnb_8bit
lr_scheduler: cosine
learning_rate: 0.0002

train_on_inputs: false
group_by_length: false
bf16: true
fp16: false
bf16: auto
fp16:
tf32: false

gradient_checkpointing: true
Expand All @@ -57,18 +61,17 @@ logging_steps: 1
xformers_attention:
flash_attention: true

loss_watchdog_threshold: 5.0
loss_watchdog_patience: 3

warmup_steps: 10
evals_per_epoch: 4
eval_table_size:
eval_max_new_tokens: 128
saves_per_epoch: 1
debug:
#default deepspeed, can use more aggresive if needed like zero2, zero3
deepspeed: deepspeed_configs/zero1.json
deepspeed:
weight_decay: 0.0
fsdp:
fsdp_config:
special_tokens:
bos_token: "<s>"
eos_token: "</s>"
unk_token: "<unk>"
3 changes: 0 additions & 3 deletions examples/mistral/qlora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,3 @@ weight_decay: 0.0
fsdp:
fsdp_config:
special_tokens:
bos_token: "<s>"
eos_token: "</s>"
unk_token: "<unk>"

0 comments on commit 7a5972b

Please sign in to comment.