|
| 1 | +# Bagel fine tuning |
| 2 | + |
| 3 | +## Setup |
| 4 | + |
| 5 | +Go to [bakery.bagel.net](https://bakery.bagel.net) and create an account. Then get an API key. |
| 6 | + |
| 7 | +Set the `BAGEL_API_KEY` environment variable to your API key. |
| 8 | + |
| 9 | +In bakery, create your model and fine-tune dataset. |
| 10 | + |
| 11 | +## Fine-tune with Eliza |
| 12 | + |
| 13 | +```bash |
| 14 | +curl -X POST http://localhost:3000/fine-tune \ |
| 15 | + -H "Content-Type: application/json" \ |
| 16 | + -H "Authorization: Bearer jvBpxrTNqGqhnfQhSEqCdsG6aTSP8IBL" \ |
| 17 | + -d '{ |
| 18 | + "dataset_type": "MODEL", |
| 19 | + "title": "smollm2-fine-tuning-00000099", |
| 20 | + "category": "AI", |
| 21 | + "details": "Test", |
| 22 | + "tags": [], |
| 23 | + "user_id": "96c633e6-e973-446e-b782-6235324c0a56", |
| 24 | + "fine_tune_payload": { |
| 25 | + "asset_id": "d0a3f665-c207-4ee6-9daa-0cbdb272eeca", |
| 26 | + "model_name": "llama3-fine-tuning-00000001", |
| 27 | + "base_model": "0488b40b-829f-4c3a-9880-d55d76775dd1", |
| 28 | + "file_name": "qa_data.csv", |
| 29 | + "epochs": 1, |
| 30 | + "learning_rate": 0.01, |
| 31 | + "user_id": "96c633e6-e973-446e-b782-6235324c0a56", |
| 32 | + "use_ipfs": "false", |
| 33 | + "input_column": "question", |
| 34 | + "output_column": "answer" |
| 35 | + } |
| 36 | + }' |
| 37 | +``` |
| 38 | +This can take a while to complete. You can check the status of the fine-tune job in the bakery dashboard. When it is complete, you can download the fine-tuned model here: |
| 39 | + |
| 40 | +```bash |
| 41 | +curl -X GET "http://localhost:3000/fine-tune/8566c47a-ada8-441c-95bc-7bb07656c4c1" \ |
| 42 | + -H "Content-Type: application/json" \ |
| 43 | + -H "Authorization: Bearer jvBpxrTNqGqhnfQhSEqCdsG6aTSP8IBL". |
| 44 | +``` |
0 commit comments