GPT-2
This commit is contained in:
parent
b38c6db958
commit
a5fb14928c
5085
GPT_2.ipynb
5085
GPT_2.ipynb
File diff suppressed because it is too large
Load Diff
56
models/gpt2/README.md
Normal file
56
models/gpt2/README.md
Normal file
@ -0,0 +1,56 @@
|
||||
---
|
||||
license: mit
|
||||
tags:
|
||||
- generated_from_trainer
|
||||
metrics:
|
||||
- accuracy
|
||||
model-index:
|
||||
- name: gpt2
|
||||
results: []
|
||||
---
|
||||
|
||||
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
||||
should probably proofread and complete it, then remove this comment. -->
|
||||
|
||||
# gpt2
|
||||
|
||||
This model is a fine-tuned version of [gpt2](https://huggingface.co/gpt2) on an unknown dataset.
|
||||
It achieves the following results on the evaluation set:
|
||||
- Loss: 0.2178
|
||||
- Accuracy: 0.9231
|
||||
|
||||
## Model description
|
||||
|
||||
More information needed
|
||||
|
||||
## Intended uses & limitations
|
||||
|
||||
More information needed
|
||||
|
||||
## Training and evaluation data
|
||||
|
||||
More information needed
|
||||
|
||||
## Training procedure
|
||||
|
||||
### Training hyperparameters
|
||||
|
||||
The following hyperparameters were used during training:
|
||||
- learning_rate: 2e-05
|
||||
- train_batch_size: 24
|
||||
- eval_batch_size: 24
|
||||
- seed: 42
|
||||
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
||||
- lr_scheduler_type: linear
|
||||
- num_epochs: 5.0
|
||||
|
||||
### Training results
|
||||
|
||||
|
||||
|
||||
### Framework versions
|
||||
|
||||
- Transformers 4.26.1
|
||||
- Pytorch 1.13.1+cu116
|
||||
- Datasets 2.9.0
|
||||
- Tokenizers 0.13.2
|
14
models/gpt2/all_results.json
Normal file
14
models/gpt2/all_results.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"epoch": 5.0,
|
||||
"eval_accuracy": 0.9230769276618958,
|
||||
"eval_loss": 0.2177695333957672,
|
||||
"eval_runtime": 10.0539,
|
||||
"eval_samples": 1274,
|
||||
"eval_samples_per_second": 126.717,
|
||||
"eval_steps_per_second": 5.371,
|
||||
"train_loss": 0.689463275015069,
|
||||
"train_runtime": 490.8844,
|
||||
"train_samples": 4999,
|
||||
"train_samples_per_second": 50.918,
|
||||
"train_steps_per_second": 2.129
|
||||
}
|
58
models/gpt2/config.json
Normal file
58
models/gpt2/config.json
Normal file
@ -0,0 +1,58 @@
|
||||
{
|
||||
"_name_or_path": "gpt2",
|
||||
"activation_function": "gelu_new",
|
||||
"architectures": [
|
||||
"GPT2ForSequenceClassificationCustom"
|
||||
],
|
||||
"attn_pdrop": 0.1,
|
||||
"bos_token_id": 50256,
|
||||
"embd_pdrop": 0.1,
|
||||
"eos_token_id": 50256,
|
||||
"id2label": {
|
||||
"0": 0,
|
||||
"1": 1,
|
||||
"2": 2,
|
||||
"3": 3,
|
||||
"4": 4,
|
||||
"5": 5
|
||||
},
|
||||
"initializer_range": 0.02,
|
||||
"label2id": {
|
||||
"0": 0,
|
||||
"1": 1,
|
||||
"2": 2,
|
||||
"3": 3,
|
||||
"4": 4,
|
||||
"5": 5
|
||||
},
|
||||
"layer_norm_epsilon": 1e-05,
|
||||
"model_type": "gpt2",
|
||||
"n_ctx": 1024,
|
||||
"n_embd": 768,
|
||||
"n_head": 12,
|
||||
"n_inner": null,
|
||||
"n_layer": 12,
|
||||
"n_positions": 1024,
|
||||
"pad_token_id": 50256,
|
||||
"problem_type": "single_label_classification",
|
||||
"reorder_and_upcast_attn": false,
|
||||
"resid_pdrop": 0.1,
|
||||
"scale_attn_by_inverse_layer_idx": false,
|
||||
"scale_attn_weights": true,
|
||||
"summary_activation": null,
|
||||
"summary_first_dropout": 0.1,
|
||||
"summary_proj_to_labels": true,
|
||||
"summary_type": "cls_index",
|
||||
"summary_use_proj": true,
|
||||
"task_specific_params": {
|
||||
"text-generation": {
|
||||
"do_sample": true,
|
||||
"max_length": 50
|
||||
}
|
||||
},
|
||||
"torch_dtype": "float32",
|
||||
"transformers_version": "4.26.1",
|
||||
"use_cache": true,
|
||||
"use_hidden_states": true,
|
||||
"vocab_size": 50257
|
||||
}
|
9
models/gpt2/eval_results.json
Normal file
9
models/gpt2/eval_results.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"epoch": 5.0,
|
||||
"eval_accuracy": 0.9230769276618958,
|
||||
"eval_loss": 0.2177695333957672,
|
||||
"eval_runtime": 10.0539,
|
||||
"eval_samples": 1274,
|
||||
"eval_samples_per_second": 126.717,
|
||||
"eval_steps_per_second": 5.371
|
||||
}
|
50001
models/gpt2/merges.txt
Normal file
50001
models/gpt2/merges.txt
Normal file
File diff suppressed because it is too large
Load Diff
1279
models/gpt2/predict_results_None.txt
Normal file
1279
models/gpt2/predict_results_None.txt
Normal file
File diff suppressed because it is too large
Load Diff
6
models/gpt2/special_tokens_map.json
Normal file
6
models/gpt2/special_tokens_map.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"bos_token": "<|endoftext|>",
|
||||
"eos_token": "<|endoftext|>",
|
||||
"pad_token": "<|endoftext|>",
|
||||
"unk_token": "<|endoftext|>"
|
||||
}
|
100318
models/gpt2/tokenizer.json
Normal file
100318
models/gpt2/tokenizer.json
Normal file
File diff suppressed because it is too large
Load Diff
10
models/gpt2/tokenizer_config.json
Normal file
10
models/gpt2/tokenizer_config.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"add_prefix_space": false,
|
||||
"bos_token": "<|endoftext|>",
|
||||
"eos_token": "<|endoftext|>",
|
||||
"model_max_length": 1024,
|
||||
"name_or_path": "gpt2",
|
||||
"special_tokens_map_file": null,
|
||||
"tokenizer_class": "GPT2Tokenizer",
|
||||
"unk_token": "<|endoftext|>"
|
||||
}
|
8
models/gpt2/train_results.json
Normal file
8
models/gpt2/train_results.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"epoch": 5.0,
|
||||
"train_loss": 0.689463275015069,
|
||||
"train_runtime": 490.8844,
|
||||
"train_samples": 4999,
|
||||
"train_samples_per_second": 50.918,
|
||||
"train_steps_per_second": 2.129
|
||||
}
|
37
models/gpt2/trainer_state.json
Normal file
37
models/gpt2/trainer_state.json
Normal file
@ -0,0 +1,37 @@
|
||||
{
|
||||
"best_metric": null,
|
||||
"best_model_checkpoint": null,
|
||||
"epoch": 5.0,
|
||||
"global_step": 1045,
|
||||
"is_hyper_param_search": false,
|
||||
"is_local_process_zero": true,
|
||||
"is_world_process_zero": true,
|
||||
"log_history": [
|
||||
{
|
||||
"epoch": 2.39,
|
||||
"learning_rate": 1.0430622009569378e-05,
|
||||
"loss": 1.0247,
|
||||
"step": 500
|
||||
},
|
||||
{
|
||||
"epoch": 4.78,
|
||||
"learning_rate": 8.612440191387561e-07,
|
||||
"loss": 0.3843,
|
||||
"step": 1000
|
||||
},
|
||||
{
|
||||
"epoch": 5.0,
|
||||
"step": 1045,
|
||||
"total_flos": 1723489601126400.0,
|
||||
"train_loss": 0.689463275015069,
|
||||
"train_runtime": 490.8844,
|
||||
"train_samples_per_second": 50.918,
|
||||
"train_steps_per_second": 2.129
|
||||
}
|
||||
],
|
||||
"max_steps": 1045,
|
||||
"num_train_epochs": 5,
|
||||
"total_flos": 1723489601126400.0,
|
||||
"trial_name": null,
|
||||
"trial_params": null
|
||||
}
|
BIN
models/gpt2/training_args.bin
Normal file
BIN
models/gpt2/training_args.bin
Normal file
Binary file not shown.
1
models/gpt2/vocab.json
Normal file
1
models/gpt2/vocab.json
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user