From d81ae101f612f01e660f47f1398e16d10aa0ee5f Mon Sep 17 00:00:00 2001 From: Haofei Yu <1125027232@qq.com> Date: Wed, 27 Sep 2023 15:27:59 -0400 Subject: [PATCH] support together ai ft (#4) (cherry picked from commit 51727f4e70d19d48953b545eb167bab67af33edc) Signed-off-by: Haofei Yu <1125027232@qq.com> --- together_ai_ft/together_ai_data.jsonl | 100 ++++++++++++++++++++++++++ together_ai_ft/together_ai_ft.py | 22 ++++++ 2 files changed, 122 insertions(+) create mode 100644 together_ai_ft/together_ai_data.jsonl create mode 100644 together_ai_ft/together_ai_ft.py diff --git a/together_ai_ft/together_ai_data.jsonl b/together_ai_ft/together_ai_data.jsonl new file mode 100644 index 00000000..75367e46 --- /dev/null +++ b/together_ai_ft/together_ai_data.jsonl @@ -0,0 +1,100 @@ +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} +{"text":"[INST] how old are you? [/INST] one yaer old. "} \ No newline at end of file diff --git a/together_ai_ft/together_ai_ft.py b/together_ai_ft/together_ai_ft.py new file mode 100644 index 00000000..4ad4494e --- /dev/null +++ b/together_ai_ft/together_ai_ft.py @@ -0,0 +1,22 @@ +import together +import os + +resp = together.Files.upload(file="together_ai_data.jsonl") +file_id = resp["id"] +files_list = together.Files.list() + + +resp = together.Finetune.create( + training_file = files_list['data'][0]['id'], + model = 'togethercomputer/llama-2-7b-chat', + n_epochs = 3, + n_checkpoints = 1, + batch_size = 4, + learning_rate = 1e-5, + suffix = 'test-finetune', + wandb_api_key = '972035264241fb0f6cc3cab51a5d82f47ca713db', +) + +fine_tune_id = resp['id'] +print(resp) +