Update README.md
Browse files
README.md
CHANGED
|
@@ -46,13 +46,32 @@ pipe = pipeline("text-generation", model="open-r1/NormolLM-coder-7b-v02.12", tor
|
|
| 46 |
|
| 47 |
# We use the tokenizer's chat template to format each message - see https://huggingface.co/docs/transformers/main/en/chat_templating
|
| 48 |
messages = [
|
| 49 |
-
{"role": "user", "content": "Write a python program to
|
| 50 |
]
|
| 51 |
prompt = pipe.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
| 52 |
outputs = pipe(prompt, max_new_tokens=8000, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
|
| 53 |
print(outputs[0]["generated_text"])
|
| 54 |
#<|im_start|>user
|
| 55 |
-
#Write a python program to
|
| 56 |
#<|im_start|>assistant
|
| 57 |
#<think>Okay, I need to write a Python program that calculates the 10th Fibonacci number. Hmm, the Fibonacci sequence starts with 0 and 1. Each subsequent number is the sum of the two preceding ones. So the sequence goes: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, and so on. ...
|
| 58 |
-
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
|
| 47 |
# We use the tokenizer's chat template to format each message - see https://huggingface.co/docs/transformers/main/en/chat_templating
|
| 48 |
messages = [
|
| 49 |
+
{"role": "user", "content": "Write a python program to calculate the 10th Fibonacci number"},
|
| 50 |
]
|
| 51 |
prompt = pipe.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
| 52 |
outputs = pipe(prompt, max_new_tokens=8000, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
|
| 53 |
print(outputs[0]["generated_text"])
|
| 54 |
#<|im_start|>user
|
| 55 |
+
#Write a python program to calculate the 10th fibonacci number<|im_end|>
|
| 56 |
#<|im_start|>assistant
|
| 57 |
#<think>Okay, I need to write a Python program that calculates the 10th Fibonacci number. Hmm, the Fibonacci sequence starts with 0 and 1. Each subsequent number is the sum of the two preceding ones. So the sequence goes: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, and so on. ...
|
| 58 |
+
```
|
| 59 |
+
|
| 60 |
+
|
| 61 |
+
## Training procedure
|
| 62 |
+
### Training hyper-parameters
|
| 63 |
+
The following hyperparameters were used during training:
|
| 64 |
+
|
| 65 |
+
learning_rate: 4.0e-5
|
| 66 |
+
train_batch_size: 2
|
| 67 |
+
seed: 42
|
| 68 |
+
packing: false
|
| 69 |
+
distributed_type: deepspeed-zero-3
|
| 70 |
+
num_devices: 8
|
| 71 |
+
gradient_accumulation_steps: 8
|
| 72 |
+
total_train_batch_size: 16
|
| 73 |
+
optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
| 74 |
+
lr_scheduler_type: cosine_with_min_lr
|
| 75 |
+
min_lr_rate: 0.1
|
| 76 |
+
lr_scheduler_warmup_ratio: 0.03
|
| 77 |
+
num_epochs: 10.0
|