diff --git a/pilot/chain/audio.py b/pilot/chain/audio.py new file mode 100644 index 000000000..8b197119c --- /dev/null +++ b/pilot/chain/audio.py @@ -0,0 +1,2 @@ +#!/usr/bin/env python3 +# -*- coding:utf-8 -*- \ No newline at end of file diff --git a/pilot/chain/visual.py b/pilot/chain/visual.py new file mode 100644 index 000000000..1f776fc63 --- /dev/null +++ b/pilot/chain/visual.py @@ -0,0 +1,2 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- \ No newline at end of file diff --git a/pilot/client/auto.py b/pilot/client/auto.py new file mode 100644 index 000000000..1f776fc63 --- /dev/null +++ b/pilot/client/auto.py @@ -0,0 +1,2 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- \ No newline at end of file diff --git a/pilot/client/chart.py b/pilot/client/chart.py new file mode 100644 index 000000000..6988cfe11 --- /dev/null +++ b/pilot/client/chart.py @@ -0,0 +1,2 @@ +#/usr/bin/env python3 +# -*- coding: utf-8 -*- \ No newline at end of file diff --git a/pilot/configs/model_config.py b/pilot/configs/model_config.py index df0318e2d..a5c27d9d2 100644 --- a/pilot/configs/model_config.py +++ b/pilot/configs/model_config.py @@ -11,6 +11,7 @@ PILOT_PATH = os.path.join(ROOT_PATH, "pilot") VECTORE_PATH = os.path.join(PILOT_PATH, "vector_store") LOGDIR = os.path.join(ROOT_PATH, "logs") DATASETS_DIR = os.path.join(PILOT_PATH, "datasets") +DATA_DIR = os.path.join(PILOT_PATH, "data") nltk.data.path = [os.path.join(PILOT_PATH, "nltk_data")] + nltk.data.path diff --git a/pilot/pturning/lora/finetune.py b/pilot/pturning/lora/finetune.py new file mode 100644 index 000000000..aeb581a3a --- /dev/null +++ b/pilot/pturning/lora/finetune.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +import os +import json +import transformers +from transformers import LlamaTokenizer, LlamaForCausalLM + +from typing import List +from peft import ( + LoraConfig, + get_peft_model, + get_peft_model_state_dict, + prepare_model_for_int8_training, +) + +import torch +from datasets import load_dataset +import pandas as pd + + +from pilot.configs.model_config import DATA_DIR +device = "cuda" if torch.cuda.is_available() else "cpu" +CUTOFF = 50 + +df = pd.read_csv(os.path.join(DATA_DIR, "BTC_Tweets_Updated.csv")) \ No newline at end of file diff --git a/pilot/server/chatbot.py b/pilot/server/chatbot.py deleted file mode 100644 index 97206f2d5..000000000 --- a/pilot/server/chatbot.py +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding:utf-8 -*- -