minhy112 commited on
Commit
af55aed
·
verified ·
1 Parent(s): 8b632c0

Upload ViClickbait-2025 project (PhoBERT + GPT-OSS-20B LoRA SFT)

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +2 -0
  2. README.md +100 -0
  3. data/splits/test.csv +0 -0
  4. data/splits/train.csv +0 -0
  5. data/splits/val.csv +0 -0
  6. outputs/gpt20b/checkpoint-172/README.md +207 -0
  7. outputs/gpt20b/checkpoint-172/adapter_config.json +41 -0
  8. outputs/gpt20b/checkpoint-172/adapter_model.safetensors +3 -0
  9. outputs/gpt20b/checkpoint-172/chat_template.jinja +331 -0
  10. outputs/gpt20b/checkpoint-172/optimizer.pt +3 -0
  11. outputs/gpt20b/checkpoint-172/rng_state.pth +3 -0
  12. outputs/gpt20b/checkpoint-172/scheduler.pt +3 -0
  13. outputs/gpt20b/checkpoint-172/tokenizer.json +3 -0
  14. outputs/gpt20b/checkpoint-172/tokenizer_config.json +14 -0
  15. outputs/gpt20b/checkpoint-172/trainer_state.json +115 -0
  16. outputs/gpt20b/checkpoint-172/training_args.bin +3 -0
  17. outputs/gpt20b/checkpoint-430/README.md +207 -0
  18. outputs/gpt20b/checkpoint-430/adapter_config.json +41 -0
  19. outputs/gpt20b/checkpoint-430/adapter_model.safetensors +3 -0
  20. outputs/gpt20b/checkpoint-430/chat_template.jinja +331 -0
  21. outputs/gpt20b/checkpoint-430/optimizer.pt +3 -0
  22. outputs/gpt20b/checkpoint-430/rng_state.pth +3 -0
  23. outputs/gpt20b/checkpoint-430/scheduler.pt +3 -0
  24. outputs/gpt20b/checkpoint-430/tokenizer.json +3 -0
  25. outputs/gpt20b/checkpoint-430/tokenizer_config.json +14 -0
  26. outputs/gpt20b/checkpoint-430/trainer_state.json +230 -0
  27. outputs/gpt20b/checkpoint-430/training_args.bin +3 -0
  28. outputs/gpt20b/test_results.json +18 -0
  29. outputs/phobert/checkpoint-172/added_tokens.json +3 -0
  30. outputs/phobert/checkpoint-172/bpe.codes +0 -0
  31. outputs/phobert/checkpoint-172/config.json +39 -0
  32. outputs/phobert/checkpoint-172/model.safetensors +3 -0
  33. outputs/phobert/checkpoint-172/optimizer.pt +3 -0
  34. outputs/phobert/checkpoint-172/rng_state.pth +3 -0
  35. outputs/phobert/checkpoint-172/scheduler.pt +3 -0
  36. outputs/phobert/checkpoint-172/tokenizer_config.json +55 -0
  37. outputs/phobert/checkpoint-172/trainer_state.json +90 -0
  38. outputs/phobert/checkpoint-172/training_args.bin +3 -0
  39. outputs/phobert/checkpoint-172/vocab.txt +0 -0
  40. outputs/phobert/checkpoint-430/added_tokens.json +3 -0
  41. outputs/phobert/checkpoint-430/bpe.codes +0 -0
  42. outputs/phobert/checkpoint-430/config.json +39 -0
  43. outputs/phobert/checkpoint-430/model.safetensors +3 -0
  44. outputs/phobert/checkpoint-430/optimizer.pt +3 -0
  45. outputs/phobert/checkpoint-430/rng_state.pth +3 -0
  46. outputs/phobert/checkpoint-430/scheduler.pt +3 -0
  47. outputs/phobert/checkpoint-430/tokenizer_config.json +55 -0
  48. outputs/phobert/checkpoint-430/trainer_state.json +164 -0
  49. outputs/phobert/checkpoint-430/training_args.bin +3 -0
  50. outputs/phobert/checkpoint-430/vocab.txt +0 -0
.gitattributes CHANGED
@@ -33,3 +33,5 @@ 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
+ outputs/gpt20b/checkpoint-172/tokenizer.json filter=lfs diff=lfs merge=lfs -text
37
+ outputs/gpt20b/checkpoint-430/tokenizer.json filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ViClickbait-2025 – Vietnamese Clickbait Detection
2
+
3
+ Phân lớp clickbait tiếng Việt trên dataset ViClickbait-2025 (3.414 tin tức).
4
+ Baseline: **PhoBERT** · Model chính: **openai/gpt-oss-20b** (LoRA + BF16)
5
+
6
+ ## Cấu trúc dự án
7
+
8
+ ```
9
+ scripts/
10
+ ├── prepare_data.py ← Chia split 80/10/10 stratified, tạo cột text
11
+ ├── train_phobert.py ← Fine-tune PhoBERT baseline
12
+ ├── train_gpt_oss_20b.py ← Fine-tune openai/gpt-oss-20b với LoRA SFT
13
+ └── compare_results.py ← So sánh kết quả 2 model
14
+ run_all.sh ← Chạy toàn bộ pipeline 1 lệnh
15
+ data/splits/ ← train.csv / val.csv / test.csv (tự sinh)
16
+ outputs/
17
+ ├── phobert/ ← Checkpoint + test_results.json
18
+ └── gpt20b/ ← LoRA adapter + test_results.json
19
+ ```
20
+
21
+ ## Dataset
22
+
23
+ | | |
24
+ |---|---|
25
+ | Nguồn | [Mendeley Data – 3wc46bfcjc](https://data.mendeley.com/datasets/3wc46bfcjc/1) |
26
+ | Tổng mẫu | 3.414 tin tức tiếng Việt |
27
+ | Nhãn | `non-clickbait` (2349) / `clickbait` (1065) |
28
+ | Split | Train **2.731** / Val **341** / Test **342** (stratified 80/10/10) |
29
+ | Text input | `title [SEP] lead_paragraph` |
30
+
31
+ ## Cài đặt
32
+
33
+ ```bash
34
+ python3 -m venv .venv && source .venv/bin/activate
35
+ pip install -r requirements.txt
36
+ ```
37
+
38
+ ## Chạy nhanh – Toàn bộ pipeline
39
+
40
+ ```bash
41
+ # Đặt đường dẫn CSV
42
+ export CSV_PATH=/tmp/dataset_nlp/clickbait_dataset_vietnamese.csv
43
+
44
+ # Full pipeline: PhoBERT + GPT-OSS-20B + So sánh
45
+ bash run_all.sh
46
+
47
+ # Chỉ PhoBERT (nếu GPU nhỏ)
48
+ bash run_all.sh --skip_gpt
49
+ ```
50
+
51
+ ## Chạy từng bước
52
+
53
+ ### 1. Chuẩn bị dữ liệu
54
+ ```bash
55
+ python3 scripts/prepare_data.py \
56
+ --csv /tmp/dataset_nlp/clickbait_dataset_vietnamese.csv \
57
+ --out_dir data/splits
58
+ ```
59
+
60
+ ### 2. Huấn luyện PhoBERT baseline
61
+ ```bash
62
+ python3 scripts/train_phobert.py \
63
+ --data_dir data/splits \
64
+ --output_dir outputs/phobert \
65
+ --model_name vinai/phobert-base-v2 \
66
+ --batch_size 32 --lr 2e-5 --epochs 10 \
67
+ --patience 5
68
+ ```
69
+
70
+ ### 3. Huấn luyện GPT-OSS-20B (LoRA SFT)
71
+ ```bash
72
+ python3 scripts/train_gpt_oss_20b.py \
73
+ --data_dir data/splits \
74
+ --output_dir outputs/gpt20b \
75
+ --batch_size 4 --grad_accum 8 \
76
+ --lr 2e-5 --epochs 10 \
77
+ --patience 3 --lora_r 32 --lora_alpha 64
78
+ ```
79
+
80
+ ### 4. So sánh kết quả
81
+ ```bash
82
+ python3 scripts/compare_results.py \
83
+ --phobert_dir outputs/phobert \
84
+ --gpt_dir outputs/gpt20b
85
+ ```
86
+
87
+ ## Thông số kỹ thuật
88
+
89
+ | | PhoBERT | GPT-OSS-20B |
90
+ |---|---|---|
91
+ | Model | `vinai/phobert-base-v2` | `openai/gpt-oss-20b` |
92
+ | Phương pháp | Full fine-tune (SeqCls) | LoRA SFT (Generative, BF16) |
93
+ | LoRA | Không | r=32, alpha=64 |
94
+ | VRAM cần | ~4 GB | ~40 GB (BF16) |
95
+ | Batch hiệu quả | 32 | 32 (4 × grad_accum 8) |
96
+ | LR | 2e-5 | 2e-5 |
97
+ | Epochs (max) | 10 | 10 |
98
+ | Optimizer | AdamW | AdamW |
99
+ | Metrics | Accuracy, F1, Precision, Recall | ← như nhau |
100
+ | Early stopping | patience=5 | patience=3 |
data/splits/test.csv ADDED
The diff for this file is too large to render. See raw diff
 
data/splits/train.csv ADDED
The diff for this file is too large to render. See raw diff
 
data/splits/val.csv ADDED
The diff for this file is too large to render. See raw diff
 
outputs/gpt20b/checkpoint-172/README.md ADDED
@@ -0,0 +1,207 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: openai/gpt-oss-20b
3
+ library_name: peft
4
+ pipeline_tag: text-generation
5
+ tags:
6
+ - base_model:adapter:openai/gpt-oss-20b
7
+ - lora
8
+ - transformers
9
+ ---
10
+
11
+ # Model Card for Model ID
12
+
13
+ <!-- Provide a quick summary of what the model is/does. -->
14
+
15
+
16
+
17
+ ## Model Details
18
+
19
+ ### Model Description
20
+
21
+ <!-- Provide a longer summary of what this model is. -->
22
+
23
+
24
+
25
+ - **Developed by:** [More Information Needed]
26
+ - **Funded by [optional]:** [More Information Needed]
27
+ - **Shared by [optional]:** [More Information Needed]
28
+ - **Model type:** [More Information Needed]
29
+ - **Language(s) (NLP):** [More Information Needed]
30
+ - **License:** [More Information Needed]
31
+ - **Finetuned from model [optional]:** [More Information Needed]
32
+
33
+ ### Model Sources [optional]
34
+
35
+ <!-- Provide the basic links for the model. -->
36
+
37
+ - **Repository:** [More Information Needed]
38
+ - **Paper [optional]:** [More Information Needed]
39
+ - **Demo [optional]:** [More Information Needed]
40
+
41
+ ## Uses
42
+
43
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
44
+
45
+ ### Direct Use
46
+
47
+ <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
48
+
49
+ [More Information Needed]
50
+
51
+ ### Downstream Use [optional]
52
+
53
+ <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
54
+
55
+ [More Information Needed]
56
+
57
+ ### Out-of-Scope Use
58
+
59
+ <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
60
+
61
+ [More Information Needed]
62
+
63
+ ## Bias, Risks, and Limitations
64
+
65
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
66
+
67
+ [More Information Needed]
68
+
69
+ ### Recommendations
70
+
71
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
72
+
73
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
74
+
75
+ ## How to Get Started with the Model
76
+
77
+ Use the code below to get started with the model.
78
+
79
+ [More Information Needed]
80
+
81
+ ## Training Details
82
+
83
+ ### Training Data
84
+
85
+ <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
86
+
87
+ [More Information Needed]
88
+
89
+ ### Training Procedure
90
+
91
+ <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
92
+
93
+ #### Preprocessing [optional]
94
+
95
+ [More Information Needed]
96
+
97
+
98
+ #### Training Hyperparameters
99
+
100
+ - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
101
+
102
+ #### Speeds, Sizes, Times [optional]
103
+
104
+ <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
105
+
106
+ [More Information Needed]
107
+
108
+ ## Evaluation
109
+
110
+ <!-- This section describes the evaluation protocols and provides the results. -->
111
+
112
+ ### Testing Data, Factors & Metrics
113
+
114
+ #### Testing Data
115
+
116
+ <!-- This should link to a Dataset Card if possible. -->
117
+
118
+ [More Information Needed]
119
+
120
+ #### Factors
121
+
122
+ <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
123
+
124
+ [More Information Needed]
125
+
126
+ #### Metrics
127
+
128
+ <!-- These are the evaluation metrics being used, ideally with a description of why. -->
129
+
130
+ [More Information Needed]
131
+
132
+ ### Results
133
+
134
+ [More Information Needed]
135
+
136
+ #### Summary
137
+
138
+
139
+
140
+ ## Model Examination [optional]
141
+
142
+ <!-- Relevant interpretability work for the model goes here -->
143
+
144
+ [More Information Needed]
145
+
146
+ ## Environmental Impact
147
+
148
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
149
+
150
+ Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
151
+
152
+ - **Hardware Type:** [More Information Needed]
153
+ - **Hours used:** [More Information Needed]
154
+ - **Cloud Provider:** [More Information Needed]
155
+ - **Compute Region:** [More Information Needed]
156
+ - **Carbon Emitted:** [More Information Needed]
157
+
158
+ ## Technical Specifications [optional]
159
+
160
+ ### Model Architecture and Objective
161
+
162
+ [More Information Needed]
163
+
164
+ ### Compute Infrastructure
165
+
166
+ [More Information Needed]
167
+
168
+ #### Hardware
169
+
170
+ [More Information Needed]
171
+
172
+ #### Software
173
+
174
+ [More Information Needed]
175
+
176
+ ## Citation [optional]
177
+
178
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
179
+
180
+ **BibTeX:**
181
+
182
+ [More Information Needed]
183
+
184
+ **APA:**
185
+
186
+ [More Information Needed]
187
+
188
+ ## Glossary [optional]
189
+
190
+ <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
191
+
192
+ [More Information Needed]
193
+
194
+ ## More Information [optional]
195
+
196
+ [More Information Needed]
197
+
198
+ ## Model Card Authors [optional]
199
+
200
+ [More Information Needed]
201
+
202
+ ## Model Card Contact
203
+
204
+ [More Information Needed]
205
+ ### Framework versions
206
+
207
+ - PEFT 0.18.1
outputs/gpt20b/checkpoint-172/adapter_config.json ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alora_invocation_tokens": null,
3
+ "alpha_pattern": {},
4
+ "arrow_config": null,
5
+ "auto_mapping": null,
6
+ "base_model_name_or_path": "openai/gpt-oss-20b",
7
+ "bias": "none",
8
+ "corda_config": null,
9
+ "ensure_weight_tying": false,
10
+ "eva_config": null,
11
+ "exclude_modules": null,
12
+ "fan_in_fan_out": false,
13
+ "inference_mode": true,
14
+ "init_lora_weights": true,
15
+ "layer_replication": null,
16
+ "layers_pattern": null,
17
+ "layers_to_transform": null,
18
+ "loftq_config": {},
19
+ "lora_alpha": 64,
20
+ "lora_bias": false,
21
+ "lora_dropout": 0.05,
22
+ "megatron_config": null,
23
+ "megatron_core": "megatron.core",
24
+ "modules_to_save": null,
25
+ "peft_type": "LORA",
26
+ "peft_version": "0.18.1",
27
+ "qalora_group_size": 16,
28
+ "r": 32,
29
+ "rank_pattern": {},
30
+ "revision": null,
31
+ "target_modules": [
32
+ "v_proj",
33
+ "q_proj"
34
+ ],
35
+ "target_parameters": null,
36
+ "task_type": "CAUSAL_LM",
37
+ "trainable_token_indices": null,
38
+ "use_dora": false,
39
+ "use_qalora": false,
40
+ "use_rslora": false
41
+ }
outputs/gpt20b/checkpoint-172/adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c9df3662dfce93ba7bc97de64c61dd8d2bf283f6968ce362133eac12ff572250
3
+ size 31863368
outputs/gpt20b/checkpoint-172/chat_template.jinja ADDED
@@ -0,0 +1,331 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {#-
2
+ In addition to the normal inputs of `messages` and `tools`, this template also accepts the
3
+ following kwargs:
4
+ - "builtin_tools": A list, can contain "browser" and/or "python".
5
+ - "model_identity": A string that optionally describes the model identity.
6
+ - "reasoning_effort": A string that describes the reasoning effort, defaults to "medium".
7
+ #}
8
+
9
+ {#- Tool Definition Rendering ============================================== #}
10
+ {%- macro render_typescript_type(param_spec, required_params, is_nullable=false) -%}
11
+ {%- if param_spec.type == "array" -%}
12
+ {%- if param_spec['items'] -%}
13
+ {%- if param_spec['items']['type'] == "string" -%}
14
+ {{- "string[]" }}
15
+ {%- elif param_spec['items']['type'] == "number" -%}
16
+ {{- "number[]" }}
17
+ {%- elif param_spec['items']['type'] == "integer" -%}
18
+ {{- "number[]" }}
19
+ {%- elif param_spec['items']['type'] == "boolean" -%}
20
+ {{- "boolean[]" }}
21
+ {%- else -%}
22
+ {%- set inner_type = render_typescript_type(param_spec['items'], required_params) -%}
23
+ {%- if inner_type == "object | object" or inner_type|length > 50 -%}
24
+ {{- "any[]" }}
25
+ {%- else -%}
26
+ {{- inner_type + "[]" }}
27
+ {%- endif -%}
28
+ {%- endif -%}
29
+ {%- if param_spec.nullable -%}
30
+ {{- " | null" }}
31
+ {%- endif -%}
32
+ {%- else -%}
33
+ {{- "any[]" }}
34
+ {%- if param_spec.nullable -%}
35
+ {{- " | null" }}
36
+ {%- endif -%}
37
+ {%- endif -%}
38
+ {%- elif param_spec.type is defined and param_spec.type is iterable and param_spec.type is not string and param_spec.type is not mapping and param_spec.type[0] is defined -%}
39
+ {#- Handle array of types like ["object", "object"] from Union[dict, list] #}
40
+ {%- if param_spec.type | length > 1 -%}
41
+ {{- param_spec.type | join(" | ") }}
42
+ {%- else -%}
43
+ {{- param_spec.type[0] }}
44
+ {%- endif -%}
45
+ {%- elif param_spec.oneOf -%}
46
+ {#- Handle oneOf schemas - check for complex unions and fallback to any #}
47
+ {%- set has_object_variants = false -%}
48
+ {%- for variant in param_spec.oneOf -%}
49
+ {%- if variant.type == "object" -%}
50
+ {%- set has_object_variants = true -%}
51
+ {%- endif -%}
52
+ {%- endfor -%}
53
+ {%- if has_object_variants and param_spec.oneOf|length > 1 -%}
54
+ {{- "any" }}
55
+ {%- else -%}
56
+ {%- for variant in param_spec.oneOf -%}
57
+ {{- render_typescript_type(variant, required_params) -}}
58
+ {%- if variant.description %}
59
+ {{- "// " + variant.description }}
60
+ {%- endif -%}
61
+ {%- if variant.default is defined %}
62
+ {{ "// default: " + variant.default|tojson }}
63
+ {%- endif -%}
64
+ {%- if not loop.last %}
65
+ {{- " | " }}
66
+ {% endif -%}
67
+ {%- endfor -%}
68
+ {%- endif -%}
69
+ {%- elif param_spec.type == "string" -%}
70
+ {%- if param_spec.enum -%}
71
+ {{- '"' + param_spec.enum|join('" | "') + '"' -}}
72
+ {%- else -%}
73
+ {{- "string" }}
74
+ {%- if param_spec.nullable %}
75
+ {{- " | null" }}
76
+ {%- endif -%}
77
+ {%- endif -%}
78
+ {%- elif param_spec.type == "number" -%}
79
+ {{- "number" }}
80
+ {%- elif param_spec.type == "integer" -%}
81
+ {{- "number" }}
82
+ {%- elif param_spec.type == "boolean" -%}
83
+ {{- "boolean" }}
84
+
85
+ {%- elif param_spec.type == "object" -%}
86
+ {%- if param_spec.properties -%}
87
+ {{- "{\n" }}
88
+ {%- for prop_name, prop_spec in param_spec.properties.items() -%}
89
+ {{- prop_name -}}
90
+ {%- if prop_name not in (param_spec.required or []) -%}
91
+ {{- "?" }}
92
+ {%- endif -%}
93
+ {{- ": " }}
94
+ {{ render_typescript_type(prop_spec, param_spec.required or []) }}
95
+ {%- if not loop.last -%}
96
+ {{-", " }}
97
+ {%- endif -%}
98
+ {%- endfor -%}
99
+ {{- "}" }}
100
+ {%- else -%}
101
+ {{- "object" }}
102
+ {%- endif -%}
103
+ {%- else -%}
104
+ {{- "any" }}
105
+ {%- endif -%}
106
+ {%- endmacro -%}
107
+
108
+ {%- macro render_tool_namespace(namespace_name, tools) -%}
109
+ {{- "## " + namespace_name + "\n\n" }}
110
+ {{- "namespace " + namespace_name + " {\n\n" }}
111
+ {%- for tool in tools %}
112
+ {%- set tool = tool.function %}
113
+ {{- "// " + tool.description + "\n" }}
114
+ {{- "type "+ tool.name + " = " }}
115
+ {%- if tool.parameters and tool.parameters.properties %}
116
+ {{- "(_: {\n" }}
117
+ {%- for param_name, param_spec in tool.parameters.properties.items() %}
118
+ {%- if param_spec.description %}
119
+ {{- "// " + param_spec.description + "\n" }}
120
+ {%- endif %}
121
+ {{- param_name }}
122
+ {%- if param_name not in (tool.parameters.required or []) -%}
123
+ {{- "?" }}
124
+ {%- endif -%}
125
+ {{- ": " }}
126
+ {{- render_typescript_type(param_spec, tool.parameters.required or []) }}
127
+ {%- if param_spec.default is defined -%}
128
+ {%- if param_spec.enum %}
129
+ {{- ", // default: " + param_spec.default }}
130
+ {%- elif param_spec.oneOf %}
131
+ {{- "// default: " + param_spec.default }}
132
+ {%- else %}
133
+ {{- ", // default: " + param_spec.default|tojson }}
134
+ {%- endif -%}
135
+ {%- endif -%}
136
+ {%- if not loop.last %}
137
+ {{- ",\n" }}
138
+ {%- else %}
139
+ {{- ",\n" }}
140
+ {%- endif -%}
141
+ {%- endfor %}
142
+ {{- "}) => any;\n\n" }}
143
+ {%- else -%}
144
+ {{- "() => any;\n\n" }}
145
+ {%- endif -%}
146
+ {%- endfor %}
147
+ {{- "} // namespace " + namespace_name }}
148
+ {%- endmacro -%}
149
+
150
+ {%- macro render_builtin_tools(browser_tool, python_tool) -%}
151
+ {%- if browser_tool %}
152
+ {{- "## browser\n\n" }}
153
+ {{- "// Tool for browsing.\n" }}
154
+ {{- "// The `cursor` appears in brackets before each browsing display: `[{cursor}]`.\n" }}
155
+ {{- "// Cite information from the tool using the following format:\n" }}
156
+ {{- "// `【{cursor}†L{line_start}(-L{line_end})?】`, for example: `【6†L9-L11】` or `【8†L3】`.\n" }}
157
+ {{- "// Do not quote more than 10 words directly from the tool output.\n" }}
158
+ {{- "// sources=web (default: web)\n" }}
159
+ {{- "namespace browser {\n\n" }}
160
+ {{- "// Searches for information related to `query` and displays `topn` results.\n" }}
161
+ {{- "type search = (_: {\n" }}
162
+ {{- "query: string,\n" }}
163
+ {{- "topn?: number, // default: 10\n" }}
164
+ {{- "source?: string,\n" }}
165
+ {{- "}) => any;\n\n" }}
166
+ {{- "// Opens the link `id` from the page indicated by `cursor` starting at line number `loc`, showing `num_lines` lines.\n" }}
167
+ {{- "// Valid link ids are displayed with the formatting: `【{id}†.*】`.\n" }}
168
+ {{- "// If `cursor` is not provided, the most recent page is implied.\n" }}
169
+ {{- "// If `id` is a string, it is treated as a fully qualified URL associated with `source`.\n" }}
170
+ {{- "// If `loc` is not provided, the viewport will be positioned at the beginning of the document or centered on the most relevant passage, if available.\n" }}
171
+ {{- "// Use this function without `id` to scroll to a new location of an opened page.\n" }}
172
+ {{- "type open = (_: {\n" }}
173
+ {{- "id?: number | string, // default: -1\n" }}
174
+ {{- "cursor?: number, // default: -1\n" }}
175
+ {{- "loc?: number, // default: -1\n" }}
176
+ {{- "num_lines?: number, // default: -1\n" }}
177
+ {{- "view_source?: boolean, // default: false\n" }}
178
+ {{- "source?: string,\n" }}
179
+ {{- "}) => any;\n\n" }}
180
+ {{- "// Finds exact matches of `pattern` in the current page, or the page given by `cursor`.\n" }}
181
+ {{- "type find = (_: {\n" }}
182
+ {{- "pattern: string,\n" }}
183
+ {{- "cursor?: number, // default: -1\n" }}
184
+ {{- "}) => any;\n\n" }}
185
+ {{- "} // namespace browser\n\n" }}
186
+ {%- endif -%}
187
+
188
+ {%- if python_tool %}
189
+ {{- "## python\n\n" }}
190
+ {{- "Use this tool to execute Python code in your chain of thought. The code will not be shown to the user. This tool should be used for internal reasoning, but not for code that is intended to be visible to the user (e.g. when creating plots, tables, or files).\n\n" }}
191
+ {{- "When you send a message containing Python code to python, it will be executed in a stateful Jupyter notebook environment. python will respond with the output of the execution or time out after 120.0 seconds. The drive at '/mnt/data' can be used to save and persist user files. Internet access for this session is UNKNOWN. Depends on the cluster.\n\n" }}
192
+ {%- endif -%}
193
+ {%- endmacro -%}
194
+
195
+ {#- System Message Construction ============================================ #}
196
+ {%- macro build_system_message() -%}
197
+ {%- if model_identity is not defined %}
198
+ {%- set model_identity = "You are ChatGPT, a large language model trained by OpenAI." %}
199
+ {%- endif %}
200
+ {{- model_identity + "\n" }}
201
+ {{- "Knowledge cutoff: 2024-06\n" }}
202
+ {{- "Current date: " + strftime_now("%Y-%m-%d") + "\n\n" }}
203
+ {%- if reasoning_effort is not defined %}
204
+ {%- set reasoning_effort = "medium" %}
205
+ {%- endif %}
206
+ {{- "Reasoning: " + reasoning_effort + "\n\n" }}
207
+ {%- if builtin_tools %}
208
+ {{- "# Tools\n\n" }}
209
+ {%- set available_builtin_tools = namespace(browser=false, python=false) %}
210
+ {%- for tool in builtin_tools %}
211
+ {%- if tool == "browser" %}
212
+ {%- set available_builtin_tools.browser = true %}
213
+ {%- elif tool == "python" %}
214
+ {%- set available_builtin_tools.python = true %}
215
+ {%- endif %}
216
+ {%- endfor %}
217
+ {{- render_builtin_tools(available_builtin_tools.browser, available_builtin_tools.python) }}
218
+ {%- endif -%}
219
+ {{- "# Valid channels: analysis, commentary, final. Channel must be included for every message." }}
220
+ {%- if tools -%}
221
+ {{- "\nCalls to these tools must go to the commentary channel: 'functions'." }}
222
+ {%- endif -%}
223
+ {%- endmacro -%}
224
+
225
+ {#- Main Template Logic ================================================= #}
226
+ {#- Set defaults #}
227
+
228
+ {#- Render system message #}
229
+ {{- "<|start|>system<|message|>" }}
230
+ {{- build_system_message() }}
231
+ {{- "<|end|>" }}
232
+
233
+ {#- Extract developer message #}
234
+ {%- if messages[0].role == "developer" or messages[0].role == "system" %}
235
+ {%- set developer_message = messages[0].content %}
236
+ {%- set loop_messages = messages[1:] %}
237
+ {%- else %}
238
+ {%- set developer_message = "" %}
239
+ {%- set loop_messages = messages %}
240
+ {%- endif %}
241
+
242
+ {#- Render developer message #}
243
+ {%- if developer_message or tools %}
244
+ {{- "<|start|>developer<|message|>" }}
245
+ {%- if developer_message %}
246
+ {{- "# Instructions\n\n" }}
247
+ {{- developer_message }}
248
+ {{- "\n\n" }}
249
+ {%- endif %}
250
+ {%- if tools -%}
251
+ {{- "# Tools\n\n" }}
252
+ {{- render_tool_namespace("functions", tools) }}
253
+ {%- endif -%}
254
+ {{- "<|end|>" }}
255
+ {%- endif %}
256
+
257
+ {#- Render messages #}
258
+ {%- set last_tool_call = namespace(name=none) %}
259
+ {%- for message in loop_messages -%}
260
+ {#- At this point only assistant/user/tool messages should remain #}
261
+ {%- if message.role == 'assistant' -%}
262
+ {#- Checks to ensure the messages are being passed in the format we expect #}
263
+ {%- if "content" in message %}
264
+ {%- if "<|channel|>analysis<|message|>" in message.content or "<|channel|>final<|message|>" in message.content %}
265
+ {{- raise_exception("You have passed a message containing <|channel|> tags in the content field. Instead of doing this, you should pass analysis messages (the string between '<|message|>' and '<|end|>') in the 'thinking' field, and final messages (the string between '<|message|>' and '<|end|>') in the 'content' field.") }}
266
+ {%- endif %}
267
+ {%- endif %}
268
+ {%- if "thinking" in message %}
269
+ {%- if "<|channel|>analysis<|message|>" in message.thinking or "<|channel|>final<|message|>" in message.thinking %}
270
+ {{- raise_exception("You have passed a message containing <|channel|> tags in the thinking field. Instead of doing this, you should pass analysis messages (the string between '<|message|>' and '<|end|>') in the 'thinking' field, and final messages (the string between '<|message|>' and '<|end|>') in the 'content' field.") }}
271
+ {%- endif %}
272
+ {%- endif %}
273
+ {%- if "tool_calls" in message %}
274
+ {#- We need very careful handling here - we want to drop the tool call analysis message if the model #}
275
+ {#- has output a later <|final|> message, but otherwise we want to retain it. This is the only case #}
276
+ {#- when we render CoT/analysis messages in inference. #}
277
+ {%- set future_final_message = namespace(found=false) %}
278
+ {%- for future_message in loop_messages[loop.index:] %}
279
+ {%- if future_message.role == 'assistant' and "tool_calls" not in future_message %}
280
+ {%- set future_final_message.found = true %}
281
+ {%- endif %}
282
+ {%- endfor %}
283
+ {#- We assume max 1 tool call per message, and so we infer the tool call name #}
284
+ {#- in "tool" messages from the most recent assistant tool call name #}
285
+ {%- set tool_call = message.tool_calls[0] %}
286
+ {%- if tool_call.function %}
287
+ {%- set tool_call = tool_call.function %}
288
+ {%- endif %}
289
+ {%- if message.content and message.thinking %}
290
+ {{- raise_exception("Cannot pass both content and thinking in an assistant message with tool calls! Put the analysis message in one or the other, but not both.") }}
291
+ {%- elif message.content and not future_final_message.found %}
292
+ {{- "<|start|>assistant<|channel|>analysis<|message|>" + message.content + "<|end|>" }}
293
+ {%- elif message.thinking and not future_final_message.found %}
294
+ {{- "<|start|>assistant<|channel|>analysis<|message|>" + message.thinking + "<|end|>" }}
295
+ {%- endif %}
296
+ {{- "<|start|>assistant to=" }}
297
+ {{- "functions." + tool_call.name + "<|channel|>commentary " }}
298
+ {{- (tool_call.content_type if tool_call.content_type is defined else "json") + "<|message|>" }}
299
+ {{- tool_call.arguments|tojson }}
300
+ {{- "<|call|>" }}
301
+ {%- set last_tool_call.name = tool_call.name %}
302
+ {%- elif loop.last and not add_generation_prompt %}
303
+ {#- Only render the CoT if the final turn is an assistant turn and add_generation_prompt is false #}
304
+ {#- This is a situation that should only occur in training, never in inference. #}
305
+ {%- if "thinking" in message %}
306
+ {{- "<|start|>assistant<|channel|>analysis<|message|>" + message.thinking + "<|end|>" }}
307
+ {%- endif %}
308
+ {#- <|return|> indicates the end of generation, but <|end|> does not #}
309
+ {#- <|return|> should never be an input to the model, but we include it as the final token #}
310
+ {#- when training, so the model learns to emit it. #}
311
+ {{- "<|start|>assistant<|channel|>final<|message|>" + message.content + "<|return|>" }}
312
+ {%- else %}
313
+ {#- CoT is dropped during all previous turns, so we never render it for inference #}
314
+ {{- "<|start|>assistant<|channel|>final<|message|>" + message.content + "<|end|>" }}
315
+ {%- set last_tool_call.name = none %}
316
+ {%- endif %}
317
+ {%- elif message.role == 'tool' -%}
318
+ {%- if last_tool_call.name is none %}
319
+ {{- raise_exception("Message has tool role, but there was no previous assistant message with a tool call!") }}
320
+ {%- endif %}
321
+ {{- "<|start|>functions." + last_tool_call.name }}
322
+ {{- " to=assistant<|channel|>commentary<|message|>" + message.content|tojson + "<|end|>" }}
323
+ {%- elif message.role == 'user' -%}
324
+ {{- "<|start|>user<|message|>" + message.content + "<|end|>" }}
325
+ {%- endif -%}
326
+ {%- endfor -%}
327
+
328
+ {#- Generation prompt #}
329
+ {%- if add_generation_prompt -%}
330
+ <|start|>assistant
331
+ {%- endif -%}
outputs/gpt20b/checkpoint-172/optimizer.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e26598338a87758439fab233b00aa23597f90cb60069edc0fd6d9fb54a3201f3
3
+ size 63783947
outputs/gpt20b/checkpoint-172/rng_state.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:37763955dff3adc105ab5d2717c8403ea132502efe2f429effec2da31136f582
3
+ size 14645
outputs/gpt20b/checkpoint-172/scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8fa7dfa3097695e97a0eceb284f8ca57d447214b7191abcdfdd6330cc321daf5
3
+ size 1465
outputs/gpt20b/checkpoint-172/tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0614fe83cadab421296e664e1f48f4261fa8fef6e03e63bb75c20f38e37d07d3
3
+ size 27868174
outputs/gpt20b/checkpoint-172/tokenizer_config.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "backend": "tokenizers",
3
+ "bos_token": "<|startoftext|>",
4
+ "clean_up_tokenization_spaces": false,
5
+ "eos_token": "<|return|>",
6
+ "is_local": false,
7
+ "model_input_names": [
8
+ "input_ids",
9
+ "attention_mask"
10
+ ],
11
+ "model_max_length": 1000000000000000019884624838656,
12
+ "pad_token": "<|endoftext|>",
13
+ "tokenizer_class": "TokenizersBackend"
14
+ }
outputs/gpt20b/checkpoint-172/trainer_state.json ADDED
@@ -0,0 +1,115 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_global_step": 172,
3
+ "best_metric": 0.17171242833137512,
4
+ "best_model_checkpoint": "outputs/gpt20b/checkpoint-172",
5
+ "epoch": 2.0,
6
+ "eval_steps": 500,
7
+ "global_step": 172,
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.2342606149341142,
14
+ "grad_norm": 6.591495037078857,
15
+ "learning_rate": 4.4705882352941184e-06,
16
+ "loss": 3.6590213775634766,
17
+ "step": 20
18
+ },
19
+ {
20
+ "epoch": 0.4685212298682284,
21
+ "grad_norm": 0.7667416930198669,
22
+ "learning_rate": 9.176470588235294e-06,
23
+ "loss": 1.4007156372070313,
24
+ "step": 40
25
+ },
26
+ {
27
+ "epoch": 0.7027818448023426,
28
+ "grad_norm": 0.6783502101898193,
29
+ "learning_rate": 1.3882352941176471e-05,
30
+ "loss": 0.30374038219451904,
31
+ "step": 60
32
+ },
33
+ {
34
+ "epoch": 0.9370424597364568,
35
+ "grad_norm": 0.7530538439750671,
36
+ "learning_rate": 1.8588235294117647e-05,
37
+ "loss": 0.19216808080673217,
38
+ "step": 80
39
+ },
40
+ {
41
+ "epoch": 1.0,
42
+ "eval_loss": 0.2223781943321228,
43
+ "eval_runtime": 15.3742,
44
+ "eval_samples_per_second": 22.18,
45
+ "eval_steps_per_second": 11.123,
46
+ "step": 86
47
+ },
48
+ {
49
+ "epoch": 1.16398243045388,
50
+ "grad_norm": 0.4411153197288513,
51
+ "learning_rate": 1.998390074233044e-05,
52
+ "loss": 0.18789761066436766,
53
+ "step": 100
54
+ },
55
+ {
56
+ "epoch": 1.3982430453879942,
57
+ "grad_norm": 0.3221547305583954,
58
+ "learning_rate": 1.9905171999260846e-05,
59
+ "loss": 0.17252968549728392,
60
+ "step": 120
61
+ },
62
+ {
63
+ "epoch": 1.6325036603221084,
64
+ "grad_norm": 0.44746410846710205,
65
+ "learning_rate": 1.976137330826869e-05,
66
+ "loss": 0.15040807723999022,
67
+ "step": 140
68
+ },
69
+ {
70
+ "epoch": 1.8667642752562226,
71
+ "grad_norm": 0.3515627980232239,
72
+ "learning_rate": 1.9553449324664844e-05,
73
+ "loss": 0.16120578050613404,
74
+ "step": 160
75
+ },
76
+ {
77
+ "epoch": 2.0,
78
+ "eval_loss": 0.17171242833137512,
79
+ "eval_runtime": 15.3268,
80
+ "eval_samples_per_second": 22.249,
81
+ "eval_steps_per_second": 11.157,
82
+ "step": 172
83
+ }
84
+ ],
85
+ "logging_steps": 20,
86
+ "max_steps": 860,
87
+ "num_input_tokens_seen": 0,
88
+ "num_train_epochs": 10,
89
+ "save_steps": 500,
90
+ "stateful_callbacks": {
91
+ "EarlyStoppingCallback": {
92
+ "args": {
93
+ "early_stopping_patience": 3,
94
+ "early_stopping_threshold": 0.0
95
+ },
96
+ "attributes": {
97
+ "early_stopping_patience_counter": 0
98
+ }
99
+ },
100
+ "TrainerControl": {
101
+ "args": {
102
+ "should_epoch_stop": false,
103
+ "should_evaluate": false,
104
+ "should_log": false,
105
+ "should_save": true,
106
+ "should_training_stop": false
107
+ },
108
+ "attributes": {}
109
+ }
110
+ },
111
+ "total_flos": 7.243093872007258e+16,
112
+ "train_batch_size": 2,
113
+ "trial_name": null,
114
+ "trial_params": null
115
+ }
outputs/gpt20b/checkpoint-172/training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5c145b6bdc696075e9e9443160967fdc0311fdcc993ff9c18b5be5174613e60b
3
+ size 5201
outputs/gpt20b/checkpoint-430/README.md ADDED
@@ -0,0 +1,207 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: openai/gpt-oss-20b
3
+ library_name: peft
4
+ pipeline_tag: text-generation
5
+ tags:
6
+ - base_model:adapter:openai/gpt-oss-20b
7
+ - lora
8
+ - transformers
9
+ ---
10
+
11
+ # Model Card for Model ID
12
+
13
+ <!-- Provide a quick summary of what the model is/does. -->
14
+
15
+
16
+
17
+ ## Model Details
18
+
19
+ ### Model Description
20
+
21
+ <!-- Provide a longer summary of what this model is. -->
22
+
23
+
24
+
25
+ - **Developed by:** [More Information Needed]
26
+ - **Funded by [optional]:** [More Information Needed]
27
+ - **Shared by [optional]:** [More Information Needed]
28
+ - **Model type:** [More Information Needed]
29
+ - **Language(s) (NLP):** [More Information Needed]
30
+ - **License:** [More Information Needed]
31
+ - **Finetuned from model [optional]:** [More Information Needed]
32
+
33
+ ### Model Sources [optional]
34
+
35
+ <!-- Provide the basic links for the model. -->
36
+
37
+ - **Repository:** [More Information Needed]
38
+ - **Paper [optional]:** [More Information Needed]
39
+ - **Demo [optional]:** [More Information Needed]
40
+
41
+ ## Uses
42
+
43
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
44
+
45
+ ### Direct Use
46
+
47
+ <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
48
+
49
+ [More Information Needed]
50
+
51
+ ### Downstream Use [optional]
52
+
53
+ <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
54
+
55
+ [More Information Needed]
56
+
57
+ ### Out-of-Scope Use
58
+
59
+ <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
60
+
61
+ [More Information Needed]
62
+
63
+ ## Bias, Risks, and Limitations
64
+
65
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
66
+
67
+ [More Information Needed]
68
+
69
+ ### Recommendations
70
+
71
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
72
+
73
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
74
+
75
+ ## How to Get Started with the Model
76
+
77
+ Use the code below to get started with the model.
78
+
79
+ [More Information Needed]
80
+
81
+ ## Training Details
82
+
83
+ ### Training Data
84
+
85
+ <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
86
+
87
+ [More Information Needed]
88
+
89
+ ### Training Procedure
90
+
91
+ <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
92
+
93
+ #### Preprocessing [optional]
94
+
95
+ [More Information Needed]
96
+
97
+
98
+ #### Training Hyperparameters
99
+
100
+ - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
101
+
102
+ #### Speeds, Sizes, Times [optional]
103
+
104
+ <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
105
+
106
+ [More Information Needed]
107
+
108
+ ## Evaluation
109
+
110
+ <!-- This section describes the evaluation protocols and provides the results. -->
111
+
112
+ ### Testing Data, Factors & Metrics
113
+
114
+ #### Testing Data
115
+
116
+ <!-- This should link to a Dataset Card if possible. -->
117
+
118
+ [More Information Needed]
119
+
120
+ #### Factors
121
+
122
+ <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
123
+
124
+ [More Information Needed]
125
+
126
+ #### Metrics
127
+
128
+ <!-- These are the evaluation metrics being used, ideally with a description of why. -->
129
+
130
+ [More Information Needed]
131
+
132
+ ### Results
133
+
134
+ [More Information Needed]
135
+
136
+ #### Summary
137
+
138
+
139
+
140
+ ## Model Examination [optional]
141
+
142
+ <!-- Relevant interpretability work for the model goes here -->
143
+
144
+ [More Information Needed]
145
+
146
+ ## Environmental Impact
147
+
148
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
149
+
150
+ Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
151
+
152
+ - **Hardware Type:** [More Information Needed]
153
+ - **Hours used:** [More Information Needed]
154
+ - **Cloud Provider:** [More Information Needed]
155
+ - **Compute Region:** [More Information Needed]
156
+ - **Carbon Emitted:** [More Information Needed]
157
+
158
+ ## Technical Specifications [optional]
159
+
160
+ ### Model Architecture and Objective
161
+
162
+ [More Information Needed]
163
+
164
+ ### Compute Infrastructure
165
+
166
+ [More Information Needed]
167
+
168
+ #### Hardware
169
+
170
+ [More Information Needed]
171
+
172
+ #### Software
173
+
174
+ [More Information Needed]
175
+
176
+ ## Citation [optional]
177
+
178
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
179
+
180
+ **BibTeX:**
181
+
182
+ [More Information Needed]
183
+
184
+ **APA:**
185
+
186
+ [More Information Needed]
187
+
188
+ ## Glossary [optional]
189
+
190
+ <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
191
+
192
+ [More Information Needed]
193
+
194
+ ## More Information [optional]
195
+
196
+ [More Information Needed]
197
+
198
+ ## Model Card Authors [optional]
199
+
200
+ [More Information Needed]
201
+
202
+ ## Model Card Contact
203
+
204
+ [More Information Needed]
205
+ ### Framework versions
206
+
207
+ - PEFT 0.18.1
outputs/gpt20b/checkpoint-430/adapter_config.json ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alora_invocation_tokens": null,
3
+ "alpha_pattern": {},
4
+ "arrow_config": null,
5
+ "auto_mapping": null,
6
+ "base_model_name_or_path": "openai/gpt-oss-20b",
7
+ "bias": "none",
8
+ "corda_config": null,
9
+ "ensure_weight_tying": false,
10
+ "eva_config": null,
11
+ "exclude_modules": null,
12
+ "fan_in_fan_out": false,
13
+ "inference_mode": true,
14
+ "init_lora_weights": true,
15
+ "layer_replication": null,
16
+ "layers_pattern": null,
17
+ "layers_to_transform": null,
18
+ "loftq_config": {},
19
+ "lora_alpha": 64,
20
+ "lora_bias": false,
21
+ "lora_dropout": 0.05,
22
+ "megatron_config": null,
23
+ "megatron_core": "megatron.core",
24
+ "modules_to_save": null,
25
+ "peft_type": "LORA",
26
+ "peft_version": "0.18.1",
27
+ "qalora_group_size": 16,
28
+ "r": 32,
29
+ "rank_pattern": {},
30
+ "revision": null,
31
+ "target_modules": [
32
+ "v_proj",
33
+ "q_proj"
34
+ ],
35
+ "target_parameters": null,
36
+ "task_type": "CAUSAL_LM",
37
+ "trainable_token_indices": null,
38
+ "use_dora": false,
39
+ "use_qalora": false,
40
+ "use_rslora": false
41
+ }
outputs/gpt20b/checkpoint-430/adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:947f6ef91f7c810b8af67c30800b2c16a84dc8d2ad632f04229a0b23773d8c4f
3
+ size 31863368
outputs/gpt20b/checkpoint-430/chat_template.jinja ADDED
@@ -0,0 +1,331 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {#-
2
+ In addition to the normal inputs of `messages` and `tools`, this template also accepts the
3
+ following kwargs:
4
+ - "builtin_tools": A list, can contain "browser" and/or "python".
5
+ - "model_identity": A string that optionally describes the model identity.
6
+ - "reasoning_effort": A string that describes the reasoning effort, defaults to "medium".
7
+ #}
8
+
9
+ {#- Tool Definition Rendering ============================================== #}
10
+ {%- macro render_typescript_type(param_spec, required_params, is_nullable=false) -%}
11
+ {%- if param_spec.type == "array" -%}
12
+ {%- if param_spec['items'] -%}
13
+ {%- if param_spec['items']['type'] == "string" -%}
14
+ {{- "string[]" }}
15
+ {%- elif param_spec['items']['type'] == "number" -%}
16
+ {{- "number[]" }}
17
+ {%- elif param_spec['items']['type'] == "integer" -%}
18
+ {{- "number[]" }}
19
+ {%- elif param_spec['items']['type'] == "boolean" -%}
20
+ {{- "boolean[]" }}
21
+ {%- else -%}
22
+ {%- set inner_type = render_typescript_type(param_spec['items'], required_params) -%}
23
+ {%- if inner_type == "object | object" or inner_type|length > 50 -%}
24
+ {{- "any[]" }}
25
+ {%- else -%}
26
+ {{- inner_type + "[]" }}
27
+ {%- endif -%}
28
+ {%- endif -%}
29
+ {%- if param_spec.nullable -%}
30
+ {{- " | null" }}
31
+ {%- endif -%}
32
+ {%- else -%}
33
+ {{- "any[]" }}
34
+ {%- if param_spec.nullable -%}
35
+ {{- " | null" }}
36
+ {%- endif -%}
37
+ {%- endif -%}
38
+ {%- elif param_spec.type is defined and param_spec.type is iterable and param_spec.type is not string and param_spec.type is not mapping and param_spec.type[0] is defined -%}
39
+ {#- Handle array of types like ["object", "object"] from Union[dict, list] #}
40
+ {%- if param_spec.type | length > 1 -%}
41
+ {{- param_spec.type | join(" | ") }}
42
+ {%- else -%}
43
+ {{- param_spec.type[0] }}
44
+ {%- endif -%}
45
+ {%- elif param_spec.oneOf -%}
46
+ {#- Handle oneOf schemas - check for complex unions and fallback to any #}
47
+ {%- set has_object_variants = false -%}
48
+ {%- for variant in param_spec.oneOf -%}
49
+ {%- if variant.type == "object" -%}
50
+ {%- set has_object_variants = true -%}
51
+ {%- endif -%}
52
+ {%- endfor -%}
53
+ {%- if has_object_variants and param_spec.oneOf|length > 1 -%}
54
+ {{- "any" }}
55
+ {%- else -%}
56
+ {%- for variant in param_spec.oneOf -%}
57
+ {{- render_typescript_type(variant, required_params) -}}
58
+ {%- if variant.description %}
59
+ {{- "// " + variant.description }}
60
+ {%- endif -%}
61
+ {%- if variant.default is defined %}
62
+ {{ "// default: " + variant.default|tojson }}
63
+ {%- endif -%}
64
+ {%- if not loop.last %}
65
+ {{- " | " }}
66
+ {% endif -%}
67
+ {%- endfor -%}
68
+ {%- endif -%}
69
+ {%- elif param_spec.type == "string" -%}
70
+ {%- if param_spec.enum -%}
71
+ {{- '"' + param_spec.enum|join('" | "') + '"' -}}
72
+ {%- else -%}
73
+ {{- "string" }}
74
+ {%- if param_spec.nullable %}
75
+ {{- " | null" }}
76
+ {%- endif -%}
77
+ {%- endif -%}
78
+ {%- elif param_spec.type == "number" -%}
79
+ {{- "number" }}
80
+ {%- elif param_spec.type == "integer" -%}
81
+ {{- "number" }}
82
+ {%- elif param_spec.type == "boolean" -%}
83
+ {{- "boolean" }}
84
+
85
+ {%- elif param_spec.type == "object" -%}
86
+ {%- if param_spec.properties -%}
87
+ {{- "{\n" }}
88
+ {%- for prop_name, prop_spec in param_spec.properties.items() -%}
89
+ {{- prop_name -}}
90
+ {%- if prop_name not in (param_spec.required or []) -%}
91
+ {{- "?" }}
92
+ {%- endif -%}
93
+ {{- ": " }}
94
+ {{ render_typescript_type(prop_spec, param_spec.required or []) }}
95
+ {%- if not loop.last -%}
96
+ {{-", " }}
97
+ {%- endif -%}
98
+ {%- endfor -%}
99
+ {{- "}" }}
100
+ {%- else -%}
101
+ {{- "object" }}
102
+ {%- endif -%}
103
+ {%- else -%}
104
+ {{- "any" }}
105
+ {%- endif -%}
106
+ {%- endmacro -%}
107
+
108
+ {%- macro render_tool_namespace(namespace_name, tools) -%}
109
+ {{- "## " + namespace_name + "\n\n" }}
110
+ {{- "namespace " + namespace_name + " {\n\n" }}
111
+ {%- for tool in tools %}
112
+ {%- set tool = tool.function %}
113
+ {{- "// " + tool.description + "\n" }}
114
+ {{- "type "+ tool.name + " = " }}
115
+ {%- if tool.parameters and tool.parameters.properties %}
116
+ {{- "(_: {\n" }}
117
+ {%- for param_name, param_spec in tool.parameters.properties.items() %}
118
+ {%- if param_spec.description %}
119
+ {{- "// " + param_spec.description + "\n" }}
120
+ {%- endif %}
121
+ {{- param_name }}
122
+ {%- if param_name not in (tool.parameters.required or []) -%}
123
+ {{- "?" }}
124
+ {%- endif -%}
125
+ {{- ": " }}
126
+ {{- render_typescript_type(param_spec, tool.parameters.required or []) }}
127
+ {%- if param_spec.default is defined -%}
128
+ {%- if param_spec.enum %}
129
+ {{- ", // default: " + param_spec.default }}
130
+ {%- elif param_spec.oneOf %}
131
+ {{- "// default: " + param_spec.default }}
132
+ {%- else %}
133
+ {{- ", // default: " + param_spec.default|tojson }}
134
+ {%- endif -%}
135
+ {%- endif -%}
136
+ {%- if not loop.last %}
137
+ {{- ",\n" }}
138
+ {%- else %}
139
+ {{- ",\n" }}
140
+ {%- endif -%}
141
+ {%- endfor %}
142
+ {{- "}) => any;\n\n" }}
143
+ {%- else -%}
144
+ {{- "() => any;\n\n" }}
145
+ {%- endif -%}
146
+ {%- endfor %}
147
+ {{- "} // namespace " + namespace_name }}
148
+ {%- endmacro -%}
149
+
150
+ {%- macro render_builtin_tools(browser_tool, python_tool) -%}
151
+ {%- if browser_tool %}
152
+ {{- "## browser\n\n" }}
153
+ {{- "// Tool for browsing.\n" }}
154
+ {{- "// The `cursor` appears in brackets before each browsing display: `[{cursor}]`.\n" }}
155
+ {{- "// Cite information from the tool using the following format:\n" }}
156
+ {{- "// `【{cursor}†L{line_start}(-L{line_end})?】`, for example: `【6†L9-L11】` or `【8†L3】`.\n" }}
157
+ {{- "// Do not quote more than 10 words directly from the tool output.\n" }}
158
+ {{- "// sources=web (default: web)\n" }}
159
+ {{- "namespace browser {\n\n" }}
160
+ {{- "// Searches for information related to `query` and displays `topn` results.\n" }}
161
+ {{- "type search = (_: {\n" }}
162
+ {{- "query: string,\n" }}
163
+ {{- "topn?: number, // default: 10\n" }}
164
+ {{- "source?: string,\n" }}
165
+ {{- "}) => any;\n\n" }}
166
+ {{- "// Opens the link `id` from the page indicated by `cursor` starting at line number `loc`, showing `num_lines` lines.\n" }}
167
+ {{- "// Valid link ids are displayed with the formatting: `【{id}†.*】`.\n" }}
168
+ {{- "// If `cursor` is not provided, the most recent page is implied.\n" }}
169
+ {{- "// If `id` is a string, it is treated as a fully qualified URL associated with `source`.\n" }}
170
+ {{- "// If `loc` is not provided, the viewport will be positioned at the beginning of the document or centered on the most relevant passage, if available.\n" }}
171
+ {{- "// Use this function without `id` to scroll to a new location of an opened page.\n" }}
172
+ {{- "type open = (_: {\n" }}
173
+ {{- "id?: number | string, // default: -1\n" }}
174
+ {{- "cursor?: number, // default: -1\n" }}
175
+ {{- "loc?: number, // default: -1\n" }}
176
+ {{- "num_lines?: number, // default: -1\n" }}
177
+ {{- "view_source?: boolean, // default: false\n" }}
178
+ {{- "source?: string,\n" }}
179
+ {{- "}) => any;\n\n" }}
180
+ {{- "// Finds exact matches of `pattern` in the current page, or the page given by `cursor`.\n" }}
181
+ {{- "type find = (_: {\n" }}
182
+ {{- "pattern: string,\n" }}
183
+ {{- "cursor?: number, // default: -1\n" }}
184
+ {{- "}) => any;\n\n" }}
185
+ {{- "} // namespace browser\n\n" }}
186
+ {%- endif -%}
187
+
188
+ {%- if python_tool %}
189
+ {{- "## python\n\n" }}
190
+ {{- "Use this tool to execute Python code in your chain of thought. The code will not be shown to the user. This tool should be used for internal reasoning, but not for code that is intended to be visible to the user (e.g. when creating plots, tables, or files).\n\n" }}
191
+ {{- "When you send a message containing Python code to python, it will be executed in a stateful Jupyter notebook environment. python will respond with the output of the execution or time out after 120.0 seconds. The drive at '/mnt/data' can be used to save and persist user files. Internet access for this session is UNKNOWN. Depends on the cluster.\n\n" }}
192
+ {%- endif -%}
193
+ {%- endmacro -%}
194
+
195
+ {#- System Message Construction ============================================ #}
196
+ {%- macro build_system_message() -%}
197
+ {%- if model_identity is not defined %}
198
+ {%- set model_identity = "You are ChatGPT, a large language model trained by OpenAI." %}
199
+ {%- endif %}
200
+ {{- model_identity + "\n" }}
201
+ {{- "Knowledge cutoff: 2024-06\n" }}
202
+ {{- "Current date: " + strftime_now("%Y-%m-%d") + "\n\n" }}
203
+ {%- if reasoning_effort is not defined %}
204
+ {%- set reasoning_effort = "medium" %}
205
+ {%- endif %}
206
+ {{- "Reasoning: " + reasoning_effort + "\n\n" }}
207
+ {%- if builtin_tools %}
208
+ {{- "# Tools\n\n" }}
209
+ {%- set available_builtin_tools = namespace(browser=false, python=false) %}
210
+ {%- for tool in builtin_tools %}
211
+ {%- if tool == "browser" %}
212
+ {%- set available_builtin_tools.browser = true %}
213
+ {%- elif tool == "python" %}
214
+ {%- set available_builtin_tools.python = true %}
215
+ {%- endif %}
216
+ {%- endfor %}
217
+ {{- render_builtin_tools(available_builtin_tools.browser, available_builtin_tools.python) }}
218
+ {%- endif -%}
219
+ {{- "# Valid channels: analysis, commentary, final. Channel must be included for every message." }}
220
+ {%- if tools -%}
221
+ {{- "\nCalls to these tools must go to the commentary channel: 'functions'." }}
222
+ {%- endif -%}
223
+ {%- endmacro -%}
224
+
225
+ {#- Main Template Logic ================================================= #}
226
+ {#- Set defaults #}
227
+
228
+ {#- Render system message #}
229
+ {{- "<|start|>system<|message|>" }}
230
+ {{- build_system_message() }}
231
+ {{- "<|end|>" }}
232
+
233
+ {#- Extract developer message #}
234
+ {%- if messages[0].role == "developer" or messages[0].role == "system" %}
235
+ {%- set developer_message = messages[0].content %}
236
+ {%- set loop_messages = messages[1:] %}
237
+ {%- else %}
238
+ {%- set developer_message = "" %}
239
+ {%- set loop_messages = messages %}
240
+ {%- endif %}
241
+
242
+ {#- Render developer message #}
243
+ {%- if developer_message or tools %}
244
+ {{- "<|start|>developer<|message|>" }}
245
+ {%- if developer_message %}
246
+ {{- "# Instructions\n\n" }}
247
+ {{- developer_message }}
248
+ {{- "\n\n" }}
249
+ {%- endif %}
250
+ {%- if tools -%}
251
+ {{- "# Tools\n\n" }}
252
+ {{- render_tool_namespace("functions", tools) }}
253
+ {%- endif -%}
254
+ {{- "<|end|>" }}
255
+ {%- endif %}
256
+
257
+ {#- Render messages #}
258
+ {%- set last_tool_call = namespace(name=none) %}
259
+ {%- for message in loop_messages -%}
260
+ {#- At this point only assistant/user/tool messages should remain #}
261
+ {%- if message.role == 'assistant' -%}
262
+ {#- Checks to ensure the messages are being passed in the format we expect #}
263
+ {%- if "content" in message %}
264
+ {%- if "<|channel|>analysis<|message|>" in message.content or "<|channel|>final<|message|>" in message.content %}
265
+ {{- raise_exception("You have passed a message containing <|channel|> tags in the content field. Instead of doing this, you should pass analysis messages (the string between '<|message|>' and '<|end|>') in the 'thinking' field, and final messages (the string between '<|message|>' and '<|end|>') in the 'content' field.") }}
266
+ {%- endif %}
267
+ {%- endif %}
268
+ {%- if "thinking" in message %}
269
+ {%- if "<|channel|>analysis<|message|>" in message.thinking or "<|channel|>final<|message|>" in message.thinking %}
270
+ {{- raise_exception("You have passed a message containing <|channel|> tags in the thinking field. Instead of doing this, you should pass analysis messages (the string between '<|message|>' and '<|end|>') in the 'thinking' field, and final messages (the string between '<|message|>' and '<|end|>') in the 'content' field.") }}
271
+ {%- endif %}
272
+ {%- endif %}
273
+ {%- if "tool_calls" in message %}
274
+ {#- We need very careful handling here - we want to drop the tool call analysis message if the model #}
275
+ {#- has output a later <|final|> message, but otherwise we want to retain it. This is the only case #}
276
+ {#- when we render CoT/analysis messages in inference. #}
277
+ {%- set future_final_message = namespace(found=false) %}
278
+ {%- for future_message in loop_messages[loop.index:] %}
279
+ {%- if future_message.role == 'assistant' and "tool_calls" not in future_message %}
280
+ {%- set future_final_message.found = true %}
281
+ {%- endif %}
282
+ {%- endfor %}
283
+ {#- We assume max 1 tool call per message, and so we infer the tool call name #}
284
+ {#- in "tool" messages from the most recent assistant tool call name #}
285
+ {%- set tool_call = message.tool_calls[0] %}
286
+ {%- if tool_call.function %}
287
+ {%- set tool_call = tool_call.function %}
288
+ {%- endif %}
289
+ {%- if message.content and message.thinking %}
290
+ {{- raise_exception("Cannot pass both content and thinking in an assistant message with tool calls! Put the analysis message in one or the other, but not both.") }}
291
+ {%- elif message.content and not future_final_message.found %}
292
+ {{- "<|start|>assistant<|channel|>analysis<|message|>" + message.content + "<|end|>" }}
293
+ {%- elif message.thinking and not future_final_message.found %}
294
+ {{- "<|start|>assistant<|channel|>analysis<|message|>" + message.thinking + "<|end|>" }}
295
+ {%- endif %}
296
+ {{- "<|start|>assistant to=" }}
297
+ {{- "functions." + tool_call.name + "<|channel|>commentary " }}
298
+ {{- (tool_call.content_type if tool_call.content_type is defined else "json") + "<|message|>" }}
299
+ {{- tool_call.arguments|tojson }}
300
+ {{- "<|call|>" }}
301
+ {%- set last_tool_call.name = tool_call.name %}
302
+ {%- elif loop.last and not add_generation_prompt %}
303
+ {#- Only render the CoT if the final turn is an assistant turn and add_generation_prompt is false #}
304
+ {#- This is a situation that should only occur in training, never in inference. #}
305
+ {%- if "thinking" in message %}
306
+ {{- "<|start|>assistant<|channel|>analysis<|message|>" + message.thinking + "<|end|>" }}
307
+ {%- endif %}
308
+ {#- <|return|> indicates the end of generation, but <|end|> does not #}
309
+ {#- <|return|> should never be an input to the model, but we include it as the final token #}
310
+ {#- when training, so the model learns to emit it. #}
311
+ {{- "<|start|>assistant<|channel|>final<|message|>" + message.content + "<|return|>" }}
312
+ {%- else %}
313
+ {#- CoT is dropped during all previous turns, so we never render it for inference #}
314
+ {{- "<|start|>assistant<|channel|>final<|message|>" + message.content + "<|end|>" }}
315
+ {%- set last_tool_call.name = none %}
316
+ {%- endif %}
317
+ {%- elif message.role == 'tool' -%}
318
+ {%- if last_tool_call.name is none %}
319
+ {{- raise_exception("Message has tool role, but there was no previous assistant message with a tool call!") }}
320
+ {%- endif %}
321
+ {{- "<|start|>functions." + last_tool_call.name }}
322
+ {{- " to=assistant<|channel|>commentary<|message|>" + message.content|tojson + "<|end|>" }}
323
+ {%- elif message.role == 'user' -%}
324
+ {{- "<|start|>user<|message|>" + message.content + "<|end|>" }}
325
+ {%- endif -%}
326
+ {%- endfor -%}
327
+
328
+ {#- Generation prompt #}
329
+ {%- if add_generation_prompt -%}
330
+ <|start|>assistant
331
+ {%- endif -%}
outputs/gpt20b/checkpoint-430/optimizer.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0789ec983dbcad233f0f7b36ff5f61d05e8d07e88223396aa3dd997e79e032e8
3
+ size 63783947
outputs/gpt20b/checkpoint-430/rng_state.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4ea39b6b84c17c3db83ca0a6951782f970409e1038c8219736f77cc5fedf842e
3
+ size 14645
outputs/gpt20b/checkpoint-430/scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5d106d4a7b4455a321fd540479b725df7946b791781c2d0082c5f83c424ab5e9
3
+ size 1465
outputs/gpt20b/checkpoint-430/tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0614fe83cadab421296e664e1f48f4261fa8fef6e03e63bb75c20f38e37d07d3
3
+ size 27868174
outputs/gpt20b/checkpoint-430/tokenizer_config.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "backend": "tokenizers",
3
+ "bos_token": "<|startoftext|>",
4
+ "clean_up_tokenization_spaces": false,
5
+ "eos_token": "<|return|>",
6
+ "is_local": false,
7
+ "model_input_names": [
8
+ "input_ids",
9
+ "attention_mask"
10
+ ],
11
+ "model_max_length": 1000000000000000019884624838656,
12
+ "pad_token": "<|endoftext|>",
13
+ "tokenizer_class": "TokenizersBackend"
14
+ }
outputs/gpt20b/checkpoint-430/trainer_state.json ADDED
@@ -0,0 +1,230 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_global_step": 172,
3
+ "best_metric": 0.17171242833137512,
4
+ "best_model_checkpoint": "outputs/gpt20b/checkpoint-172",
5
+ "epoch": 5.0,
6
+ "eval_steps": 500,
7
+ "global_step": 430,
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.2342606149341142,
14
+ "grad_norm": 6.591495037078857,
15
+ "learning_rate": 4.4705882352941184e-06,
16
+ "loss": 3.6590213775634766,
17
+ "step": 20
18
+ },
19
+ {
20
+ "epoch": 0.4685212298682284,
21
+ "grad_norm": 0.7667416930198669,
22
+ "learning_rate": 9.176470588235294e-06,
23
+ "loss": 1.4007156372070313,
24
+ "step": 40
25
+ },
26
+ {
27
+ "epoch": 0.7027818448023426,
28
+ "grad_norm": 0.6783502101898193,
29
+ "learning_rate": 1.3882352941176471e-05,
30
+ "loss": 0.30374038219451904,
31
+ "step": 60
32
+ },
33
+ {
34
+ "epoch": 0.9370424597364568,
35
+ "grad_norm": 0.7530538439750671,
36
+ "learning_rate": 1.8588235294117647e-05,
37
+ "loss": 0.19216808080673217,
38
+ "step": 80
39
+ },
40
+ {
41
+ "epoch": 1.0,
42
+ "eval_loss": 0.2223781943321228,
43
+ "eval_runtime": 15.3742,
44
+ "eval_samples_per_second": 22.18,
45
+ "eval_steps_per_second": 11.123,
46
+ "step": 86
47
+ },
48
+ {
49
+ "epoch": 1.16398243045388,
50
+ "grad_norm": 0.4411153197288513,
51
+ "learning_rate": 1.998390074233044e-05,
52
+ "loss": 0.18789761066436766,
53
+ "step": 100
54
+ },
55
+ {
56
+ "epoch": 1.3982430453879942,
57
+ "grad_norm": 0.3221547305583954,
58
+ "learning_rate": 1.9905171999260846e-05,
59
+ "loss": 0.17252968549728392,
60
+ "step": 120
61
+ },
62
+ {
63
+ "epoch": 1.6325036603221084,
64
+ "grad_norm": 0.44746410846710205,
65
+ "learning_rate": 1.976137330826869e-05,
66
+ "loss": 0.15040807723999022,
67
+ "step": 140
68
+ },
69
+ {
70
+ "epoch": 1.8667642752562226,
71
+ "grad_norm": 0.3515627980232239,
72
+ "learning_rate": 1.9553449324664844e-05,
73
+ "loss": 0.16120578050613404,
74
+ "step": 160
75
+ },
76
+ {
77
+ "epoch": 2.0,
78
+ "eval_loss": 0.17171242833137512,
79
+ "eval_runtime": 15.3268,
80
+ "eval_samples_per_second": 22.249,
81
+ "eval_steps_per_second": 11.157,
82
+ "step": 172
83
+ },
84
+ {
85
+ "epoch": 2.0937042459736457,
86
+ "grad_norm": 0.4936041235923767,
87
+ "learning_rate": 1.9282765961407297e-05,
88
+ "loss": 0.1253172278404236,
89
+ "step": 180
90
+ },
91
+ {
92
+ "epoch": 2.32796486090776,
93
+ "grad_norm": 0.5846294164657593,
94
+ "learning_rate": 1.895110141602276e-05,
95
+ "loss": 0.1316730260848999,
96
+ "step": 200
97
+ },
98
+ {
99
+ "epoch": 2.562225475841874,
100
+ "grad_norm": 0.3525918126106262,
101
+ "learning_rate": 1.8560634489111318e-05,
102
+ "loss": 0.1353461503982544,
103
+ "step": 220
104
+ },
105
+ {
106
+ "epoch": 2.7964860907759883,
107
+ "grad_norm": 1.0772862434387207,
108
+ "learning_rate": 1.8113930271173314e-05,
109
+ "loss": 0.1262619376182556,
110
+ "step": 240
111
+ },
112
+ {
113
+ "epoch": 3.0,
114
+ "eval_loss": 0.17799019813537598,
115
+ "eval_runtime": 15.2673,
116
+ "eval_samples_per_second": 22.335,
117
+ "eval_steps_per_second": 11.2,
118
+ "step": 258
119
+ },
120
+ {
121
+ "epoch": 3.0234260614934114,
122
+ "grad_norm": 0.5606379508972168,
123
+ "learning_rate": 1.7613923291785842e-05,
124
+ "loss": 0.15009207725524903,
125
+ "step": 260
126
+ },
127
+ {
128
+ "epoch": 3.2576866764275256,
129
+ "grad_norm": 0.8367531895637512,
130
+ "learning_rate": 1.706389824182677e-05,
131
+ "loss": 0.10897979736328126,
132
+ "step": 280
133
+ },
134
+ {
135
+ "epoch": 3.49194729136164,
136
+ "grad_norm": 0.31723082065582275,
137
+ "learning_rate": 1.646746839538761e-05,
138
+ "loss": 0.13443942070007325,
139
+ "step": 300
140
+ },
141
+ {
142
+ "epoch": 3.726207906295754,
143
+ "grad_norm": 0.2880477011203766,
144
+ "learning_rate": 1.582855187312797e-05,
145
+ "loss": 0.1050987720489502,
146
+ "step": 320
147
+ },
148
+ {
149
+ "epoch": 3.9604685212298683,
150
+ "grad_norm": 0.9684101939201355,
151
+ "learning_rate": 1.5151345903004457e-05,
152
+ "loss": 0.11244453191757202,
153
+ "step": 340
154
+ },
155
+ {
156
+ "epoch": 4.0,
157
+ "eval_loss": 0.19187329709529877,
158
+ "eval_runtime": 15.2889,
159
+ "eval_samples_per_second": 22.304,
160
+ "eval_steps_per_second": 11.185,
161
+ "step": 344
162
+ },
163
+ {
164
+ "epoch": 4.187408491947291,
165
+ "grad_norm": 0.2951606810092926,
166
+ "learning_rate": 1.4440299247462802e-05,
167
+ "loss": 0.10594918727874755,
168
+ "step": 360
169
+ },
170
+ {
171
+ "epoch": 4.421669106881406,
172
+ "grad_norm": 0.3780055344104767,
173
+ "learning_rate": 1.370008297822695e-05,
174
+ "loss": 0.08152877688407897,
175
+ "step": 380
176
+ },
177
+ {
178
+ "epoch": 4.65592972181552,
179
+ "grad_norm": 0.7208774089813232,
180
+ "learning_rate": 1.2935559790674045e-05,
181
+ "loss": 0.09077458381652832,
182
+ "step": 400
183
+ },
184
+ {
185
+ "epoch": 4.890190336749634,
186
+ "grad_norm": 0.2612842619419098,
187
+ "learning_rate": 1.2151752059378033e-05,
188
+ "loss": 0.08751479983329773,
189
+ "step": 420
190
+ },
191
+ {
192
+ "epoch": 5.0,
193
+ "eval_loss": 0.2265627682209015,
194
+ "eval_runtime": 15.315,
195
+ "eval_samples_per_second": 22.266,
196
+ "eval_steps_per_second": 11.166,
197
+ "step": 430
198
+ }
199
+ ],
200
+ "logging_steps": 20,
201
+ "max_steps": 860,
202
+ "num_input_tokens_seen": 0,
203
+ "num_train_epochs": 10,
204
+ "save_steps": 500,
205
+ "stateful_callbacks": {
206
+ "EarlyStoppingCallback": {
207
+ "args": {
208
+ "early_stopping_patience": 3,
209
+ "early_stopping_threshold": 0.0
210
+ },
211
+ "attributes": {
212
+ "early_stopping_patience_counter": 3
213
+ }
214
+ },
215
+ "TrainerControl": {
216
+ "args": {
217
+ "should_epoch_stop": false,
218
+ "should_evaluate": false,
219
+ "should_log": false,
220
+ "should_save": true,
221
+ "should_training_stop": true
222
+ },
223
+ "attributes": {}
224
+ }
225
+ },
226
+ "total_flos": 1.81179207137126e+17,
227
+ "train_batch_size": 2,
228
+ "trial_name": null,
229
+ "trial_params": null
230
+ }
outputs/gpt20b/checkpoint-430/training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5c145b6bdc696075e9e9443160967fdc0311fdcc993ff9c18b5be5174613e60b
3
+ size 5201
outputs/gpt20b/test_results.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model": "openai/gpt-oss-20b",
3
+ "method": "generative_sft",
4
+ "lora_r": 32,
5
+ "lora_alpha": 64,
6
+ "lr": 2e-05,
7
+ "accuracy": 0.8304093567251462,
8
+ "f1_binary": 0.7238095238095238,
9
+ "f1_macro": 0.8007233273056058,
10
+ "precision": 0.7378640776699029,
11
+ "recall": 0.7102803738317757,
12
+ "classification_report": " precision recall f1-score support\n\nnon-clickbait 0.8703 0.8851 0.8776 235\n clickbait 0.7379 0.7103 0.7238 107\n\n accuracy 0.8304 342\n macro avg 0.8041 0.7977 0.8007 342\n weighted avg 0.8289 0.8304 0.8295 342\n",
13
+ "split_sizes": {
14
+ "train": 2731,
15
+ "val": 341,
16
+ "test": 342
17
+ }
18
+ }
outputs/phobert/checkpoint-172/added_tokens.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "<mask>": 64000
3
+ }
outputs/phobert/checkpoint-172/bpe.codes ADDED
The diff for this file is too large to render. See raw diff
 
outputs/phobert/checkpoint-172/config.json ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_cross_attention": false,
3
+ "architectures": [
4
+ "RobertaForSequenceClassification"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "bos_token_id": 0,
8
+ "classifier_dropout": null,
9
+ "dtype": "float32",
10
+ "eos_token_id": 2,
11
+ "hidden_act": "gelu",
12
+ "hidden_dropout_prob": 0.1,
13
+ "hidden_size": 768,
14
+ "id2label": {
15
+ "0": "non-clickbait",
16
+ "1": "clickbait"
17
+ },
18
+ "initializer_range": 0.02,
19
+ "intermediate_size": 3072,
20
+ "is_decoder": false,
21
+ "label2id": {
22
+ "clickbait": 1,
23
+ "non-clickbait": 0
24
+ },
25
+ "layer_norm_eps": 1e-05,
26
+ "max_position_embeddings": 258,
27
+ "model_type": "roberta",
28
+ "num_attention_heads": 12,
29
+ "num_hidden_layers": 12,
30
+ "pad_token_id": 1,
31
+ "position_embedding_type": "absolute",
32
+ "problem_type": "single_label_classification",
33
+ "tie_word_embeddings": true,
34
+ "tokenizer_class": "PhobertTokenizer",
35
+ "transformers_version": "5.3.0",
36
+ "type_vocab_size": 1,
37
+ "use_cache": false,
38
+ "vocab_size": 64001
39
+ }
outputs/phobert/checkpoint-172/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5c15a22ebb7a957b68fa5937753db1f80299132a4a70db2fe67f30a14706ba8a
3
+ size 540023360
outputs/phobert/checkpoint-172/optimizer.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:557826fe596182f13fd3323bb36c054dcc5e8319416f94482b4a9469e51c56c4
3
+ size 1080169867
outputs/phobert/checkpoint-172/rng_state.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:89962c4b66c859a5df20dbbd71e1dd246571b546b9d7c12074b52026cd4249d2
3
+ size 14645
outputs/phobert/checkpoint-172/scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e670233e5615e9ac5e40830eec2e45f875894009403b429162cbda9b864d1f10
3
+ size 1465
outputs/phobert/checkpoint-172/tokenizer_config.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "<s>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "1": {
12
+ "content": "<pad>",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "</s>",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "3": {
28
+ "content": "<unk>",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "64000": {
36
+ "content": "<mask>",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "backend": "custom",
45
+ "bos_token": "<s>",
46
+ "cls_token": "<s>",
47
+ "eos_token": "</s>",
48
+ "is_local": false,
49
+ "mask_token": "<mask>",
50
+ "model_max_length": 1000000000000000019884624838656,
51
+ "pad_token": "<pad>",
52
+ "sep_token": "</s>",
53
+ "tokenizer_class": "PhobertTokenizer",
54
+ "unk_token": "<unk>"
55
+ }
outputs/phobert/checkpoint-172/trainer_state.json ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_global_step": 172,
3
+ "best_metric": 0.7737798136155426,
4
+ "best_model_checkpoint": "outputs/phobert/checkpoint-172",
5
+ "epoch": 2.0,
6
+ "eval_steps": 500,
7
+ "global_step": 172,
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.5813953488372093,
14
+ "grad_norm": 1.1237151622772217,
15
+ "learning_rate": 5.764705882352941e-06,
16
+ "loss": 0.63992431640625,
17
+ "step": 50
18
+ },
19
+ {
20
+ "epoch": 1.0,
21
+ "eval_accuracy": 0.7653958944281525,
22
+ "eval_f1": 0.5604395604395604,
23
+ "eval_f1_macro": 0.7002197802197803,
24
+ "eval_loss": 0.4969119131565094,
25
+ "eval_precision": 0.6710526315789473,
26
+ "eval_recall": 0.4811320754716981,
27
+ "eval_runtime": 0.7063,
28
+ "eval_samples_per_second": 482.786,
29
+ "eval_steps_per_second": 8.495,
30
+ "step": 86
31
+ },
32
+ {
33
+ "epoch": 1.1627906976744187,
34
+ "grad_norm": 2.16060209274292,
35
+ "learning_rate": 1.1647058823529413e-05,
36
+ "loss": 0.5310058975219727,
37
+ "step": 100
38
+ },
39
+ {
40
+ "epoch": 1.744186046511628,
41
+ "grad_norm": 6.030200004577637,
42
+ "learning_rate": 1.7529411764705884e-05,
43
+ "loss": 0.40346920013427734,
44
+ "step": 150
45
+ },
46
+ {
47
+ "epoch": 2.0,
48
+ "eval_accuracy": 0.8152492668621701,
49
+ "eval_f1": 0.676923076923077,
50
+ "eval_f1_macro": 0.7737798136155426,
51
+ "eval_loss": 0.4306434690952301,
52
+ "eval_precision": 0.7415730337078652,
53
+ "eval_recall": 0.6226415094339622,
54
+ "eval_runtime": 0.7292,
55
+ "eval_samples_per_second": 467.638,
56
+ "eval_steps_per_second": 8.228,
57
+ "step": 172
58
+ }
59
+ ],
60
+ "logging_steps": 50,
61
+ "max_steps": 1720,
62
+ "num_input_tokens_seen": 0,
63
+ "num_train_epochs": 20,
64
+ "save_steps": 500,
65
+ "stateful_callbacks": {
66
+ "EarlyStoppingCallback": {
67
+ "args": {
68
+ "early_stopping_patience": 3,
69
+ "early_stopping_threshold": 0.0
70
+ },
71
+ "attributes": {
72
+ "early_stopping_patience_counter": 0
73
+ }
74
+ },
75
+ "TrainerControl": {
76
+ "args": {
77
+ "should_epoch_stop": false,
78
+ "should_evaluate": false,
79
+ "should_log": false,
80
+ "should_save": true,
81
+ "should_training_stop": false
82
+ },
83
+ "attributes": {}
84
+ }
85
+ },
86
+ "total_flos": 335713776087180.0,
87
+ "train_batch_size": 32,
88
+ "trial_name": null,
89
+ "trial_params": null
90
+ }
outputs/phobert/checkpoint-172/training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:70809fb8b9188752ded9f44f05b2f8cc4ed7fd0830a76061292d4dc9474eda4d
3
+ size 5201
outputs/phobert/checkpoint-172/vocab.txt ADDED
The diff for this file is too large to render. See raw diff
 
outputs/phobert/checkpoint-430/added_tokens.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "<mask>": 64000
3
+ }
outputs/phobert/checkpoint-430/bpe.codes ADDED
The diff for this file is too large to render. See raw diff
 
outputs/phobert/checkpoint-430/config.json ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_cross_attention": false,
3
+ "architectures": [
4
+ "RobertaForSequenceClassification"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "bos_token_id": 0,
8
+ "classifier_dropout": null,
9
+ "dtype": "float32",
10
+ "eos_token_id": 2,
11
+ "hidden_act": "gelu",
12
+ "hidden_dropout_prob": 0.1,
13
+ "hidden_size": 768,
14
+ "id2label": {
15
+ "0": "non-clickbait",
16
+ "1": "clickbait"
17
+ },
18
+ "initializer_range": 0.02,
19
+ "intermediate_size": 3072,
20
+ "is_decoder": false,
21
+ "label2id": {
22
+ "clickbait": 1,
23
+ "non-clickbait": 0
24
+ },
25
+ "layer_norm_eps": 1e-05,
26
+ "max_position_embeddings": 258,
27
+ "model_type": "roberta",
28
+ "num_attention_heads": 12,
29
+ "num_hidden_layers": 12,
30
+ "pad_token_id": 1,
31
+ "position_embedding_type": "absolute",
32
+ "problem_type": "single_label_classification",
33
+ "tie_word_embeddings": true,
34
+ "tokenizer_class": "PhobertTokenizer",
35
+ "transformers_version": "5.3.0",
36
+ "type_vocab_size": 1,
37
+ "use_cache": false,
38
+ "vocab_size": 64001
39
+ }
outputs/phobert/checkpoint-430/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:34cca11b15dc3f374ffe79b2e5b4cd8c83cbaa6b057d3bb7c37bfdf68587aebf
3
+ size 540023360
outputs/phobert/checkpoint-430/optimizer.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:534b5c656e08f5f6bafa4b2120de3249635a60c06e4078640c3b5d3dfb9489f4
3
+ size 1080169867
outputs/phobert/checkpoint-430/rng_state.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:11162cfcf01751802d4434aeef088ec1ccdf8a78a8e835d1f629c1e9c30c21a5
3
+ size 14645
outputs/phobert/checkpoint-430/scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9341347b59b3d8df83e7aa83b437fb4cfcf19a21c71ca8794c2c24d522a2b2e1
3
+ size 1465
outputs/phobert/checkpoint-430/tokenizer_config.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "<s>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "1": {
12
+ "content": "<pad>",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "</s>",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "3": {
28
+ "content": "<unk>",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "64000": {
36
+ "content": "<mask>",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "backend": "custom",
45
+ "bos_token": "<s>",
46
+ "cls_token": "<s>",
47
+ "eos_token": "</s>",
48
+ "is_local": false,
49
+ "mask_token": "<mask>",
50
+ "model_max_length": 1000000000000000019884624838656,
51
+ "pad_token": "<pad>",
52
+ "sep_token": "</s>",
53
+ "tokenizer_class": "PhobertTokenizer",
54
+ "unk_token": "<unk>"
55
+ }
outputs/phobert/checkpoint-430/trainer_state.json ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_global_step": 172,
3
+ "best_metric": 0.7737798136155426,
4
+ "best_model_checkpoint": "outputs/phobert/checkpoint-172",
5
+ "epoch": 5.0,
6
+ "eval_steps": 500,
7
+ "global_step": 430,
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.5813953488372093,
14
+ "grad_norm": 1.1237151622772217,
15
+ "learning_rate": 5.764705882352941e-06,
16
+ "loss": 0.63992431640625,
17
+ "step": 50
18
+ },
19
+ {
20
+ "epoch": 1.0,
21
+ "eval_accuracy": 0.7653958944281525,
22
+ "eval_f1": 0.5604395604395604,
23
+ "eval_f1_macro": 0.7002197802197803,
24
+ "eval_loss": 0.4969119131565094,
25
+ "eval_precision": 0.6710526315789473,
26
+ "eval_recall": 0.4811320754716981,
27
+ "eval_runtime": 0.7063,
28
+ "eval_samples_per_second": 482.786,
29
+ "eval_steps_per_second": 8.495,
30
+ "step": 86
31
+ },
32
+ {
33
+ "epoch": 1.1627906976744187,
34
+ "grad_norm": 2.16060209274292,
35
+ "learning_rate": 1.1647058823529413e-05,
36
+ "loss": 0.5310058975219727,
37
+ "step": 100
38
+ },
39
+ {
40
+ "epoch": 1.744186046511628,
41
+ "grad_norm": 6.030200004577637,
42
+ "learning_rate": 1.7529411764705884e-05,
43
+ "loss": 0.40346920013427734,
44
+ "step": 150
45
+ },
46
+ {
47
+ "epoch": 2.0,
48
+ "eval_accuracy": 0.8152492668621701,
49
+ "eval_f1": 0.676923076923077,
50
+ "eval_f1_macro": 0.7737798136155426,
51
+ "eval_loss": 0.4306434690952301,
52
+ "eval_precision": 0.7415730337078652,
53
+ "eval_recall": 0.6226415094339622,
54
+ "eval_runtime": 0.7292,
55
+ "eval_samples_per_second": 467.638,
56
+ "eval_steps_per_second": 8.228,
57
+ "step": 172
58
+ },
59
+ {
60
+ "epoch": 2.3255813953488373,
61
+ "grad_norm": 3.6583268642425537,
62
+ "learning_rate": 1.9625806451612906e-05,
63
+ "loss": 0.3429216766357422,
64
+ "step": 200
65
+ },
66
+ {
67
+ "epoch": 2.9069767441860463,
68
+ "grad_norm": 7.060560703277588,
69
+ "learning_rate": 1.8980645161290322e-05,
70
+ "loss": 0.32417171478271484,
71
+ "step": 250
72
+ },
73
+ {
74
+ "epoch": 3.0,
75
+ "eval_accuracy": 0.7653958944281525,
76
+ "eval_f1": 0.6521739130434783,
77
+ "eval_f1_macro": 0.7375913813005002,
78
+ "eval_loss": 0.47250840067863464,
79
+ "eval_precision": 0.6048387096774194,
80
+ "eval_recall": 0.7075471698113207,
81
+ "eval_runtime": 0.6989,
82
+ "eval_samples_per_second": 487.889,
83
+ "eval_steps_per_second": 8.585,
84
+ "step": 258
85
+ },
86
+ {
87
+ "epoch": 3.488372093023256,
88
+ "grad_norm": 9.708263397216797,
89
+ "learning_rate": 1.8335483870967745e-05,
90
+ "loss": 0.2591263771057129,
91
+ "step": 300
92
+ },
93
+ {
94
+ "epoch": 4.0,
95
+ "eval_accuracy": 0.782991202346041,
96
+ "eval_f1": 0.6666666666666666,
97
+ "eval_f1_macro": 0.7528985507246377,
98
+ "eval_loss": 0.4961622953414917,
99
+ "eval_precision": 0.6379310344827587,
100
+ "eval_recall": 0.6981132075471698,
101
+ "eval_runtime": 0.7073,
102
+ "eval_samples_per_second": 482.092,
103
+ "eval_steps_per_second": 8.483,
104
+ "step": 344
105
+ },
106
+ {
107
+ "epoch": 4.069767441860465,
108
+ "grad_norm": 13.772784233093262,
109
+ "learning_rate": 1.7690322580645164e-05,
110
+ "loss": 0.23592529296875,
111
+ "step": 350
112
+ },
113
+ {
114
+ "epoch": 4.651162790697675,
115
+ "grad_norm": 16.915451049804688,
116
+ "learning_rate": 1.7045161290322583e-05,
117
+ "loss": 0.16306499481201173,
118
+ "step": 400
119
+ },
120
+ {
121
+ "epoch": 5.0,
122
+ "eval_accuracy": 0.8152492668621701,
123
+ "eval_f1": 0.6631016042780749,
124
+ "eval_f1_macro": 0.7679144385026737,
125
+ "eval_loss": 0.5961838960647583,
126
+ "eval_precision": 0.7654320987654321,
127
+ "eval_recall": 0.5849056603773585,
128
+ "eval_runtime": 0.7182,
129
+ "eval_samples_per_second": 474.8,
130
+ "eval_steps_per_second": 8.354,
131
+ "step": 430
132
+ }
133
+ ],
134
+ "logging_steps": 50,
135
+ "max_steps": 1720,
136
+ "num_input_tokens_seen": 0,
137
+ "num_train_epochs": 20,
138
+ "save_steps": 500,
139
+ "stateful_callbacks": {
140
+ "EarlyStoppingCallback": {
141
+ "args": {
142
+ "early_stopping_patience": 3,
143
+ "early_stopping_threshold": 0.0
144
+ },
145
+ "attributes": {
146
+ "early_stopping_patience_counter": 3
147
+ }
148
+ },
149
+ "TrainerControl": {
150
+ "args": {
151
+ "should_epoch_stop": false,
152
+ "should_evaluate": false,
153
+ "should_log": false,
154
+ "should_save": true,
155
+ "should_training_stop": true
156
+ },
157
+ "attributes": {}
158
+ }
159
+ },
160
+ "total_flos": 837763586373540.0,
161
+ "train_batch_size": 32,
162
+ "trial_name": null,
163
+ "trial_params": null
164
+ }
outputs/phobert/checkpoint-430/training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:70809fb8b9188752ded9f44f05b2f8cc4ed7fd0830a76061292d4dc9474eda4d
3
+ size 5201
outputs/phobert/checkpoint-430/vocab.txt ADDED
The diff for this file is too large to render. See raw diff