Skip to content

Commit d0093cc

Browse files
authored
Merge pull request elizaOS#654 from justabot/download_updates
CS - adding better errors and readme.
2 parents 6407efd + bbcf3b6 commit d0093cc

File tree

2 files changed

+45
-1
lines changed

2 files changed

+45
-1
lines changed

packages/client-direct/src/README.md

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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+
```

packages/client-direct/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ export class DirectClient {
290290
res.json(data);
291291
} catch (error) {
292292
res.status(500).json({
293-
error: 'Failed to forward request to BagelDB',
293+
error: 'Please create an account at bakery.bagel.net and get an API key. Then set the BAGEL_API_KEY environment variable.',
294294
details: error.message
295295
});
296296
}

0 commit comments

Comments
 (0)