codefactory4791 commited on
Commit
5b97fc0
1 Parent(s): c623d21

End of training

Browse files
README.md CHANGED
@@ -1,65 +1,57 @@
1
  ---
2
- license: mit
3
  base_model: openai-community/gpt2
 
 
4
  tags:
 
5
  - trl
6
  - sft
7
- - generated_from_trainer
8
- datasets:
9
- - piqa
10
- model-index:
11
- - name: gpt_finetuned_piqa
12
- results: []
13
  ---
14
 
15
- <!-- This model card has been generated automatically according to the information the Trainer had access to. You
16
- should probably proofread and complete it, then remove this comment. -->
17
-
18
- # gpt_finetuned_piqa
19
-
20
- This model is a fine-tuned version of [openai-community/gpt2](https://huggingface.co/openai-community/gpt2) on the piqa dataset.
21
- It achieves the following results on the evaluation set:
22
- - Loss: 2.9017
23
 
24
- ## Model description
 
25
 
26
- More information needed
27
 
28
- ## Intended uses & limitations
 
29
 
30
- More information needed
 
 
 
 
31
 
32
- ## Training and evaluation data
33
 
34
- More information needed
35
 
36
- ## Training procedure
37
 
38
- ### Training hyperparameters
39
 
40
- The following hyperparameters were used during training:
41
- - learning_rate: 5e-05
42
- - train_batch_size: 8
43
- - eval_batch_size: 8
44
- - seed: 42
45
- - gradient_accumulation_steps: 4
46
- - total_train_batch_size: 32
47
- - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
48
- - lr_scheduler_type: linear
49
- - num_epochs: 3
50
 
51
- ### Training results
 
 
 
 
52
 
53
- | Training Loss | Epoch | Step | Validation Loss |
54
- |:-------------:|:------:|:----:|:---------------:|
55
- | 3.1691 | 0.9926 | 500 | 2.9619 |
56
- | 2.9055 | 1.9851 | 1000 | 2.9117 |
57
- | 2.7908 | 2.9777 | 1500 | 2.9017 |
58
 
59
 
60
- ### Framework versions
61
 
62
- - Transformers 4.43.3
63
- - Pytorch 2.3.1+cu121
64
- - Datasets 2.20.0
65
- - Tokenizers 0.19.1
 
 
 
 
 
 
 
 
 
1
  ---
 
2
  base_model: openai-community/gpt2
3
+ library_name: transformers
4
+ model_name: gpt_finetuned_piqa
5
  tags:
6
+ - generated_from_trainer
7
  - trl
8
  - sft
9
+ licence: license
 
 
 
 
 
10
  ---
11
 
12
+ # Model Card for gpt_finetuned_piqa
 
 
 
 
 
 
 
13
 
14
+ This model is a fine-tuned version of [openai-community/gpt2](https://huggingface.co/openai-community/gpt2).
15
+ It has been trained using [TRL](https://github.com/huggingface/trl).
16
 
17
+ ## Quick start
18
 
19
+ ```python
20
+ from transformers import pipeline
21
 
22
+ question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"
23
+ generator = pipeline("text-generation", model="codefactory4791/gpt_finetuned_piqa", device="cuda")
24
+ output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
25
+ print(output["generated_text"])
26
+ ```
27
 
28
+ ## Training procedure
29
 
 
30
 
 
31
 
32
+ This model was trained with SFT.
33
 
34
+ ### Framework versions
 
 
 
 
 
 
 
 
 
35
 
36
+ - TRL: 0.12.0
37
+ - Transformers: 4.46.1
38
+ - Pytorch: 2.0.0
39
+ - Datasets: 3.1.0
40
+ - Tokenizers: 0.20.1
41
 
42
+ ## Citations
 
 
 
 
43
 
44
 
 
45
 
46
+ Cite TRL as:
47
+
48
+ ```bibtex
49
+ @misc{vonwerra2022trl,
50
+ title = {{TRL: Transformer Reinforcement Learning}},
51
+ author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallouédec},
52
+ year = 2020,
53
+ journal = {GitHub repository},
54
+ publisher = {GitHub},
55
+ howpublished = {\url{https://github.com/huggingface/trl}}
56
+ }
57
+ ```
config.json CHANGED
@@ -34,7 +34,7 @@
34
  }
35
  },
36
  "torch_dtype": "float32",
37
- "transformers_version": "4.43.3",
38
  "use_cache": true,
39
  "vocab_size": 50257
40
  }
 
34
  }
35
  },
36
  "torch_dtype": "float32",
37
+ "transformers_version": "4.46.1",
38
  "use_cache": true,
39
  "vocab_size": 50257
40
  }
generation_config.json CHANGED
@@ -2,5 +2,5 @@
2
  "_from_model_config": true,
3
  "bos_token_id": 50256,
4
  "eos_token_id": 50256,
5
- "transformers_version": "4.43.3"
6
  }
 
2
  "_from_model_config": true,
3
  "bos_token_id": 50256,
4
  "eos_token_id": 50256,
5
+ "transformers_version": "4.46.1"
6
  }
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:6e15fc2bd2061bafdc7c9f6f6e143afee62face443a4b8704c1d5cc49fe9b404
3
  size 497774208
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2971dd8005dcd9cb4963b180536afefdc299d7b27565d886d1683311148f0f0e
3
  size 497774208
runs/Nov02_21-24-00_algo-1/events.out.tfevents.1730582646.algo-1.64.0 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f92b3c8101a7302b735c7cd5a23fe3b6d0e5041727539a3e6903d2502f105c96
3
+ size 7386
tokenizer.json CHANGED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json CHANGED
@@ -11,7 +11,7 @@
11
  }
12
  },
13
  "bos_token": "<|endoftext|>",
14
- "clean_up_tokenization_spaces": true,
15
  "eos_token": "<|endoftext|>",
16
  "model_max_length": 1024,
17
  "pad_token": "<|endoftext|>",
 
11
  }
12
  },
13
  "bos_token": "<|endoftext|>",
14
+ "clean_up_tokenization_spaces": false,
15
  "eos_token": "<|endoftext|>",
16
  "model_max_length": 1024,
17
  "pad_token": "<|endoftext|>",
training_args.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:cabb7763feb6645e3072b469427e9703053a441cef0fa7184855fb1963256c57
3
- size 5432
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:62255c3a4e20ba737fd383368c1f2f1ea363dec4a924592ba61db4ae82241a63
3
+ size 5051