Skip to content

Commit

Permalink
Merge branch 'main' into flash-optimum
Browse files Browse the repository at this point in the history
  • Loading branch information
winglian authored Jun 12, 2023
2 parents c9a149f + 93dacba commit fd2c981
Show file tree
Hide file tree
Showing 36 changed files with 461 additions and 1,009 deletions.
3 changes: 3 additions & 0 deletions FAQS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@

- Can you train StableLM with this? Yes, but only with a single GPU atm. Multi GPU support is coming soon! Just waiting on this [PR](https://github.com/huggingface/transformers/pull/22874)
- Will this work with Deepspeed? That's still a WIP, but setting `export ACCELERATE_USE_DEEPSPEED=true` should work in some cases
- `Error invalid argument at line 359 in file /workspace/bitsandbytes/csrc/pythonInterface.c`
`/arrow/cpp/src/arrow/filesystem/s3fs.cc:2598: arrow::fs::FinalizeS3 was not called even though S3 was initialized.`
This could lead to a segmentation fault at exit. Try reinstalling bitsandbytes and transformers from source.
36 changes: 26 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@

## Axolotl supports

| | fp16/fp32 | fp16/fp32 w/ lora | qlora | 4bit-quant | 4bit-quant w/flash attention | flash attention | xformers attention |
|---------|:----------|:------------------|------|------------|------------------------------|-----------------|--------------------|
| llama ||||||||
| Pythia ||||||||
| cerebras ||||||||
| mpt ||||||||
| falcon ||||||||
| | fp16/fp32 | lora | qlora | gptq | gptq w/ lora | gptq w/flash attn | flash attn | xformers attn |
|----------|:----------|:-----|-------|------|:-------------|-------------------|------------|---------------|
| llama |||||||||
| Pythia |||||||||
| cerebras |||||||||
| mpt |||||||||
| falcon |||||||||
| gpt-j |||||||||


## Quickstart ⚡
Expand All @@ -38,10 +39,10 @@ pip3 install -U git+https://github.com/huggingface/peft.git
accelerate config

# finetune lora
accelerate launch scripts/finetune.py examples/lora-openllama-3b/config.yml
accelerate launch scripts/finetune.py examples/openllama-3b/lora.yml

# inference
accelerate launch scripts/finetune.py examples/lora-openllama-3b/config.yml \
accelerate launch scripts/finetune.py examples/openllama-3b/lora.yml \
--inference --lora_model_dir="./lora-out"
```

Expand Down Expand Up @@ -218,6 +219,14 @@ Have dataset(s) in one of the following format (JSONL recommended):
```json
{"conversations": [{"role": "...", "value": "..."}]}
```
- `sharegpt_simple.load_role`: conversations where `role` is used instead of `from`
```json
{"conversations": [{"role": "...", "value": "..."}]}
```
- `sharegpt_jokes`: creates a chat where bot is asked to tell a joke, then explain why the joke is funny
```json
{"conversations": [{"title": "...", "text": "...", "explanation": "..."}]}
```

</details>

Expand Down Expand Up @@ -381,6 +390,8 @@ num_epochs: 3
warmup_steps: 100
learning_rate: 0.00003
logging_steps:
save_steps:
eval_steps:
# whether to mask out or include the human's prompt from the training labels
train_on_inputs: false
Expand Down Expand Up @@ -497,6 +508,11 @@ Pass the appropriate flag to the train command:
```bash
--inference --base_model ./completed-model
```
- Full weights finetune w/ a prompt from a text file:
```bash
cat /tmp/prompt.txt | python scripts/finetune.py configs/your_config.yml \
--base_model ./completed-model --inference --prompter=None --load_in_8bit=True
```

### Merge LORA to base

Expand Down Expand Up @@ -524,7 +540,7 @@ Try set `fp16: true`

Try to turn off xformers.

## Need help? 🙋♂️
## Need help? 🙋♂️

Join our [Discord server](https://discord.gg/HhrNrHJPRb) where we can help you

Expand Down
15 changes: 0 additions & 15 deletions configs/accelerate/default_config.yaml

This file was deleted.

40 changes: 0 additions & 40 deletions configs/cerebras_1_3B_alpaca.yml

This file was deleted.

41 changes: 0 additions & 41 deletions configs/galactica_1_3B.yml

This file was deleted.

39 changes: 0 additions & 39 deletions configs/llama_13B_alpaca.yml

This file was deleted.

44 changes: 0 additions & 44 deletions configs/llama_65B_alpaca.yml

This file was deleted.

45 changes: 0 additions & 45 deletions configs/llama_7B_4bit.yml

This file was deleted.

41 changes: 0 additions & 41 deletions configs/llama_7B_alpaca.yml

This file was deleted.

Loading

0 comments on commit fd2c981

Please sign in to comment.