nicholasKluge commited on
Commit
77d519e
·
1 Parent(s): cb93587

Upload 9 files

Browse files
AIRA_FineTuning.ipynb ADDED
The diff for this file is too large to render. See raw diff
 
README.md CHANGED
@@ -36,7 +36,7 @@ inference:
36
 
37
  `Aira-Instruct-PT-560M` is a instruction-tuned GPT-style model based on [BLOOM](https://huggingface.co/bigscience/bloom-560m). The model was trained with a dataset composed of `prompt`, `completions`, generated via the [Self-Instruct](https://github.com/yizhongw/self-instruct) framework. `Aira-Instruct-PT-560M` instruction-tuning was achieved via conditional text generation.
38
 
39
- The dataset used to train this model combines two main sources of data: the [`synthetic-instruct-gptj-pairwise`](https://huggingface.co/datasets/Dahoas/synthetic-instruct-gptj-pairwise) dataset and a subset of [Aira's](https://github.com/Nkluge-correa/Aira-EXPERT) fine-tuning dataset focused on Ethics, AI, AI safety, and related topics. The dataset is available in both Portuguese and English.
40
 
41
  Check our gradio-demo in [Spaces](https://huggingface.co/spaces/nicholasKluge/Aira-Demo-Portuguese).
42
 
@@ -50,16 +50,16 @@ Check our gradio-demo in [Spaces](https://huggingface.co/spaces/nicholasKluge/Ai
50
  - **Optimizer:** `torch.optim.AdamW` (warmup_steps = 1e2, learning_rate = 5e-4, epsilon = 1e-8)
51
  - **GPU:** 1 NVIDIA A100-SXM4-40GB
52
 
53
- | Epoch/Loss|Training|Validation|
54
  |---|---|---|
55
- | 1 |0.924344|0.694394|
56
- | 2 |0.539829|0.62107|
57
 
58
  This repository has the notebook used to train this model.
59
 
60
  ## Usage
61
 
62
- Two special tokens are used to mark the user side of the interaction and the model's response:
63
 
64
  `<|startoftext|>`What is a language model?`<|endoftext|>`A language model is a probability distribution over a vocabulary.`<|endoftext|>`
65
 
@@ -93,7 +93,6 @@ responses = aira.generate(**inputs,
93
  print(f"Question: 👤 {question}\n")
94
 
95
  for i, response in enumerate(responses):
96
- # print only the response and remove the question
97
  print(f'Response {i+1}: 🤖 {tokenizer.decode(response, skip_special_tokens=True).replace(question, "")}')
98
  ```
99
 
@@ -130,4 +129,4 @@ The model will output something like:
130
 
131
  ## License
132
 
133
- The `Aira-Instruct-PT-560M` is licensed under the Apache License, Version 2.0. See the [LICENSE](LICENSE) file for more details.
 
36
 
37
  `Aira-Instruct-PT-560M` is a instruction-tuned GPT-style model based on [BLOOM](https://huggingface.co/bigscience/bloom-560m). The model was trained with a dataset composed of `prompt`, `completions`, generated via the [Self-Instruct](https://github.com/yizhongw/self-instruct) framework. `Aira-Instruct-PT-560M` instruction-tuning was achieved via conditional text generation.
38
 
39
+ The dataset used to train this model combines the following sources of data: the [`synthetic-instruct-gptj-pairwise`](https://huggingface.co/datasets/Dahoas/synthetic-instruct-gptj-pairwise) dataset, the [`databricks_dolly_15k`](https://huggingface.co/datasets/HuggingFaceH4/databricks_dolly_15k) dataset, the [`instruction-dataset`](https://huggingface.co/datasets/HuggingFaceH4/instruction-dataset) dataset, and a subset of [Aira's](https://github.com/Nkluge-correa/Aira-EXPERT) fine-tuning dataset, focused on Q&A related to Ethics, AI, AI safety, and other related topics. The dataset is available in both Portuguese and English.
40
 
41
  Check our gradio-demo in [Spaces](https://huggingface.co/spaces/nicholasKluge/Aira-Demo-Portuguese).
42
 
 
50
  - **Optimizer:** `torch.optim.AdamW` (warmup_steps = 1e2, learning_rate = 5e-4, epsilon = 1e-8)
51
  - **GPU:** 1 NVIDIA A100-SXM4-40GB
52
 
53
+ | Epoch|Training Loss|Validation Loss|
54
  |---|---|---|
55
+ | 1 |0.932357|0.740638|
56
+ | 2 |0.578139|0.668778|
57
 
58
  This repository has the notebook used to train this model.
59
 
60
  ## Usage
61
 
62
+ Two special tokens are used to mark the user side of the interaction and the model's response:
63
 
64
  `<|startoftext|>`What is a language model?`<|endoftext|>`A language model is a probability distribution over a vocabulary.`<|endoftext|>`
65
 
 
93
  print(f"Question: 👤 {question}\n")
94
 
95
  for i, response in enumerate(responses):
 
96
  print(f'Response {i+1}: 🤖 {tokenizer.decode(response, skip_special_tokens=True).replace(question, "")}')
97
  ```
98
 
 
129
 
130
  ## License
131
 
132
+ The `Aira-Instruct-PT-560M` is licensed under the Apache License, Version 2.0. See the [LICENSE](LICENSE) file for more details.
config.json CHANGED
@@ -25,7 +25,7 @@
25
  "skip_bias_add_qkv": false,
26
  "slow_but_exact": false,
27
  "torch_dtype": "float32",
28
- "transformers_version": "4.29.2",
29
  "unk_token_id": 0,
30
  "use_cache": true,
31
  "vocab_size": 250683
 
25
  "skip_bias_add_qkv": false,
26
  "slow_but_exact": false,
27
  "torch_dtype": "float32",
28
+ "transformers_version": "4.30.2",
29
  "unk_token_id": 0,
30
  "use_cache": true,
31
  "vocab_size": 250683
generation_config.json CHANGED
@@ -3,5 +3,5 @@
3
  "bos_token_id": 1,
4
  "eos_token_id": 2,
5
  "pad_token_id": 3,
6
- "transformers_version": "4.29.2"
7
  }
 
3
  "bos_token_id": 1,
4
  "eos_token_id": 2,
5
  "pad_token_id": 3,
6
+ "transformers_version": "4.30.2"
7
  }
pytorch_model.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:9c0f3b1d27e0dd60ba4e7d8e145eb319cffd8b6038b6955a4b46b3eea42ae055
3
  size 2236150625
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fe38e953bc76866a6d9b0eaf870311db8fca4768c6d0fd5ff66c67b3d8f08ac7
3
  size 2236150625
training_stats.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:7164db923be9d5c096ba5f7be8fd41e29070a349aac9497ff7273def2a6b14fd
3
- size 3041
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3be55941ee6155d9fe50d80a97931091829f3222dd41b3370a8a45dfcfd9cfa5
3
+ size 3042