Add example to fine-tune StarCoder for chat-based applications #17

Merged
lewtun merged 10 commits from starchat into main 2023-05-09 12:02:12 -04:00
lewtun commented 2023-05-08 05:13:21 -04:00 (Migrated from github.com)

TODO

  • Add a "news" entry to the main README
## TODO - [x] Add a "news" entry to the main README
ArmelRandy (Migrated from github.com) reviewed 2023-05-08 05:13:21 -04:00
lvwerra (Migrated from github.com) approved these changes 2023-05-09 05:21:02 -04:00
lvwerra (Migrated from github.com) left a comment

Looks good overall. Left only a few minor comments.

I am mostly wondering if we could have used the SFTTrainer to reduce a bit the amount of code needed for train.py or run a simple preprocessing script that pushes the formated dataset to the hub for the script to reduce a bit the amount of code. Don't think we need to change anything now but I think we should provide a bit more utility to be able to make such examples more concise.

Looks good overall. Left only a few minor comments. I am mostly wondering if we could have used the `SFTTrainer` to reduce a bit the amount of code needed for `train.py` or run a simple preprocessing script that pushes the formated dataset to the hub for the script to reduce a bit the amount of code. Don't think we need to change anything now but I think we should provide a bit more utility to be able to make such examples more concise.
@ -0,0 +1,111 @@
# Fine-tuning StarCoder for chat-based applications
This is a fully-working example to fine-tune `StarCoder` on a corpus of multi-turn dialogues and thus create a coding assistant that is chatty and helpful. The resulting model is quite good at generating code for plots and other programming tasks. For example, given the prompt:
lvwerra (Migrated from github.com) commented 2023-05-09 05:11:34 -04:00

maybe some examples of what the model can do after tuning would be cool to show here.

maybe some examples of what the model can do after tuning would be cool to show here.
@ -0,0 +108,4 @@
```shell
python generate.py --model_id path/to/your/model
```
lvwerra (Migrated from github.com) commented 2023-05-09 05:17:56 -04:00

I guess something is missing here :)

I guess something is missing here :)
lewtun commented 2023-05-09 08:33:24 -04:00 (Migrated from github.com)

Looks good overall. Left only a few minor comments.

I am mostly wondering if we could have used the SFTTrainer to reduce a bit the amount of code needed for train.py or run a simple preprocessing script that pushes the formated dataset to the hub for the script to reduce a bit the amount of code. Don't think we need to change anything now but I think we should provide a bit more utility to be able to make such examples more concise.

Yes I agree this would be nice to do & I'll fix this in a follow-up PR (I ran out of time to test everything with the new API)

> Looks good overall. Left only a few minor comments. > > I am mostly wondering if we could have used the `SFTTrainer` to reduce a bit the amount of code needed for `train.py` or run a simple preprocessing script that pushes the formated dataset to the hub for the script to reduce a bit the amount of code. Don't think we need to change anything now but I think we should provide a bit more utility to be able to make such examples more concise. Yes I agree this would be nice to do & I'll fix this in a follow-up PR (I ran out of time to test everything with the new API)
lewtun (Migrated from github.com) reviewed 2023-05-09 08:33:32 -04:00
@ -0,0 +108,4 @@
```shell
python generate.py --model_id path/to/your/model
```
lewtun (Migrated from github.com) commented 2023-05-09 08:33:32 -04:00

Good catch!

Good catch!
philschmid (Migrated from github.com) approved these changes 2023-05-09 08:35:27 -04:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
bigcode-project/starcoder!17
No description provided.