Instructions to use gimmy256/adaption_africa_math_code_qa with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use gimmy256/adaption_africa_math_code_qa with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("togethercomputer/Meta-Llama-3.2-3B-Instruct-Reference__TOG__FT") model = PeftModel.from_pretrained(base_model, "gimmy256/adaption_africa_math_code_qa") - Notebooks
- Google Colab
- Kaggle
Add 11 files
Browse files- .gitattributes +3 -0
- README.md +102 -0
- adapter_config.json +39 -0
- adapter_model.safetensors +3 -0
- chat_template.jinja +93 -0
- config.json +37 -0
- special_tokens_map.json +5 -0
- tokenizer.json +3 -0
- tokenizer_config.json +16 -0
- trainer_state.json +249 -0
- training-metrics.png +3 -0
- win-rates.png +3 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,6 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
training-metrics.png filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
win-rates.png filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model: meta-llama/Llama-3.2-3B-Instruct
|
| 3 |
+
library_name: peft
|
| 4 |
+
license: other
|
| 5 |
+
tags:
|
| 6 |
+
- lora
|
| 7 |
+
- peft
|
| 8 |
+
- adapter
|
| 9 |
+
- adaption
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# adaption_africa_math_code_qa
|
| 13 |
+
|
| 14 |
+
## Model Training
|
| 15 |
+
|
| 16 |
+
A LORA adapter for `meta-llama/Llama-3.2-3B-Instruct`. This model was trained with SFT using [Adaption](https://adaptionlabs.ai)'s AutoScientist on the africa_math_code_qa dataset.
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+

|
| 20 |
+
|
| 21 |
+
### AutoScientist Config
|
| 22 |
+
|
| 23 |
+
```json
|
| 24 |
+
{
|
| 25 |
+
"job_id": "d70be010-a89f-464a-a6c9-928fae8e0d79",
|
| 26 |
+
"training_experiment_id": "2904a8f8-eaab-4afa-81cb-1a5473972fd3",
|
| 27 |
+
"original_model_name": "meta-llama/Llama-3.2-3B-Instruct",
|
| 28 |
+
"trained_model_name": "adaption_africa_math_code_qa",
|
| 29 |
+
"training_method": "sft",
|
| 30 |
+
"training_type": "lora",
|
| 31 |
+
"data_format": "chat",
|
| 32 |
+
"hyperparams": {
|
| 33 |
+
"lora": "true",
|
| 34 |
+
"lora_r": 16,
|
| 35 |
+
"n_evals": 5,
|
| 36 |
+
"n_epochs": 1,
|
| 37 |
+
"batch_size": "max",
|
| 38 |
+
"lora_alpha": 32,
|
| 39 |
+
"lora_dropout": 0,
|
| 40 |
+
"min_lr_ratio": 0.1,
|
| 41 |
+
"warmup_ratio": 0.1,
|
| 42 |
+
"weight_decay": 0,
|
| 43 |
+
"learning_rate": 0.00001,
|
| 44 |
+
"max_grad_norm": 2,
|
| 45 |
+
"base_model_size": "3B",
|
| 46 |
+
"train_on_inputs": "false",
|
| 47 |
+
"training_method": "sft",
|
| 48 |
+
"lr_scheduler_type": "cosine",
|
| 49 |
+
"scheduler_num_cycles": 0.5,
|
| 50 |
+
"lora_trainable_modules": "all-linear"
|
| 51 |
+
}
|
| 52 |
+
}
|
| 53 |
+
```
|
| 54 |
+
|
| 55 |
+
## Training Data
|
| 56 |
+
|
| 57 |
+
The model was trained on 27,523 rows of adapted data with the following domain distribution: code (31%), math (20%), agriculture (18%), personal-finance (10%), geography (4%), technology (4%), science (4%), governance (3%), corporate-business (2%), how-to (1%), travel (1%), architecture-design (1%), legal (0%), language (0%), education (0%), marketing (0%), data-analysis-visualization (0%).
|
| 58 |
+
|
| 59 |
+
## Model Evaluation
|
| 60 |
+
|
| 61 |
+
The model was evaluated on an in-distribution held-out test set as well as a broader domain-specific test set to measure generalization.
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+

|
| 65 |
+
|
| 66 |
+
| Domain | Win rate vs. base model |
|
| 67 |
+
| --- | --- |
|
| 68 |
+
| general | 54% |
|
| 69 |
+
|
| 70 |
+
## How to use
|
| 71 |
+
|
| 72 |
+
```bash
|
| 73 |
+
pip install torch transformers peft
|
| 74 |
+
```
|
| 75 |
+
|
| 76 |
+
```python
|
| 77 |
+
import torch
|
| 78 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 79 |
+
from peft import PeftModel
|
| 80 |
+
|
| 81 |
+
BASE = "meta-llama/Llama-3.2-3B-Instruct"
|
| 82 |
+
ADAPTER = "<this-repo-id>"
|
| 83 |
+
|
| 84 |
+
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 85 |
+
dtype = torch.float32 if device == "cpu" else torch.bfloat16
|
| 86 |
+
|
| 87 |
+
base = AutoModelForCausalLM.from_pretrained(BASE, dtype=dtype).to(device)
|
| 88 |
+
model = PeftModel.from_pretrained(base, ADAPTER)
|
| 89 |
+
# Optional: merge the LoRA weights into the base for faster inference
|
| 90 |
+
model = model.merge_and_unload()
|
| 91 |
+
model.eval()
|
| 92 |
+
|
| 93 |
+
tokenizer = AutoTokenizer.from_pretrained(BASE)
|
| 94 |
+
messages = [{"role": "user", "content": "Hello!"}]
|
| 95 |
+
text = tokenizer.apply_chat_template(
|
| 96 |
+
messages, tokenize=False, add_generation_prompt=True)
|
| 97 |
+
inputs = tokenizer(text, return_tensors="pt").to(device)
|
| 98 |
+
|
| 99 |
+
with torch.inference_mode():
|
| 100 |
+
out = model.generate(**inputs, max_new_tokens=512)
|
| 101 |
+
print(tokenizer.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
|
| 102 |
+
```
|
adapter_config.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"alpha_pattern": {},
|
| 3 |
+
"auto_mapping": null,
|
| 4 |
+
"base_model_name_or_path": "togethercomputer/Meta-Llama-3.2-3B-Instruct-Reference__TOG__FT",
|
| 5 |
+
"bias": "none",
|
| 6 |
+
"corda_config": null,
|
| 7 |
+
"eva_config": null,
|
| 8 |
+
"exclude_modules": [],
|
| 9 |
+
"fan_in_fan_out": false,
|
| 10 |
+
"inference_mode": true,
|
| 11 |
+
"init_lora_weights": true,
|
| 12 |
+
"layer_replication": null,
|
| 13 |
+
"layers_pattern": null,
|
| 14 |
+
"layers_to_transform": null,
|
| 15 |
+
"loftq_config": {},
|
| 16 |
+
"lora_alpha": 32,
|
| 17 |
+
"lora_bias": false,
|
| 18 |
+
"lora_dropout": 0.0,
|
| 19 |
+
"megatron_config": null,
|
| 20 |
+
"megatron_core": "megatron.core",
|
| 21 |
+
"modules_to_save": null,
|
| 22 |
+
"peft_type": "LORA",
|
| 23 |
+
"r": 16,
|
| 24 |
+
"rank_pattern": {},
|
| 25 |
+
"revision": null,
|
| 26 |
+
"target_modules": [
|
| 27 |
+
"v_proj",
|
| 28 |
+
"down_proj",
|
| 29 |
+
"o_proj",
|
| 30 |
+
"gate_proj",
|
| 31 |
+
"q_proj",
|
| 32 |
+
"up_proj",
|
| 33 |
+
"k_proj"
|
| 34 |
+
],
|
| 35 |
+
"task_type": "CAUSAL_LM",
|
| 36 |
+
"trainable_token_indices": null,
|
| 37 |
+
"use_dora": false,
|
| 38 |
+
"use_rslora": false
|
| 39 |
+
}
|
adapter_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d3db784d8e952a07aeb7f57d0d02f8dc5992c6b13fa72d864356b65c36817a52
|
| 3 |
+
size 97307544
|
chat_template.jinja
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{{- bos_token }}
|
| 2 |
+
{%- if custom_tools is defined %}
|
| 3 |
+
{%- set tools = custom_tools %}
|
| 4 |
+
{%- endif %}
|
| 5 |
+
{%- if not tools_in_user_message is defined %}
|
| 6 |
+
{%- set tools_in_user_message = true %}
|
| 7 |
+
{%- endif %}
|
| 8 |
+
{%- if not date_string is defined %}
|
| 9 |
+
{%- if strftime_now is defined %}
|
| 10 |
+
{%- set date_string = strftime_now("%d %b %Y") %}
|
| 11 |
+
{%- else %}
|
| 12 |
+
{%- set date_string = "26 Jul 2024" %}
|
| 13 |
+
{%- endif %}
|
| 14 |
+
{%- endif %}
|
| 15 |
+
{%- if not tools is defined %}
|
| 16 |
+
{%- set tools = none %}
|
| 17 |
+
{%- endif %}
|
| 18 |
+
|
| 19 |
+
{#- This block extracts the system message, so we can slot it into the right place. #}
|
| 20 |
+
{%- if messages[0]['role'] == 'system' %}
|
| 21 |
+
{%- set system_message = messages[0]['content']|trim %}
|
| 22 |
+
{%- set messages = messages[1:] %}
|
| 23 |
+
{%- else %}
|
| 24 |
+
{%- set system_message = "" %}
|
| 25 |
+
{%- endif %}
|
| 26 |
+
|
| 27 |
+
{#- System message #}
|
| 28 |
+
{{- "<|start_header_id|>system<|end_header_id|>\n\n" }}
|
| 29 |
+
{%- if tools is not none %}
|
| 30 |
+
{{- "Environment: ipython\n" }}
|
| 31 |
+
{%- endif %}
|
| 32 |
+
{{- "Cutting Knowledge Date: December 2023\n" }}
|
| 33 |
+
{{- "Today Date: " + date_string + "\n\n" }}
|
| 34 |
+
{%- if tools is not none and not tools_in_user_message %}
|
| 35 |
+
{{- "You have access to the following functions. To call a function, please respond with JSON for a function call." }}
|
| 36 |
+
{{- 'Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}.' }}
|
| 37 |
+
{{- "Do not use variables.\n\n" }}
|
| 38 |
+
{%- for t in tools %}
|
| 39 |
+
{{- t | tojson(indent=4) }}
|
| 40 |
+
{{- "\n\n" }}
|
| 41 |
+
{%- endfor %}
|
| 42 |
+
{%- endif %}
|
| 43 |
+
{{- system_message }}
|
| 44 |
+
{{- "<|eot_id|>" }}
|
| 45 |
+
|
| 46 |
+
{#- Custom tools are passed in a user message with some extra guidance #}
|
| 47 |
+
{%- if tools_in_user_message and not tools is none %}
|
| 48 |
+
{#- Extract the first user message so we can plug it in here #}
|
| 49 |
+
{%- if messages | length != 0 %}
|
| 50 |
+
{%- set first_user_message = messages[0]['content']|trim %}
|
| 51 |
+
{%- set messages = messages[1:] %}
|
| 52 |
+
{%- else %}
|
| 53 |
+
{{- raise_exception("Cannot put tools in the first user message when there's no first user message!") }}
|
| 54 |
+
{%- endif %}
|
| 55 |
+
{{- '<|start_header_id|>user<|end_header_id|>\n\n' -}}
|
| 56 |
+
{{- "Given the following functions, please respond with a JSON for a function call " }}
|
| 57 |
+
{{- "with its proper arguments that best answers the given prompt.\n\n" }}
|
| 58 |
+
{{- 'Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}.' }}
|
| 59 |
+
{{- "Do not use variables.\n\n" }}
|
| 60 |
+
{%- for t in tools %}
|
| 61 |
+
{{- t | tojson(indent=4) }}
|
| 62 |
+
{{- "\n\n" }}
|
| 63 |
+
{%- endfor %}
|
| 64 |
+
{{- first_user_message + "<|eot_id|>"}}
|
| 65 |
+
{%- endif %}
|
| 66 |
+
|
| 67 |
+
{%- for message in messages %}
|
| 68 |
+
{%- if not (message.role == 'ipython' or message.role == 'tool' or 'tool_calls' in message) %}
|
| 69 |
+
{{- '<|start_header_id|>' + message['role'] + '<|end_header_id|>\n\n'+ message['content'] | trim + '<|eot_id|>' }}
|
| 70 |
+
{%- elif 'tool_calls' in message %}
|
| 71 |
+
{%- if not message.tool_calls|length == 1 %}
|
| 72 |
+
{{- raise_exception("This model only supports single tool-calls at once!") }}
|
| 73 |
+
{%- endif %}
|
| 74 |
+
{%- set tool_call = message.tool_calls[0].function %}
|
| 75 |
+
{{- '<|start_header_id|>assistant<|end_header_id|>\n\n' -}}
|
| 76 |
+
{{- '{"name": "' + tool_call.name + '", ' }}
|
| 77 |
+
{{- '"parameters": ' }}
|
| 78 |
+
{{- tool_call.arguments | tojson }}
|
| 79 |
+
{{- "}" }}
|
| 80 |
+
{{- "<|eot_id|>" }}
|
| 81 |
+
{%- elif message.role == "tool" or message.role == "ipython" %}
|
| 82 |
+
{{- "<|start_header_id|>ipython<|end_header_id|>\n\n" }}
|
| 83 |
+
{%- if message.content is mapping or message.content is iterable %}
|
| 84 |
+
{{- message.content | tojson }}
|
| 85 |
+
{%- else %}
|
| 86 |
+
{{- message.content }}
|
| 87 |
+
{%- endif %}
|
| 88 |
+
{{- "<|eot_id|>" }}
|
| 89 |
+
{%- endif %}
|
| 90 |
+
{%- endfor %}
|
| 91 |
+
{%- if add_generation_prompt %}
|
| 92 |
+
{{- '<|start_header_id|>assistant<|end_header_id|>\n\n' }}
|
| 93 |
+
{%- endif %}
|
config.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"LlamaForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"bos_token_id": 128000,
|
| 8 |
+
"dtype": "bfloat16",
|
| 9 |
+
"eos_token_id": 128009,
|
| 10 |
+
"head_dim": 128,
|
| 11 |
+
"hidden_act": "silu",
|
| 12 |
+
"hidden_size": 3072,
|
| 13 |
+
"initializer_range": 0.02,
|
| 14 |
+
"intermediate_size": 8192,
|
| 15 |
+
"max_position_embeddings": 131072,
|
| 16 |
+
"mlp_bias": false,
|
| 17 |
+
"model_type": "llama",
|
| 18 |
+
"num_attention_heads": 24,
|
| 19 |
+
"num_hidden_layers": 28,
|
| 20 |
+
"num_key_value_heads": 8,
|
| 21 |
+
"pad_token_id": 128009,
|
| 22 |
+
"pretraining_tp": 1,
|
| 23 |
+
"rms_norm_eps": 1e-05,
|
| 24 |
+
"rope_parameters": {
|
| 25 |
+
"factor": 32.0,
|
| 26 |
+
"high_freq_factor": 4.0,
|
| 27 |
+
"low_freq_factor": 1.0,
|
| 28 |
+
"original_max_position_embeddings": 8192,
|
| 29 |
+
"rope_theta": 500000.0,
|
| 30 |
+
"rope_type": "llama3"
|
| 31 |
+
},
|
| 32 |
+
"tie_word_embeddings": true,
|
| 33 |
+
"transformers_version": "5.13.0",
|
| 34 |
+
"use_cache": false,
|
| 35 |
+
"vocab_size": 128256,
|
| 36 |
+
"torch_dtype": "bfloat16"
|
| 37 |
+
}
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": "<|begin_of_text|>",
|
| 3 |
+
"eos_token": "<|eot_id|>",
|
| 4 |
+
"pad_token": "<|eot_id|>"
|
| 5 |
+
}
|
tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6b9e4e7fb171f92fd137b777cc2714bf87d11576700a1dcd7a399e7bbe39537b
|
| 3 |
+
size 17209920
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"backend": "tokenizers",
|
| 3 |
+
"bos_token": "<|begin_of_text|>",
|
| 4 |
+
"clean_up_tokenization_spaces": true,
|
| 5 |
+
"eos_token": "<|eot_id|>",
|
| 6 |
+
"is_local": false,
|
| 7 |
+
"local_files_only": true,
|
| 8 |
+
"model_input_names": [
|
| 9 |
+
"input_ids",
|
| 10 |
+
"attention_mask"
|
| 11 |
+
],
|
| 12 |
+
"model_max_length": 131072,
|
| 13 |
+
"pad_token": "<|eot_id|>",
|
| 14 |
+
"padding_side": "right",
|
| 15 |
+
"tokenizer_class": "TokenizersBackend"
|
| 16 |
+
}
|
trainer_state.json
ADDED
|
@@ -0,0 +1,249 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"best_global_step": null,
|
| 3 |
+
"best_metric": null,
|
| 4 |
+
"best_model_checkpoint": null,
|
| 5 |
+
"epoch": 1.0,
|
| 6 |
+
"eval_steps": 5,
|
| 7 |
+
"global_step": 25,
|
| 8 |
+
"is_hyper_param_search": false,
|
| 9 |
+
"is_local_process_zero": true,
|
| 10 |
+
"is_world_process_zero": true,
|
| 11 |
+
"log_history": [
|
| 12 |
+
{
|
| 13 |
+
"epoch": 0.04,
|
| 14 |
+
"grad_norm": 0.3852219879627228,
|
| 15 |
+
"learning_rate": 0.0,
|
| 16 |
+
"loss": 1.6982421875,
|
| 17 |
+
"step": 1
|
| 18 |
+
},
|
| 19 |
+
{
|
| 20 |
+
"epoch": 0.08,
|
| 21 |
+
"grad_norm": 0.3040158450603485,
|
| 22 |
+
"learning_rate": 3.3333333333333333e-06,
|
| 23 |
+
"loss": 1.77734375,
|
| 24 |
+
"step": 2
|
| 25 |
+
},
|
| 26 |
+
{
|
| 27 |
+
"epoch": 0.12,
|
| 28 |
+
"grad_norm": 0.2961996793746948,
|
| 29 |
+
"learning_rate": 6.666666666666667e-06,
|
| 30 |
+
"loss": 1.7578125,
|
| 31 |
+
"step": 3
|
| 32 |
+
},
|
| 33 |
+
{
|
| 34 |
+
"epoch": 0.16,
|
| 35 |
+
"grad_norm": 0.3623664677143097,
|
| 36 |
+
"learning_rate": 1e-05,
|
| 37 |
+
"loss": 1.7568359375,
|
| 38 |
+
"step": 4
|
| 39 |
+
},
|
| 40 |
+
{
|
| 41 |
+
"epoch": 0.2,
|
| 42 |
+
"grad_norm": 0.2844073176383972,
|
| 43 |
+
"learning_rate": 9.954196488464198e-06,
|
| 44 |
+
"loss": 1.7509765625,
|
| 45 |
+
"step": 5
|
| 46 |
+
},
|
| 47 |
+
{
|
| 48 |
+
"epoch": 0.2,
|
| 49 |
+
"eval_loss": 1.7109375,
|
| 50 |
+
"eval_runtime": 2.0186,
|
| 51 |
+
"eval_samples_per_second": 0.991,
|
| 52 |
+
"eval_steps_per_second": 0.495,
|
| 53 |
+
"step": 5
|
| 54 |
+
},
|
| 55 |
+
{
|
| 56 |
+
"epoch": 0.24,
|
| 57 |
+
"grad_norm": 0.2740273177623749,
|
| 58 |
+
"learning_rate": 9.81771838126524e-06,
|
| 59 |
+
"loss": 1.6904296875,
|
| 60 |
+
"step": 6
|
| 61 |
+
},
|
| 62 |
+
{
|
| 63 |
+
"epoch": 0.28,
|
| 64 |
+
"grad_norm": 0.27806246280670166,
|
| 65 |
+
"learning_rate": 9.593343979095334e-06,
|
| 66 |
+
"loss": 1.720703125,
|
| 67 |
+
"step": 7
|
| 68 |
+
},
|
| 69 |
+
{
|
| 70 |
+
"epoch": 0.32,
|
| 71 |
+
"grad_norm": 0.30633893609046936,
|
| 72 |
+
"learning_rate": 9.285640897740316e-06,
|
| 73 |
+
"loss": 1.7900390625,
|
| 74 |
+
"step": 8
|
| 75 |
+
},
|
| 76 |
+
{
|
| 77 |
+
"epoch": 0.36,
|
| 78 |
+
"grad_norm": 0.2555227279663086,
|
| 79 |
+
"learning_rate": 8.900873084594164e-06,
|
| 80 |
+
"loss": 1.4390869140625,
|
| 81 |
+
"step": 9
|
| 82 |
+
},
|
| 83 |
+
{
|
| 84 |
+
"epoch": 0.4,
|
| 85 |
+
"grad_norm": 0.2538067102432251,
|
| 86 |
+
"learning_rate": 8.446873302753783e-06,
|
| 87 |
+
"loss": 1.70703125,
|
| 88 |
+
"step": 10
|
| 89 |
+
},
|
| 90 |
+
{
|
| 91 |
+
"epoch": 0.4,
|
| 92 |
+
"eval_loss": 1.697265625,
|
| 93 |
+
"eval_runtime": 2.0251,
|
| 94 |
+
"eval_samples_per_second": 0.988,
|
| 95 |
+
"eval_steps_per_second": 0.494,
|
| 96 |
+
"step": 10
|
| 97 |
+
},
|
| 98 |
+
{
|
| 99 |
+
"epoch": 0.44,
|
| 100 |
+
"grad_norm": 0.30936306715011597,
|
| 101 |
+
"learning_rate": 7.932883678550191e-06,
|
| 102 |
+
"loss": 1.734375,
|
| 103 |
+
"step": 11
|
| 104 |
+
},
|
| 105 |
+
{
|
| 106 |
+
"epoch": 0.48,
|
| 107 |
+
"grad_norm": 0.2755681872367859,
|
| 108 |
+
"learning_rate": 7.36936755850849e-06,
|
| 109 |
+
"loss": 1.693359375,
|
| 110 |
+
"step": 12
|
| 111 |
+
},
|
| 112 |
+
{
|
| 113 |
+
"epoch": 0.52,
|
| 114 |
+
"grad_norm": 0.24498508870601654,
|
| 115 |
+
"learning_rate": 6.767796505786435e-06,
|
| 116 |
+
"loss": 1.638671875,
|
| 117 |
+
"step": 13
|
| 118 |
+
},
|
| 119 |
+
{
|
| 120 |
+
"epoch": 0.56,
|
| 121 |
+
"grad_norm": 0.30694907903671265,
|
| 122 |
+
"learning_rate": 6.140416772229785e-06,
|
| 123 |
+
"loss": 1.6572265625,
|
| 124 |
+
"step": 14
|
| 125 |
+
},
|
| 126 |
+
{
|
| 127 |
+
"epoch": 0.6,
|
| 128 |
+
"grad_norm": 0.309129536151886,
|
| 129 |
+
"learning_rate": 5.500000000000001e-06,
|
| 130 |
+
"loss": 1.6904296875,
|
| 131 |
+
"step": 15
|
| 132 |
+
},
|
| 133 |
+
{
|
| 134 |
+
"epoch": 0.6,
|
| 135 |
+
"eval_loss": 1.693359375,
|
| 136 |
+
"eval_runtime": 2.0251,
|
| 137 |
+
"eval_samples_per_second": 0.988,
|
| 138 |
+
"eval_steps_per_second": 0.494,
|
| 139 |
+
"step": 15
|
| 140 |
+
},
|
| 141 |
+
{
|
| 142 |
+
"epoch": 0.64,
|
| 143 |
+
"grad_norm": 0.31138136982917786,
|
| 144 |
+
"learning_rate": 4.859583227770218e-06,
|
| 145 |
+
"loss": 1.7568359375,
|
| 146 |
+
"step": 16
|
| 147 |
+
},
|
| 148 |
+
{
|
| 149 |
+
"epoch": 0.68,
|
| 150 |
+
"grad_norm": 0.25136393308639526,
|
| 151 |
+
"learning_rate": 4.232203494213567e-06,
|
| 152 |
+
"loss": 1.640625,
|
| 153 |
+
"step": 17
|
| 154 |
+
},
|
| 155 |
+
{
|
| 156 |
+
"epoch": 0.72,
|
| 157 |
+
"grad_norm": 0.30998989939689636,
|
| 158 |
+
"learning_rate": 3.630632441491512e-06,
|
| 159 |
+
"loss": 1.7490234375,
|
| 160 |
+
"step": 18
|
| 161 |
+
},
|
| 162 |
+
{
|
| 163 |
+
"epoch": 0.76,
|
| 164 |
+
"grad_norm": 0.22774231433868408,
|
| 165 |
+
"learning_rate": 3.0671163214498127e-06,
|
| 166 |
+
"loss": 1.6455078125,
|
| 167 |
+
"step": 19
|
| 168 |
+
},
|
| 169 |
+
{
|
| 170 |
+
"epoch": 0.8,
|
| 171 |
+
"grad_norm": 0.38729652762413025,
|
| 172 |
+
"learning_rate": 2.5531266972462176e-06,
|
| 173 |
+
"loss": 1.7412109375,
|
| 174 |
+
"step": 20
|
| 175 |
+
},
|
| 176 |
+
{
|
| 177 |
+
"epoch": 0.8,
|
| 178 |
+
"eval_loss": 1.68359375,
|
| 179 |
+
"eval_runtime": 2.0237,
|
| 180 |
+
"eval_samples_per_second": 0.988,
|
| 181 |
+
"eval_steps_per_second": 0.494,
|
| 182 |
+
"step": 20
|
| 183 |
+
},
|
| 184 |
+
{
|
| 185 |
+
"epoch": 0.84,
|
| 186 |
+
"grad_norm": 0.3755400478839874,
|
| 187 |
+
"learning_rate": 2.0991269154058387e-06,
|
| 188 |
+
"loss": 1.703125,
|
| 189 |
+
"step": 21
|
| 190 |
+
},
|
| 191 |
+
{
|
| 192 |
+
"epoch": 0.88,
|
| 193 |
+
"grad_norm": 0.3168826401233673,
|
| 194 |
+
"learning_rate": 1.7143591022596846e-06,
|
| 195 |
+
"loss": 1.7587890625,
|
| 196 |
+
"step": 22
|
| 197 |
+
},
|
| 198 |
+
{
|
| 199 |
+
"epoch": 0.92,
|
| 200 |
+
"grad_norm": 0.31902143359184265,
|
| 201 |
+
"learning_rate": 1.4066560209046673e-06,
|
| 202 |
+
"loss": 1.794921875,
|
| 203 |
+
"step": 23
|
| 204 |
+
},
|
| 205 |
+
{
|
| 206 |
+
"epoch": 0.96,
|
| 207 |
+
"grad_norm": 0.24556264281272888,
|
| 208 |
+
"learning_rate": 1.1822816187347625e-06,
|
| 209 |
+
"loss": 1.4383544921875,
|
| 210 |
+
"step": 24
|
| 211 |
+
},
|
| 212 |
+
{
|
| 213 |
+
"epoch": 1.0,
|
| 214 |
+
"grad_norm": 0.5234353542327881,
|
| 215 |
+
"learning_rate": 1.0458035115358031e-06,
|
| 216 |
+
"loss": 1.5703125,
|
| 217 |
+
"step": 25
|
| 218 |
+
},
|
| 219 |
+
{
|
| 220 |
+
"epoch": 1.0,
|
| 221 |
+
"eval_loss": 1.681640625,
|
| 222 |
+
"eval_runtime": 2.0196,
|
| 223 |
+
"eval_samples_per_second": 0.99,
|
| 224 |
+
"eval_steps_per_second": 0.495,
|
| 225 |
+
"step": 25
|
| 226 |
+
}
|
| 227 |
+
],
|
| 228 |
+
"logging_steps": 1.0,
|
| 229 |
+
"max_steps": 25,
|
| 230 |
+
"num_input_tokens_seen": 0,
|
| 231 |
+
"num_train_epochs": 1,
|
| 232 |
+
"save_steps": 0,
|
| 233 |
+
"stateful_callbacks": {
|
| 234 |
+
"TrainerControl": {
|
| 235 |
+
"args": {
|
| 236 |
+
"should_epoch_stop": false,
|
| 237 |
+
"should_evaluate": false,
|
| 238 |
+
"should_log": false,
|
| 239 |
+
"should_save": true,
|
| 240 |
+
"should_training_stop": true
|
| 241 |
+
},
|
| 242 |
+
"attributes": {}
|
| 243 |
+
}
|
| 244 |
+
},
|
| 245 |
+
"total_flos": 4.4638008283181875e+17,
|
| 246 |
+
"train_batch_size": 1,
|
| 247 |
+
"trial_name": null,
|
| 248 |
+
"trial_params": null
|
| 249 |
+
}
|
training-metrics.png
ADDED
|
Git LFS Details
|
win-rates.png
ADDED
|
Git LFS Details
|