Training llama2 weights with koalpaca dataset
I used the chat_completion data preprocessing code described here. Preprocessing notebook is provided here The following is an example of llama chat model input:
## dialog input example
dialogs = [
{"role": "system", "content": "Testing system"},
{"role": "user", "content": "Testing user"},
{"role": "assistant", "content": "Testing assistant"}
]
## processing dialog
[
{'role': 'user', 'content': '<<SYS>>\nTesting system\n<</SYS>>\n\nTesting user'},
{'role': 'assistant', 'content': 'Testing assistant'}
]
## tokenizer input
['[INST] <<SYS>>\nTesting system\n<</SYS>>\n\nTesting user [/INST] Testing assistant ']
With the koalpaca dataset the result are as following:
## Dialog Example
[
{'role': 'user', 'content': '양파는 어떤 식물 부위인가요? 그리고 고구마는 뿌리인가요?'},
{'role': 'assistant', 'content': '양파는 잎이 아닌 식물의 줄기 부분입니다. ...'}
]
## Dialog input mapped to tokenizer input
<s>[INST] <<SYS>>
You are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature.
If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information.
<</SYS>>
양파는 어떤 식물 부위인가요? 그리고 고구마는 뿌리인가요? [/INST] 양파는 잎이 아닌 식물의 줄기 부분입니다. 고구마는 식물의 뿌리 부분입니다.
식물의 부위의 구분에 대해 궁금해하는 분이라면 분명 이 질문에 대한 답을 찾고 있을 것입니다. 양파는 잎이 아닌 줄기 부분입니다...</s>
Training Code: train_qlora.py
python train_qlora.py
--out_dir weights \
--config_dir configs/13b_chat_hf.json \
--val_ratio 0.05
12 commits
Jupyter Notebook
81.1%
Python
18.9%
Training llama2 weights with koalpaca dataset
I used the chat_completion data preprocessing code described here. Preprocessing notebook is provided here The following is an example of llama chat model input:
## dialog input example
dialogs = [
{"role": "system", "content": "Testing system"},
{"role": "user", "content": "Testing user"},
{"role": "assistant", "content": "Testing assistant"}
]
## processing dialog
[
{'role': 'user', 'content': '<<SYS>>\nTesting system\n<</SYS>>\n\nTesting user'},
{'role': 'assistant', 'content': 'Testing assistant'}
]
## tokenizer input
['[INST] <<SYS>>\nTesting system\n<</SYS>>\n\nTesting user [/INST] Testing assistant ']
With the koalpaca dataset the result are as following:
## Dialog Example
[
{'role': 'user', 'content': '양파는 어떤 식물 부위인가요? 그리고 고구마는 뿌리인가요?'},
{'role': 'assistant', 'content': '양파는 잎이 아닌 식물의 줄기 부분입니다. ...'}
]
## Dialog input mapped to tokenizer input
<s>[INST] <<SYS>>
You are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature.
If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information.
<</SYS>>
양파는 어떤 식물 부위인가요? 그리고 고구마는 뿌리인가요? [/INST] 양파는 잎이 아닌 식물의 줄기 부분입니다. 고구마는 식물의 뿌리 부분입니다.
식물의 부위의 구분에 대해 궁금해하는 분이라면 분명 이 질문에 대한 답을 찾고 있을 것입니다. 양파는 잎이 아닌 줄기 부분입니다...</s>
Training Code: train_qlora.py
python train_qlora.py
--out_dir weights \
--config_dir configs/13b_chat_hf.json \
--val_ratio 0.05
12 commits
Jupyter Notebook
81.1%
Python
18.9%