Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -18,8 +18,8 @@ import numpy as np
|
|
| 18 |
from transformers import GPT2LMHeadModel, GPT2Tokenizer
|
| 19 |
|
| 20 |
# Load the fine-tuned model and tokenizer
|
| 21 |
-
model = GPT2LMHeadModel.from_pretrained("
|
| 22 |
-
tokenizer = GPT2Tokenizer.from_pretrained("
|
| 23 |
|
| 24 |
# Set the seed value for reproducibility
|
| 25 |
seed_val = 42
|
|
@@ -61,27 +61,21 @@ outputs = model.generate(
|
|
| 61 |
# Decode and print the generated text
|
| 62 |
generated_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
| 63 |
print(generated_text)
|
|
|
|
| 64 |
|
| 65 |
#### Explanation:
|
| 66 |
|
| 67 |
-
Training Data
|
| 68 |
The model was fine-tuned using the Alpaca GPT-4 dataset available at the following GitHub repository.
|
| 69 |
https://github.com/hy5468/TransLLM/tree/main/data/train
|
| 70 |
Specifically, the alpaca_gpt4_data_en.zip dataset was utilized.
|
| 71 |
This dataset includes a wide range of instruction-based prompts and responses,
|
| 72 |
providing a robust foundation for the model's training.
|
| 73 |
|
| 74 |
-
Training Procedure
|
| 75 |
-
The fine-tuning process was carried out with the following hyperparameters:
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
Number of Epochs: 1
|
| 80 |
-
Weight Decay: 0.01
|
| 81 |
-
|
| 82 |
-
Training Environment
|
| 83 |
-
The model was trained using PyTorch and the Hugging Face transformers library.
|
| 84 |
-
The training was performed on a GPU-enabled environment to accelerate the fine-tuning process.
|
| 85 |
-
The training script ensures reproducibility by setting a consistent random seed across different components.
|
| 86 |
|
| 87 |
|
|
|
|
| 18 |
from transformers import GPT2LMHeadModel, GPT2Tokenizer
|
| 19 |
|
| 20 |
# Load the fine-tuned model and tokenizer
|
| 21 |
+
model = GPT2LMHeadModel.from_pretrained("Autsadin/gpt2_instruct")
|
| 22 |
+
tokenizer = GPT2Tokenizer.from_pretrained("Autsadin/gpt2_instruct")
|
| 23 |
|
| 24 |
# Set the seed value for reproducibility
|
| 25 |
seed_val = 42
|
|
|
|
| 61 |
# Decode and print the generated text
|
| 62 |
generated_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
| 63 |
print(generated_text)
|
| 64 |
+
```
|
| 65 |
|
| 66 |
#### Explanation:
|
| 67 |
|
| 68 |
+
#Training Data
|
| 69 |
The model was fine-tuned using the Alpaca GPT-4 dataset available at the following GitHub repository.
|
| 70 |
https://github.com/hy5468/TransLLM/tree/main/data/train
|
| 71 |
Specifically, the alpaca_gpt4_data_en.zip dataset was utilized.
|
| 72 |
This dataset includes a wide range of instruction-based prompts and responses,
|
| 73 |
providing a robust foundation for the model's training.
|
| 74 |
|
| 75 |
+
#Training Procedure
|
| 76 |
+
The fine-tuning process was carried out with the following hyperparameters: Learning Rate: 2e-5 Batch Size (Train): 4 Batch Size (Eval): 4 Number of Epochs: 1 Weight Decay: 0.01
|
| 77 |
+
|
| 78 |
+
#Training Environment
|
| 79 |
+
The model was trained using PyTorch and the Hugging Face transformers library. The training was performed on a GPU-enabled environment to accelerate the fine-tuning process.The training script ensures reproducibility by setting a consistent random seed across different components.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
|
| 81 |
|