Upload folder using huggingface_hub
Browse files
README.md
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
---
|
3 |
+
license: apache-2.0
|
4 |
+
base_model: meta-llama/Llama-2-7b-hf
|
5 |
+
tags:
|
6 |
+
- fine-tuned
|
7 |
+
- gt52
|
8 |
+
- chatbot
|
9 |
+
- custom-dataset
|
10 |
+
language:
|
11 |
+
- en
|
12 |
+
pipeline_tag: text-generation
|
13 |
+
---
|
14 |
+
|
15 |
+
# gpt2-coder
|
16 |
+
|
17 |
+
## Model Description
|
18 |
+
|
19 |
+
This is a fine-tuned version of GPT 2 (124.2M parameters) , trained on codeparrot.
|
20 |
+
|
21 |
+
## Training Details
|
22 |
+
|
23 |
+
- **Training Data:** [codeparrot]
|
24 |
+
- **Training Method:** Fine-tuning
|
25 |
+
- **Training Duration:** [8 hours/days]
|
26 |
+
- **Hardware:** [V100]
|
27 |
+
|
28 |
+
## Usage
|
29 |
+
|
30 |
+
```python
|
31 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
32 |
+
|
33 |
+
# Load model and tokenizer
|
34 |
+
model = AutoModelForCausalLM.from_pretrained("smoothich/gpt2-coder")
|
35 |
+
tokenizer = AutoTokenizer.from_pretrained("smoothich/gpt2-coder")
|
36 |
+
|
37 |
+
# Generate text
|
38 |
+
inputs = tokenizer("Hello, how are you?", return_tensors="pt")
|
39 |
+
outputs = model.generate(**inputs, max_length=100)
|
40 |
+
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
41 |
+
print(response)
|
42 |
+
```
|
43 |
+
|
44 |
+
## Training Parameters
|
45 |
+
|
46 |
+
- Learning Rate: 5e-4
|
47 |
+
- Batch Size: 16
|
48 |
+
- Gradient Accumulation: 16
|
49 |
+
- Epochs: 1
|
50 |
+
- Precision: BF16
|
51 |
+
|
52 |
+
## Evaluation
|
53 |
+
|
54 |
+
[Include evaluation metrics if available]
|
55 |
+
|
56 |
+
## License
|
57 |
+
|
58 |
+
This model is released under the Apache 2.0 license.
|