Senali D commited on
Commit
044f4e3
·
verified ·
1 Parent(s): 8d50dca

Final submission: code, predictions, training

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ 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/data/star3-thoughts.jsonl filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -1,3 +1,76 @@
1
  ---
 
 
2
  license: apache-2.0
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+ - si
4
  license: apache-2.0
5
+ base_model: google/gemma-4-E4B-it
6
+ tags:
7
+ - sinhala
8
+ - mmlu
9
+ - multiple-choice
10
+ - lora
11
+ - star
12
  ---
13
+
14
+ # Team SinhalaNuwana - Sinhala MMLU Shared Task System
15
+
16
+ Codabench macro score 63.5755 (Easy 64.3302, Medium 56.7057, Hard 69.6907).
17
+
18
+ ## System summary
19
+ - **Base model(s):** [google/gemma-4-E4B-it](https://huggingface.co/google/gemma-4-E4B-it), revision `ee0ef6023621cff504d758262d4e04895a5af4a2`, text decoder only
20
+ - **What we did:** LoRA fine-tuning with STaR (self-taught reasoner): the base model thought about 8,894 Sinhala training questions, and we trained a LoRA adapter on its 4,073 correct first-try thoughts. At inference the model thinks in Sinhala before it answers (thinking mode, greedy). Each question is answered with the choices in several orders, and the option probabilities are averaged. Easy and Hard questions also get a longer thought of up to 2,048 tokens, and Medium questions 4 more choice orders. One model, no retrieval.
21
+ - **Total inference parameters:** 7.50B (7,501,679,616: 7,463,013,376 base and 38,666,240 adapter)
22
+ - **Extra data used for training or retrieval:** Our own Sinhala multiple-choice questions, generated by Claude models from Sri Lankan school textbooks and teacher guides. They are in `training/data/` of this repository. No retrieval.
23
+
24
+ ## Models and resources in this submission
25
+ | Repo | What it is |
26
+ |---|---|
27
+ | [`SinhalaMMLU-SharedTask/team-sinhalanuwana`](https://huggingface.co/SinhalaMMLU-SharedTask/team-sinhalanuwana) | code, inference script, final predictions, training code and training data (this repo) |
28
+ | [`SinhalaMMLU-SharedTask/team-sinhalanuwana-gemma4-e4b-star3-lora`](https://huggingface.co/SinhalaMMLU-SharedTask/team-sinhalanuwana-gemma4-e4b-star3-lora) | LoRA adapter on gemma-4-E4B-it: weights, config, tokenizer files, training log |
29
+ | [`google/gemma-4-E4B-it`](https://huggingface.co/google/gemma-4-E4B-it) | public base model (Apache 2.0) |
30
+
31
+ ## How to run
32
+ ```bash
33
+ pip install -r requirements.txt
34
+ python inference.py
35
+ ```
36
+ - **GPU used:** Kaggle T4 x2 (16 GB each). One GPU with 24 GB or more also holds the model.
37
+ - **Approximate run time on the test set:** about 16 hours for the 2,238 questions on T4 x2 (six passes of 4.3, 4.2, 1.7, 1.9, 2.1 and 2.1 hours)
38
+ - **Anything else the organizers need to know:**
39
+ - Python 3.13. If `torchao` is installed (Kaggle has it), run `pip uninstall -y torchao` first, because `peft` imports it and rejects that version.
40
+ - `inference.py` calls `predict.py` and `merge_votes.py` from the same folder, so run it inside a clone of this repository.
41
+ - It writes `predictions.jsonl` in the current folder, which replaces our submitted copy in a clone. The submitted file stays in the repository history.
42
+ - Only `DATA_REPO` needs to change. No token is needed if the repositories are public.
43
+
44
+ ## Files
45
+ - `inference.py` - the exact system that produced our final Codabench submission
46
+ - `predict.py`, `merge_votes.py` - one answering pass and the vote over the passes, called by `inference.py`
47
+ - `predictions.jsonl` - the exact file we submitted to the final leaderboard
48
+ - `requirements.txt` - package versions we used
49
+ - `manifest.yaml`, `model_manifest.json` - models, adapter SHA-256, parameter count, closed-API use
50
+ - `training/` - training and data-preparation code, Kaggle notebooks, settings and training data (see `training/README.md`)
51
+
52
+ ## Team details
53
+
54
+ | Name | Affiliation | Role |
55
+ | --- | --- | --- |
56
+ | Senali Dilumika | UCSC | Corresponding member |
57
+
58
+ Team name on Codabench: SinhalaNuwana.
59
+
60
+ ## Verification
61
+
62
+ - Fresh Kaggle session (2 x T4, 28 October 2026), the same code, the same pinned versions and the same adapter, on the first 3 questions of each of the 41 test files (123 questions): 122 answers are the same as in `predictions.jsonl`. All Medium and Hard answers are the same. The one changed answer is an Easy question whose 5 votes split 2-2-1. Float16 GPU arithmetic is not fully deterministic, so a full rerun can change a few close votes.
63
+ - `merge_votes.py`, run on the six scored passes, rebuilds `predictions.jsonl` byte for byte.
64
+
65
+ ## Training (details in `training/README.md`)
66
+
67
+ `training/README.md` gives the full pipeline, the settings and the data. In short:
68
+
69
+ 1. Claude models generated Sinhala multiple-choice questions from Sri Lankan school textbooks, NIE teacher guides and resource books, A/L learning outcome notes and Wikibooks. A stronger Claude model checked the answer keys of 10,000 of them.
70
+ 2. `review_overlap.py` removed the 1,106 questions that resemble a dev or test question by wording or by meaning (LaBSE cosine 0.70 or more). 8,894 questions remained.
71
+ 3. `star.py` let the base model (no adapter) think about each question for up to 512 tokens. It kept the 4,073 thoughts that gave the correct answer on the first try.
72
+ 4. `train_lora.py` trained a new LoRA adapter on those thoughts: 2 epochs, AdamW, learning rate 1e-4 with a cosine schedule and 3% warmup, 16 examples per step, sequences of up to 1,024 tokens. It took 4.3 hours on 2 x T4.
73
+
74
+ ## Licence and citation
75
+
76
+ The code and the adapter are released under the Apache 2.0 licence, the licence of Gemma 4.
inference.py ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Sinhala MMLU Shared Task - Final inference script
3
+ Team: SinhalaNuwana
4
+
5
+ pip install -r requirements.txt
6
+ python inference.py
7
+
8
+ Downloads the questions from DATA_REPO, the base model and our LoRA adapter from Hugging Face,
9
+ runs predict.py six times and merge_votes.py once (both next to this file), and writes
10
+ predictions.jsonl and predictions.zip in the current folder. Greedy decoding, no sampling.
11
+ About 16 hours for the 2,238 test questions on 2 x T4.
12
+ """
13
+
14
+ # ======================= ORGANIZERS CHANGE ONLY THIS LINE =======================
15
+ DATA_REPO = "SinhalaMMLU-SharedTask/Sinhala-MMLU-SharedTask-Test-Dataset"
16
+ # ================================================================================
17
+
18
+ import argparse
19
+ import hashlib
20
+ import json
21
+ import os
22
+ import subprocess
23
+ import sys
24
+ from pathlib import Path
25
+
26
+ from huggingface_hub import snapshot_download
27
+
28
+ MODEL = "google/gemma-4-E4B-it"
29
+ REVISION = "ee0ef6023621cff504d758262d4e04895a5af4a2"
30
+ ADAPTER = "SinhalaMMLU-SharedTask/team-sinhalanuwana-gemma4-e4b-star3-lora"
31
+ ADAPTER_SHA256 = "b82696e2541e0133d24bf14721caa20485dd70ab8ef78a7e40c1d2a77db1ba71"
32
+ ROOT = Path(__file__).resolve().parent
33
+
34
+ PASSES = [
35
+ ("orders-02", ["--think", "512", "--rotations", "0", "2"]),
36
+ ("orders-13", ["--think", "512", "--rotations", "1", "3"]),
37
+ ("hard-2048", ["--level", "hard", "--think", "2048", "--score_batch_size", "8"]),
38
+ ("easy-2048", ["--level", "easy", "--think", "2048", "--score_batch_size", "8"]),
39
+ ("medium-rev02", ["--level", "medium", "--reverse", "--think", "512", "--rotations", "0", "2"]),
40
+ ("medium-rev13", ["--level", "medium", "--reverse", "--think", "512", "--rotations", "1", "3"]),
41
+ ]
42
+
43
+
44
+ def slice_questions(data_dir, out_dir, per_file):
45
+ for path in sorted(data_dir.rglob("*.json")):
46
+ if any(part.startswith(".") for part in path.relative_to(data_dir).parts):
47
+ continue
48
+ target = out_dir / path.relative_to(data_dir)
49
+ target.parent.mkdir(parents=True, exist_ok=True)
50
+ questions = json.loads(path.read_text(encoding="utf-8"))[:per_file]
51
+ target.write_text(json.dumps(questions, ensure_ascii=False), encoding="utf-8")
52
+ return out_dir
53
+
54
+
55
+ def main():
56
+ parser = argparse.ArgumentParser(
57
+ description="Answer the SinhalaMMLU questions with Gemma 4 E4B-it and the round 3 STaR LoRA adapter, "
58
+ "and write OUT_DIR/predictions.jsonl and OUT_DIR/predictions.zip"
59
+ )
60
+ parser.add_argument("--data_dir", type=Path, help=f"local folder of the per-subject .json files; {DATA_REPO} when not given")
61
+ parser.add_argument("--out_dir", type=Path, default=Path("."), help="where predictions.jsonl goes; each pass writes to OUT_DIR/runs/")
62
+ parser.add_argument("--adapter", help=f"local adapter folder; {ADAPTER} from the Hub when not given")
63
+ parser.add_argument("--per_file", type=int, help="answer only the first N questions of each file, for a quick check")
64
+ args = parser.parse_args()
65
+
66
+ snapshot_download(MODEL, revision=REVISION)
67
+ adapter = Path(args.adapter or snapshot_download(ADAPTER))
68
+ digest = hashlib.sha256((adapter / "adapter_model.safetensors").read_bytes()).hexdigest()
69
+ if digest != ADAPTER_SHA256:
70
+ raise SystemExit(f"error: {adapter}/adapter_model.safetensors is {digest}, expected {ADAPTER_SHA256}")
71
+
72
+ data_dir = args.data_dir or Path(snapshot_download(DATA_REPO, repo_type="dataset"))
73
+ runs = args.out_dir / "runs"
74
+ if args.per_file:
75
+ data_dir = slice_questions(data_dir, runs / "questions", args.per_file)
76
+
77
+ env = {**os.environ, "HF_HUB_OFFLINE": "1"}
78
+ long_env = {**env, "PYTORCH_CUDA_ALLOC_CONF": "expandable_segments:True"}
79
+ common = [
80
+ "--model", MODEL, "--revision", REVISION, "--dtype", "float16", "--batch_size", "32",
81
+ "--adapter", str(adapter), "--data_dir", str(data_dir),
82
+ ]
83
+ for name, options in PASSES:
84
+ print(f"== pass {name}", flush=True)
85
+ subprocess.run(
86
+ [sys.executable, str(ROOT / "predict.py"), *common, "--out_dir", str(runs / name), *options],
87
+ check=True,
88
+ env=long_env if "2048" in options else env,
89
+ )
90
+
91
+ run = {name: str(runs / name) for name, _ in PASSES}
92
+ subprocess.run(
93
+ [
94
+ sys.executable, str(ROOT / "merge_votes.py"), run["orders-02"], run["orders-13"],
95
+ "--override", run["hard-2048"], "--add", run["easy-2048"],
96
+ "--add", run["medium-rev02"], "--add", run["medium-rev13"], "--out_dir", str(args.out_dir),
97
+ ],
98
+ check=True,
99
+ env=env,
100
+ )
101
+
102
+
103
+ if __name__ == "__main__":
104
+ main()
manifest.yaml ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ system: SinhalaNuwana
2
+ team: SinhalaNuwana
3
+ models:
4
+ - id: google/gemma-4-E4B-it
5
+ revision: ee0ef6023621cff504d758262d4e04895a5af4a2
6
+ params: 7463013376
7
+ role: answer selection
8
+ - id: adapter/
9
+ sha256: b82696e2541e0133d24bf14721caa20485dd70ab8ef78a7e40c1d2a77db1ba71
10
+ params: 38666240
11
+ role: adapter on the answer-selection model
12
+ total_params: 7501679616
13
+ closed_api_used_for_data: true
14
+ closed_api_details: >-
15
+ Anthropic claude-haiku-5-5 generated the 18,398 training questions in data/train/mcq.jsonl from
16
+ Sri Lankan school textbooks, NIE teacher guides and resource books, A/L learning outcome notes
17
+ and Wikibooks. Anthropic claude-sonnet-5-5 (9,228) and claude-opus-5-5 (772) checked the answer
18
+ keys of 10,000 of them (data/train/verified-mcq.jsonl). review_overlap.py removed the 1,106 that
19
+ match a dev or test question by wording or by meaning (LaBSE cosine 0.70 or more). The model
20
+ without any adapter thinks about the other 8,894, and the adapter trains from the base model on
21
+ its 4,073 correct first-try thoughts (STaR round 3, star.py --no_hint_retry, 2 epochs). No closed
22
+ API is used at inference, and no dev or test question is used for training.
23
+ retrieval_or_internet_at_inference: false
24
+ decoding:
25
+ method: >-
26
+ zero-shot; Sinhala prompt in the chat template with thinking mode on; a greedy thought, then the
27
+ next-token logits after the closed thought and the answer cue "පිළිතුර:", softmax over the
28
+ option labels "1".."4". Every question is answered in all 4 choice orders (rotated by 0, 1, 2
29
+ and 3) with a thought of up to 512 tokens; the probability vectors are mapped back to the
30
+ original order and averaged. Hard questions (metadata difficulty "hard") are answered once more
31
+ in the given order with a thought of up to 2,048 tokens, and that answer replaces the 4-order
32
+ vote for them, because most hard thoughts do not finish within 512 tokens. Easy questions are
33
+ also answered once more in the given order with a thought of up to 2,048 tokens, which joins
34
+ their 4 orders as a fifth vote. Medium questions are also answered in the 4 reversed orders
35
+ (predict.py --reverse: the choices as 4, 3, 2, 1, rotated by 0, 1, 2 and 3) with a thought of up
36
+ to 512 tokens, so they get 8 orders. merge_votes.py combines the passes with equal weight per
37
+ thought; the highest average probability is the answer
38
+ reasoning_tokens: {easy: [512, 2048], medium: 512, hard: 2048}
39
+ choice_orders: {easy: [0, 1, 2, 3, "0 at 2048 tokens"], medium: [0, 1, 2, 3, r0, r1, r2, r3], hard: [0]}
40
+ sampling: none
41
+ batch_size: 32
42
+ score_batch_size: {easy: "32 (512 tokens), 8 (2048 tokens)", medium: 32, hard: 8}
43
+ batch_tokens: 36864
44
+ dtype: float16
45
+ device_map: auto
46
+ prompt: predict.py (user_prompt, render)
47
+ environment:
48
+ requirements: requirements.txt
49
+ python: "3.13"
50
+ gpu: >-
51
+ NVIDIA; verified on two Tesla T4 (16 GB each) on Kaggle; one GPU of 24 GB or more also holds
52
+ the model
53
+ dev_accuracy: null
54
+ test_accuracy_macro: 0.635755
merge_votes.py ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import argparse
2
+ import json
3
+ import zipfile
4
+ from pathlib import Path
5
+
6
+ LABELS = ["1", "2", "3", "4"]
7
+
8
+
9
+ def key(row):
10
+ return (row["subject"], row["level"], row["q_no"])
11
+
12
+
13
+ def main():
14
+ parser = argparse.ArgumentParser(
15
+ description="Average the answer probabilities of every thought in several predict.py runs on the same "
16
+ "questions, with equal weight per thought, and write one predictions.zip"
17
+ )
18
+ parser.add_argument("run_dirs", nargs="+", type=Path, help="predict.py output folders with thoughts.jsonl")
19
+ parser.add_argument("--out_dir", type=Path, required=True)
20
+ parser.add_argument(
21
+ "--override", type=Path, action="append", default=[],
22
+ help="a run on a subset of the questions whose thoughts replace the others for those questions; repeat it for more subsets",
23
+ )
24
+ parser.add_argument(
25
+ "--add", type=Path, action="append", default=[],
26
+ help="a run on a subset of the questions whose thoughts join the others for those questions, with the same weight per thought; repeat it for more subsets",
27
+ )
28
+ parser.add_argument(
29
+ "--tiebreak", type=Path,
30
+ help="a run, usually without a thought, whose average probabilities pick between the answers that got the same "
31
+ "most votes; questions without a tie or not in this run keep the highest average probability",
32
+ )
33
+ args = parser.parse_args()
34
+
35
+ probs = {}
36
+ for run_dir in args.run_dirs:
37
+ for line in (run_dir / "thoughts.jsonl").open(encoding="utf-8"):
38
+ row = json.loads(line)
39
+ probs.setdefault(key(row), []).append(row["probs"])
40
+
41
+ counts = {len(group) for group in probs.values()}
42
+ if len(counts) != 1:
43
+ raise SystemExit(f"error: questions have different numbers of thoughts: {sorted(counts)}")
44
+ print(f"Averaging {counts.pop()} thoughts for each of {len(probs)} questions")
45
+
46
+ for override in args.override:
47
+ replaced = {}
48
+ for line in (override / "thoughts.jsonl").open(encoding="utf-8"):
49
+ row = json.loads(line)
50
+ if key(row) not in probs:
51
+ raise SystemExit(f"error: {key(row)} from {override} is not in the merged runs")
52
+ replaced.setdefault(key(row), []).append(row["probs"])
53
+ probs.update(replaced)
54
+ print(f"Replaced the thoughts of {len(replaced)} questions with those of {override}")
55
+
56
+ for extra in args.add:
57
+ added = set()
58
+ for line in (extra / "thoughts.jsonl").open(encoding="utf-8"):
59
+ row = json.loads(line)
60
+ if key(row) not in probs:
61
+ raise SystemExit(f"error: {key(row)} from {extra} is not in the merged runs")
62
+ probs[key(row)].append(row["probs"])
63
+ added.add(key(row))
64
+ print(f"Added the thoughts of {extra} to {len(added)} questions")
65
+
66
+ tiebreak = {}
67
+ if args.tiebreak:
68
+ for line in (args.tiebreak / "thoughts.jsonl").open(encoding="utf-8"):
69
+ row = json.loads(line)
70
+ if key(row) not in probs:
71
+ raise SystemExit(f"error: {key(row)} from {args.tiebreak} is not in the merged runs")
72
+ tiebreak.setdefault(key(row), []).append(row["probs"])
73
+
74
+ first = [json.loads(line) for line in (args.run_dirs[0] / "predictions.jsonl").open(encoding="utf-8")]
75
+ if len(first) != len(probs):
76
+ raise SystemExit(f"error: {len(first)} predictions but {len(probs)} questions with thoughts")
77
+ predictions = []
78
+ broken = 0
79
+ for row in first:
80
+ group = probs[key(row)]
81
+ mean = [sum(p) / len(group) for p in zip(*group)]
82
+ pick = max(range(len(mean)), key=mean.__getitem__)
83
+ votes = [max(range(len(p)), key=p.__getitem__) for p in group]
84
+ top = max(votes.count(c) for c in set(votes))
85
+ tied = [c for c in sorted(set(votes)) if votes.count(c) == top]
86
+ if len(tied) > 1 and key(row) in tiebreak:
87
+ extra = tiebreak[key(row)]
88
+ judge = [sum(p) / len(extra) for p in zip(*extra)]
89
+ pick = max(tied, key=judge.__getitem__)
90
+ broken += 1
91
+ predictions.append({**row, "answer": LABELS[pick]})
92
+ if args.tiebreak:
93
+ print(f"Broke {broken} tied votes with {args.tiebreak}")
94
+
95
+ args.out_dir.mkdir(parents=True, exist_ok=True)
96
+ jsonl_path = args.out_dir / "predictions.jsonl"
97
+ jsonl_path.write_text("".join(json.dumps(r, ensure_ascii=False) + "\n" for r in predictions), encoding="utf-8")
98
+ with zipfile.ZipFile(args.out_dir / "predictions.zip", "w", zipfile.ZIP_DEFLATED) as zf:
99
+ zf.write(jsonl_path, "predictions.jsonl")
100
+ for run_dir in args.run_dirs:
101
+ before = {key(r): r["answer"] for r in map(json.loads, (run_dir / "predictions.jsonl").open(encoding="utf-8"))}
102
+ changed = sum(before[key(r)] != r["answer"] for r in predictions)
103
+ print(f"{changed} answers differ from {run_dir}")
104
+ print(f"Wrote {len(predictions)} predictions to {args.out_dir / 'predictions.zip'}")
105
+
106
+
107
+ if __name__ == "__main__":
108
+ main()
model_manifest.json ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "system": "Gemma 4 E4B instruction-tuned model (text-only) in thinking mode with a LoRA adapter trained by STaR on its own thoughts; each question is answered in all 4 choice orders with a thought of up to 512 tokens, easy questions once more with a thought of up to 2,048 tokens as a fifth vote, medium questions also in the 4 reversed choice orders, hard questions once more with a thought of up to 2,048 tokens that replaces their vote, and the answer is the highest average probability among the option numbers after the thought",
3
+ "components": [
4
+ {
5
+ "role": "generator",
6
+ "model": "google/gemma-4-E4B-it",
7
+ "url": "https://huggingface.co/google/gemma-4-E4B-it",
8
+ "license": "Apache-2.0",
9
+ "released": "2026-03-02",
10
+ "loaded_parts": "language model only (vision and audio encoders are not loaded)",
11
+ "variant": "instruction-tuned (-it), thinking mode on with a greedy thought of up to 512 tokens on every question in 4 choice orders (predict.py --rotations 0 2 and --rotations 1 3) and on medium questions in the 4 reversed orders (predict.py --level medium --reverse), and of up to 2,048 tokens on easy and hard questions in the given order (predict.py --level easy|hard --think 2048)",
12
+ "parameters_loaded": 7463013376,
13
+ "parameters_full_checkpoint": 7996156490,
14
+ "precision": "float16 (run.sh sets it on every GPU; predict.py alone picks bfloat16 on GPUs with compute capability 8 or more)",
15
+ "fine_tuned": false
16
+ },
17
+ {
18
+ "role": "adapter",
19
+ "model": "LoRA adapter made by train_lora.py",
20
+ "method": "LoRA r=16, alpha 32, dropout 0.05 on every linear layer of the 42 decoder layers (342 modules), merged into the base weights at load",
21
+ "training": "STaR round 3: the model without any adapter thinks about each of 8,894 verified training questions; star.py --no_hint_retry keeps the thoughts that finish within 512 tokens and give the verified answer on the first try (4,073); a new adapter is trained from the base model on them, 2 epochs. Nothing from the round 1 or round 2 adapters is used",
22
+ "parameters": 38666240,
23
+ "optional": true
24
+ }
25
+ ],
26
+ "total_inference_parameters": {
27
+ "without_adapter": 7463013376,
28
+ "with_adapter": 7501679616
29
+ },
30
+ "parameter_limit": 8000000000,
31
+ "retrieval": "none",
32
+ "internet_at_inference": false,
33
+ "training_data": "data/train/verified-mcq.jsonl: 10,000 of the 18,398 Sinhala multiple-choice questions in data/train/mcq.jsonl (generated from Sri Lankan school textbooks, NIE teacher guides and resource books, A/L learning outcome notes and Wikibooks), with answer keys checked by a stronger model. review_overlap.py removes the 1,106 that match a dev or test question by wording or meaning, and the adapter trains only on the first-try thoughts of the model without an adapter that star.py keeps for the other 8,894. The dev and test sets are not used for training.",
34
+ "closed_api_usage": "Anthropic claude-haiku-5-5 generated the training questions in data/train/mcq.jsonl, and claude-sonnet-5-5 and claude-opus-5-5 checked the answer keys in data/train/verified-mcq.jsonl. They are used for training data only. No closed API is used at inference."
35
+ }
predict.py ADDED
@@ -0,0 +1,335 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import argparse
2
+ import json
3
+ import zipfile
4
+ from pathlib import Path
5
+
6
+ import torch
7
+ from tqdm import tqdm
8
+ from transformers import AutoTokenizer, Gemma4ForCausalLM
9
+
10
+ MAX_PARAMS = 8_000_000_000
11
+ MAX_BATCH_TOKENS = 36864
12
+ LABELS = ["1", "2", "3", "4"]
13
+ ANSWER_CUE = "පිළිතුර:"
14
+ THOUGHT_OPEN = "<|channel>thought\n"
15
+ THOUGHT_CLOSE = "\n<channel|>"
16
+ STOP_TOKENS = ["<channel|>", "<eos>", "<turn|>"]
17
+
18
+
19
+ def normalise(question):
20
+ metadata = question.get("metadata", {})
21
+ question = {
22
+ **question,
23
+ "subject_original": metadata.get("subject_original", question.get("subject_original")),
24
+ "level": metadata.get("difficulty", question.get("level")),
25
+ }
26
+ answer = question.get("answer")
27
+ if answer is not None and not (isinstance(answer, int) and 1 <= answer <= len(question["choices"])):
28
+ texts = [choice.strip() for choice in question["choices"]]
29
+ question["answer"] = texts.index(str(answer).strip()) + 1
30
+ return question
31
+
32
+
33
+ def load_questions(data_dir):
34
+ questions = []
35
+ for path in sorted(Path(data_dir).rglob("*.json")):
36
+ if any(part.startswith(".") for part in path.relative_to(data_dir).parts):
37
+ continue
38
+ questions.extend(normalise(q) for q in json.loads(path.read_text(encoding="utf-8")))
39
+ return questions
40
+
41
+
42
+ def user_prompt(question):
43
+ lines = [
44
+ "පහත බහුවරණ ප්‍රශ්නයට නිවැරදි පිළිතුරේ අංකය පමණක් ලියන්න.",
45
+ "",
46
+ f"විෂයය: {question['subject_original']}",
47
+ f"ප්‍රශ්නය: {question['question'].strip()}",
48
+ *(f"{i}. {choice}" for i, choice in enumerate(question["choices"], 1)),
49
+ ANSWER_CUE,
50
+ ]
51
+ return "\n".join(lines)
52
+
53
+
54
+ def render(tokenizer, prompt, think):
55
+ if tokenizer.chat_template is None:
56
+ return tokenizer.bos_token + prompt + " "
57
+ messages = [{"role": "user", "content": prompt}]
58
+ if think:
59
+ text = tokenizer.apply_chat_template(
60
+ messages, tokenize=False, add_generation_prompt=True, enable_thinking=True
61
+ )
62
+ return text + THOUGHT_OPEN
63
+ return tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
64
+
65
+
66
+ def thinking_text(tokenizer, prompt, thought):
67
+ return render(tokenizer, prompt, True) + thought + THOUGHT_CLOSE + ANSWER_CUE
68
+
69
+
70
+ DTYPES = {"float16": torch.float16, "bfloat16": torch.bfloat16, "float32": torch.float32}
71
+
72
+
73
+ def placement(dtype_name="auto"):
74
+ if not torch.cuda.is_available():
75
+ return torch.float32, "cpu"
76
+ if dtype_name != "auto":
77
+ return DTYPES[dtype_name], "auto"
78
+ return (torch.float16 if torch.cuda.get_device_capability()[0] < 8 else torch.bfloat16), "auto"
79
+
80
+
81
+ def load_model(name, adapter=None, revision=None, dtype_name="auto"):
82
+ tokenizer = AutoTokenizer.from_pretrained(name, revision=revision, padding_side="left")
83
+ dtype, device_map = placement(dtype_name)
84
+ model, info = Gemma4ForCausalLM.from_pretrained(
85
+ name,
86
+ revision=revision,
87
+ dtype=dtype,
88
+ device_map=device_map,
89
+ key_mapping={r"^model\.language_model\.": "model."},
90
+ output_loading_info=True,
91
+ )
92
+ assert not info["missing_keys"], f"weights missing from checkpoint: {sorted(info['missing_keys'])[:5]}"
93
+ n_adapter = 0
94
+ if adapter is not None:
95
+ from peft import PeftModel
96
+
97
+ model = PeftModel.from_pretrained(model, adapter)
98
+ n_adapter = sum(p.numel() for name, p in model.named_parameters() if "lora_" in name)
99
+ assert n_adapter > 0, f"adapter {adapter} has no LoRA parameters"
100
+ model = model.merge_and_unload()
101
+ model.eval()
102
+ n_params = sum(p.numel() for p in model.parameters()) + n_adapter
103
+ print(
104
+ f"Loaded {name} (text-only) on {model.device} in {model.dtype}: {n_params:,} parameters"
105
+ f" ({n_adapter:,} adapter, merged)"
106
+ )
107
+ assert n_params <= MAX_PARAMS, f"{n_params:,} parameters exceeds the 8B limit"
108
+ return tokenizer, model
109
+
110
+
111
+ def label_ids(tokenizer):
112
+ ids = [tokenizer.encode(label, add_special_tokens=False) for label in LABELS]
113
+ assert all(len(i) == 1 for i in ids), f"answer labels are not single tokens: {ids}"
114
+ return [i[0] for i in ids]
115
+
116
+
117
+ def batches(lengths, budget, batch_size):
118
+ batch = []
119
+ for i in sorted(range(len(lengths)), key=lambda i: -lengths[i]):
120
+ if batch and (
121
+ len(batch) == batch_size or (len(batch) + 1) * (lengths[batch[0]] + budget) > MAX_BATCH_TOKENS
122
+ ):
123
+ yield batch
124
+ batch = []
125
+ batch.append(i)
126
+ if batch:
127
+ yield batch
128
+
129
+
130
+ def encode(tokenizer, texts, device):
131
+ return tokenizer(texts, return_tensors="pt", padding=True, add_special_tokens=False).to(device)
132
+
133
+
134
+ def score(model, tokenizer, texts, n_choices, batch_size):
135
+ labels = label_ids(tokenizer)
136
+ lengths = [len(tokenizer.encode(t, add_special_tokens=False)) for t in texts]
137
+ probs = [None] * len(texts)
138
+ for batch in tqdm(list(batches(lengths, 0, batch_size)), desc="score"):
139
+ inputs = encode(tokenizer, [texts[i] for i in batch], model.device)
140
+ position_ids = (inputs["attention_mask"].cumsum(-1) - 1).clamp(min=0)
141
+ with torch.inference_mode():
142
+ logits = model(**inputs, position_ids=position_ids, logits_to_keep=1).logits[:, -1, labels].float()
143
+ if not torch.isfinite(logits).all():
144
+ raise RuntimeError("non-finite answer logits")
145
+ counts = torch.tensor([n_choices[i] for i in batch], device=logits.device)
146
+ valid = torch.arange(len(labels), device=logits.device)[None, :] < counts[:, None]
147
+ for i, row in zip(batch, logits.masked_fill(~valid, float("-inf")).softmax(-1).tolist()):
148
+ probs[i] = row[: n_choices[i]]
149
+ return probs
150
+
151
+
152
+ def think(model, tokenizer, contexts, budget, batch_size):
153
+ stops = tokenizer.convert_tokens_to_ids(STOP_TOKENS)
154
+ lengths = [len(tokenizer.encode(t, add_special_tokens=False)) for t in contexts]
155
+ thoughts = [None] * len(contexts)
156
+ for batch in tqdm(list(batches(lengths, budget, batch_size)), desc="think"):
157
+ inputs = encode(tokenizer, [contexts[i] for i in batch], model.device)
158
+ with torch.inference_mode():
159
+ out = model.generate(
160
+ **inputs,
161
+ max_new_tokens=budget,
162
+ do_sample=False,
163
+ eos_token_id=stops,
164
+ pad_token_id=tokenizer.pad_token_id,
165
+ )
166
+ for i, row in zip(batch, out[:, inputs["input_ids"].shape[1]:].tolist()):
167
+ end = next((k for k, token in enumerate(row) if token in stops), len(row))
168
+ thoughts[i] = {
169
+ "thought": tokenizer.decode(row[:end], skip_special_tokens=True).strip(),
170
+ "finished": end < len(row) and row[end] == stops[0],
171
+ "thought_tokens": end,
172
+ }
173
+ return thoughts
174
+
175
+
176
+ def argmax(values):
177
+ return max(range(len(values)), key=values.__getitem__)
178
+
179
+
180
+ def answer(model, tokenizer, prompts, n_choices, budget, batch_size, score_batch_size=None):
181
+ if budget == 0:
182
+ texts = [render(tokenizer, p, False) for p in prompts]
183
+ thoughts = [{} for _ in prompts]
184
+ else:
185
+ contexts = [render(tokenizer, p, True) for p in prompts]
186
+ thoughts = think(model, tokenizer, contexts, budget, batch_size)
187
+ texts = [thinking_text(tokenizer, p, t["thought"]) for p, t in zip(prompts, thoughts)]
188
+ probs = score(model, tokenizer, texts, n_choices, score_batch_size or batch_size)
189
+ return [{**t, "probs": p, "pred": argmax(p) + 1} for t, p in zip(thoughts, probs)]
190
+
191
+
192
+ def order(n, rotation, reverse):
193
+ positions = list(range(n))[::-1] if reverse else list(range(n))
194
+ k = rotation % n
195
+ return positions[k:] + positions[:k]
196
+
197
+
198
+ def rotate(question, rotation, reverse=False):
199
+ return {**question, "choices": [question["choices"][i] for i in order(len(question["choices"]), rotation, reverse)]}
200
+
201
+
202
+ def unrotate(probs, rotation, reverse=False):
203
+ original = [0.0] * len(probs)
204
+ for i, p in zip(order(len(probs), rotation, reverse), probs):
205
+ original[i] = p
206
+ return original
207
+
208
+
209
+ def vote(model, tokenizer, questions, rotations, budget, batch_size, score_batch_size=None, reverse=False):
210
+ prompts = [user_prompt(rotate(q, r, reverse)) for q in questions for r in rotations]
211
+ n_choices = [len(q["choices"]) for q in questions for _ in rotations]
212
+ runs = answer(model, tokenizer, prompts, n_choices, budget, batch_size, score_batch_size)
213
+ results = []
214
+ for start in range(0, len(runs), len(rotations)):
215
+ group = [
216
+ {**run, "rotation": r, "reverse": reverse, "probs": unrotate(run["probs"], r, reverse)}
217
+ for run, r in zip(runs[start : start + len(rotations)], rotations)
218
+ ]
219
+ group = [{**run, "pred": argmax(run["probs"]) + 1} for run in group]
220
+ probs = [sum(p) / len(group) for p in zip(*(run["probs"] for run in group))]
221
+ results.append({"pred": argmax(probs) + 1, "probs": probs, "runs": group})
222
+ return results
223
+
224
+
225
+ def metrics(questions, results):
226
+ levels = {}
227
+ for question, result in zip(questions, results):
228
+ counts = levels.setdefault(question["level"], [0, 0])
229
+ counts[0] += result["pred"] == question["answer"]
230
+ counts[1] += 1
231
+ correct = sum(c for c, _ in levels.values())
232
+ return {
233
+ "accuracy": correct / len(questions),
234
+ "correct": correct,
235
+ "total": len(questions),
236
+ "levels": {k: {"accuracy": c / t, "correct": c, "total": t} for k, (c, t) in sorted(levels.items())},
237
+ }
238
+
239
+
240
+ def write_jsonl(path, rows):
241
+ path.write_text("".join(json.dumps(r, ensure_ascii=False) + "\n" for r in rows), encoding="utf-8")
242
+
243
+
244
+ def main():
245
+ parser = argparse.ArgumentParser()
246
+ parser.add_argument("--model", default="google/gemma-4-E4B-it")
247
+ parser.add_argument("--revision", help="model commit to load; the latest one when not given")
248
+ parser.add_argument("--dtype", choices=["auto", *DTYPES], default="auto")
249
+ parser.add_argument("--data_dir", default="data/test")
250
+ parser.add_argument("--out_dir", default="outputs")
251
+ parser.add_argument("--think", type=int, default=512)
252
+ parser.add_argument("--adapter")
253
+ parser.add_argument("--limit", type=int)
254
+ parser.add_argument("--level", help="answer only the questions of this level, for example hard")
255
+ parser.add_argument("--batch_size", type=int, default=32)
256
+ parser.add_argument(
257
+ "--score_batch_size", type=int,
258
+ help="batch size for scoring the answer after the thought; --batch_size when not given, lower it for long thoughts",
259
+ )
260
+ parser.add_argument(
261
+ "--rotations", type=int, nargs="+", default=[0],
262
+ help="answer once per rotation of the choices and average the answer probabilities; 0 2 votes over two orders",
263
+ )
264
+ parser.add_argument(
265
+ "--reverse", action="store_true",
266
+ help="reverse the choices before rotating them, which gives 4 more orders of 4 choices",
267
+ )
268
+ args = parser.parse_args()
269
+
270
+ questions = load_questions(args.data_dir)
271
+ if args.level:
272
+ questions = [q for q in questions if q["level"] == args.level]
273
+ questions = questions[: args.limit]
274
+ print(f"Loaded {len(questions)} questions from {args.data_dir}")
275
+ out_dir = Path(args.out_dir)
276
+ if not questions:
277
+ out_dir.mkdir(parents=True, exist_ok=True)
278
+ write_jsonl(out_dir / "predictions.jsonl", [])
279
+ write_jsonl(out_dir / "thoughts.jsonl", [])
280
+ return
281
+
282
+ tokenizer, model = load_model(args.model, args.adapter, args.revision, args.dtype)
283
+ if args.think and tokenizer.chat_template is None:
284
+ parser.error(f"{args.model} has no chat template, so it has no thinking mode; pass --think 0")
285
+
286
+ results = vote(
287
+ model, tokenizer, questions, args.rotations, args.think, args.batch_size, args.score_batch_size, args.reverse
288
+ )
289
+ predictions = [
290
+ {
291
+ "q_no": question["q_no"],
292
+ "subject": question["subject"],
293
+ "category": question["category"],
294
+ "level": question["level"],
295
+ "answer": LABELS[result["pred"] - 1],
296
+ }
297
+ for question, result in zip(questions, results)
298
+ ]
299
+
300
+ out_dir.mkdir(parents=True, exist_ok=True)
301
+ jsonl_path = out_dir / "predictions.jsonl"
302
+ write_jsonl(jsonl_path, predictions)
303
+ with zipfile.ZipFile(out_dir / "predictions.zip", "w", zipfile.ZIP_DEFLATED) as zf:
304
+ zf.write(jsonl_path, "predictions.jsonl")
305
+ print(f"Wrote {len(predictions)} predictions to {out_dir / 'predictions.zip'}")
306
+
307
+ runs = [(p, run) for p, r in zip(predictions, results) for run in r["runs"]]
308
+ thoughts = [
309
+ {"q_no": p["q_no"], "subject": p["subject"], "level": p["level"]}
310
+ | {k: run[k] for k in ("rotation", "reverse", "pred", "probs", "finished", "thought_tokens", "thought") if k in run}
311
+ for p, run in runs
312
+ ]
313
+ write_jsonl(out_dir / "thoughts.jsonl", thoughts)
314
+ if args.think:
315
+ finished = sum(run["finished"] for _, run in runs)
316
+ print(f"Thoughts finished within {args.think} tokens: {finished}/{len(runs)}")
317
+
318
+ if questions and all(q.get("answer") is not None for q in questions):
319
+ report = metrics(questions, results) | {"think": args.think, "adapter": args.adapter}
320
+ if len(args.rotations) > 1:
321
+ report["rotations"] = {
322
+ str(r): metrics(questions, [res["runs"][i] for res in results])["accuracy"]
323
+ for i, r in enumerate(args.rotations)
324
+ }
325
+ if args.think:
326
+ report["finished"] = finished
327
+ (out_dir / "metrics.json").write_text(json.dumps(report, ensure_ascii=False, indent=1) + "\n", encoding="utf-8")
328
+ levels = ", ".join(f"{k} {v['accuracy']:.4f}" for k, v in report["levels"].items())
329
+ print(f"Accuracy {report['accuracy']:.4f} ({report['correct']}/{report['total']}); {levels}")
330
+ if "rotations" in report:
331
+ print("Accuracy of each rotation alone:", report["rotations"])
332
+
333
+
334
+ if __name__ == "__main__":
335
+ main()
predictions.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
requirements.txt ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ --extra-index-url https://download.pytorch.org/whl/cu128
2
+ torch==2.11.0+cu128
3
+ transformers==5.20.1
4
+ accelerate==1.15.0
5
+ huggingface_hub==2.2.0
6
+ tokenizers==0.23.3
7
+ safetensors==0.8.0
8
+ peft==0.21.2
9
+ tqdm==4.67.3
training/README.md ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Training: STaR round 3 LoRA adapter
2
+
3
+ This folder holds the code, settings and data that made the adapter in [SinhalaMMLU-SharedTask/team-sinhalanuwana-gemma4-e4b-star3-lora](https://huggingface.co/SinhalaMMLU-SharedTask/team-sinhalanuwana-gemma4-e4b-star3-lora). The adapter trains from the base model `google/gemma-4-E4B-it` (revision `ee0ef6023621cff504d758262d4e04895a5af4a2`). It uses no earlier adapter.
4
+
5
+ ## Files
6
+
7
+ | File | Purpose |
8
+ | --- | --- |
9
+ | `review_overlap.py` | Compares each training question with every dev and test question, by wording (character 6-gram Jaccard and containment, same choices) and by meaning (LaBSE cosine). Lists the matches for removal. |
10
+ | `prepare_star_data.py` | Removes the listed questions and splits the rest into 2 shards with seed 0 |
11
+ | `star.py` | Lets the model think about each training question and keeps the thoughts that finish and give the correct answer |
12
+ | `train_lora.py` | Trains the LoRA adapter on the kept thoughts |
13
+ | `kaggle/star3-gen-0`, `kaggle/star3-gen-1` | The Kaggle notebooks that ran `star.py` on the two shards (2 x T4 each, about 4.2 hours each) |
14
+ | `kaggle/star3-train` | The Kaggle notebook that joined their kept thoughts and ran `train_lora.py` (2 x T4, 4.3 hours) |
15
+ | `train_log.json` | Settings, parameter counts and the loss of every step of the training run |
16
+ | `data/shard-0.jsonl`, `data/shard-1.jsonl` | The 8,894 training questions (4,447 each), the input of `star.py` |
17
+ | `data/excluded_ids.txt` | The ids of the 1,106 questions that `review_overlap.py` removed |
18
+ | `data/overlap-summary.json` | The counts of the overlap review, by rule |
19
+ | `data/star3-thoughts.jsonl` | The 4,073 training examples: prompt, thought and answer. This is the exact file the adapter trained on. |
20
+
21
+ ## Training data
22
+
23
+ Anthropic claude-haiku-5-5 generated Sinhala multiple-choice questions from Sri Lankan school textbooks, NIE teacher guides and resource books, A/L learning outcome notes and Wikibooks. Anthropic claude-sonnet-5-5 (9,228 questions) and claude-opus-5-5 (772 questions) checked the answer keys of 10,000 of them. The shared task allows closed models for training data.
24
+
25
+ Each question in `data/shard-*.jsonl` has its `id`, `subject`, `level`, `grade`, `source`, `question`, the 4 `choices`, the checked `answer` (1 to 4) and an `explanation`.
26
+
27
+ We removed the questions that resemble an organiser question before any training. `review_overlap.py` compared the 10,000 questions with the 1,851 dev and 2,238 test questions, and with an earlier copy of the test set (2,146 questions), and removed 1,106 by these rules. A question can match more than one rule, so the counts add up to more than 1,106:
28
+
29
+ | Rule | Removed |
30
+ | --- | --- |
31
+ | Same question text | 0 |
32
+ | Question Jaccard of 0.5 or more | 17 |
33
+ | Question containment of 0.8 or more | 48 |
34
+ | 3 or more same choices and containment of 0.3 or more | 11 |
35
+ | All 4 choices the same | 43 |
36
+ | LaBSE cosine of 0.70 or more | 1,033 |
37
+
38
+ The removed questions are not in this repository. The dev and test questions were not used for training in any form.
39
+
40
+ ## Steps
41
+
42
+ Run the commands from the root of this repository. The training scripts import `predict.py` from the root, so set `PYTHONPATH=.`.
43
+
44
+ 1. Remove the questions that resemble a dev or test question, and make the shards. These steps need the full 10,000-question file and the organiser dev and test sets, which are not in this repository. Their output is in `data/`.
45
+
46
+ ```bash
47
+ PYTHONPATH=. python training/review_overlap.py --questions verified-mcq.jsonl \
48
+ --eval dev=DEV_DIR test=TEST_DIR --out_dir overlap
49
+ PYTHONPATH=. python training/prepare_star_data.py --questions verified-mcq.jsonl \
50
+ --exclude overlap/excluded_ids.txt --out_dir training/data --shards 2 --seed 0
51
+ ```
52
+
53
+ 2. Let the base model think about each question, with no adapter and no hinted retry. One run for each shard, a thought of up to 512 tokens, greedy, batches of 32:
54
+
55
+ ```bash
56
+ PYTHONPATH=. python training/star.py --train training/data/shard-0.jsonl --no_hint_retry \
57
+ --revision ee0ef6023621cff504d758262d4e04895a5af4a2 --out_dir star-0
58
+ PYTHONPATH=. python training/star.py --train training/data/shard-1.jsonl --no_hint_retry \
59
+ --revision ee0ef6023621cff504d758262d4e04895a5af4a2 --out_dir star-1
60
+ ```
61
+
62
+ `star.py` keeps a thought only if it ends within 512 tokens and the answer after it is the checked answer. It kept 4,073 of the 8,894.
63
+
64
+ 3. Join the kept thoughts of the two runs:
65
+
66
+ ```bash
67
+ cat star-0/star.jsonl star-1/star.jsonl > star3.jsonl
68
+ ```
69
+
70
+ The result is byte for byte `data/star3-thoughts.jsonl`. `train_lora.py` shuffles the examples with seed 0.
71
+
72
+ 4. Train the adapter:
73
+
74
+ ```bash
75
+ PYTHONPATH=. python training/train_lora.py --data star3.jsonl \
76
+ --revision ee0ef6023621cff504d758262d4e04895a5af4a2 --out_dir adapter
77
+ ```
78
+
79
+ To train on the published examples directly, pass `--data training/data/star3-thoughts.jsonl`.
80
+
81
+ ## Settings
82
+
83
+ | Setting | Value |
84
+ | --- | --- |
85
+ | LoRA | Rank 16, alpha 32, dropout 0.05, on all 342 linear layers of the 42 decoder layers (`q_proj`, `k_proj`, `v_proj`, `o_proj`, `gate_proj`, `up_proj`, `down_proj`, `per_layer_input_gate`, `per_layer_projection`) |
86
+ | Trainable parameters | 38,666,240 |
87
+ | Loss | Cross-entropy on the thought, the answer cue and the answer number, not on the prompt |
88
+ | Optimiser | AdamW, learning rate 1e-4, cosine schedule with 3% warmup |
89
+ | Batch | 4 examples, 4 accumulation steps, so 16 examples per step |
90
+ | Epochs | 2 (510 steps) |
91
+ | Maximum length | 1,024 tokens (no example was dropped) |
92
+ | Precision | float16 with gradient scaling (T4 GPUs have no bfloat16) |
93
+ | Seed | 0 |
94
+ | Hardware and time | 2 x Tesla T4 on Kaggle, 15,552 seconds (4.3 hours) |
95
+
96
+ The Kaggle notebooks used the same scripts from a snapshot of our code with all scripts in one folder, and the shards from a private Kaggle dataset. Their `run.py` installs `requirements.txt`, removes `torchao`, downloads the model and runs the command above.
training/data/excluded_ids.txt ADDED
@@ -0,0 +1,1106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ mcq_915451748_058_4
2
+ mcq_915451748_007_0
3
+ mcq_902667986_007_2
4
+ mcq_915451748_051_0
5
+ mcq_902667986_006_0
6
+ mcq_902667986_009_2
7
+ mcq_915451748_007_4
8
+ mcq_915451748_052_1
9
+ mcq_915451748_044_3
10
+ mcq_902667986_014_4
11
+ mcq_902667986_028_1
12
+ mcq_915451748_057_1
13
+ mcq_902667986_025_1
14
+ mcq_915451748_031_4
15
+ mcq_915451748_053_0
16
+ mcq_915451748_053_1
17
+ mcq_902667986_024_1
18
+ mcq_902667986_008_4
19
+ mcq_915451748_026_2
20
+ mcq_902667986_013_0
21
+ mcq_902667986_012_3
22
+ mcq_915451748_050_0
23
+ mcq_902667986_007_1
24
+ mcq_902667986_013_1
25
+ mcq_915451748_017_2
26
+ mcq_902667986_028_4
27
+ mcq_902667986_016_4
28
+ mcq_902667986_014_2
29
+ mcq_902667986_027_2
30
+ mcq_915451748_050_1
31
+ mcq_902667986_016_0
32
+ mcq_23255_002_4
33
+ mcq_23243_000_0
34
+ mcq_22040_001_0
35
+ mcq_22026_003_0
36
+ mcq_23241_000_0
37
+ mcq_22056_001_0
38
+ mcq_19860_000_0
39
+ mcq_23267_000_2
40
+ mcq_22063_000_0
41
+ mcq_23237_001_0
42
+ mcq_23254_003_0
43
+ mcq_23237_001_4
44
+ mcq_22053_001_0
45
+ mcq_23237_003_4
46
+ mcq_23239_000_0
47
+ mcq_22047_003_2
48
+ mcq_22049_000_2
49
+ mcq_23248_001_2
50
+ mcq_23241_000_3
51
+ mcq_23245_001_2
52
+ mcq_22034_002_2
53
+ mcq_22066_000_2
54
+ mcq_19838_004_0
55
+ mcq_19832_001_3
56
+ mcq_23240_002_1
57
+ mcq_23270_000_1
58
+ mcq_22037_000_3
59
+ mcq_23045_000_2
60
+ mcq_23032_000_0
61
+ mcq_20578_001_0
62
+ mcq_20591_000_0
63
+ mcq_20576_001_2
64
+ mcq_20580_001_0
65
+ mcq_23034_001_2
66
+ mcq_23052_000_0
67
+ mcq_23042_000_0
68
+ mcq_23420_000_0
69
+ mcq_23047_001_2
70
+ mcq_23432_001_2
71
+ mcq_20579_000_0
72
+ mcq_23044_000_0
73
+ mcq_20601_000_2
74
+ mcq_23062_000_2
75
+ mcq_23054_001_2
76
+ mcq_20581_001_0
77
+ mcq_23416_001_0
78
+ mcq_23058_001_0
79
+ mcq_20595_001_0
80
+ mcq_23031_000_0
81
+ mcq_20580_000_0
82
+ mcq_23047_001_0
83
+ mcq_23416_000_2
84
+ mcq_20583_000_0
85
+ mcq_23040_001_2
86
+ mcq_23436_000_2
87
+ mcq_23333_000_0
88
+ mcq_23320_001_1
89
+ mcq_23333_001_0
90
+ mcq_23321_001_0
91
+ mcq_23317_002_0
92
+ mcq_19983_000_0
93
+ mcq_19982_002_2
94
+ mcq_22758_001_2
95
+ mcq_22745_000_0
96
+ mcq_22748_002_0
97
+ mcq_22757_001_0
98
+ mcq_19976_000_1
99
+ mcq_22749_000_0
100
+ mcq_19972_002_0
101
+ mcq_22741_003_0
102
+ mcq_22746_001_0
103
+ mcq_22755_000_0
104
+ mcq_23317_000_0
105
+ mcq_19959_001_0
106
+ mcq_22745_000_2
107
+ mcq_23332_000_0
108
+ mcq_22746_000_1
109
+ mcq_23324_000_1
110
+ mcq_23318_000_0
111
+ mcq_19966_001_0
112
+ mcq_19959_002_0
113
+ mcq_22752_002_2
114
+ mcq_21720_003_1
115
+ mcq_19423_018_0
116
+ mcq_19423_000_0
117
+ mcq_22921_014_1
118
+ mcq_22924_003_1
119
+ mcq_22921_014_2
120
+ mcq_21718_002_2
121
+ mcq_22921_012_1
122
+ mcq_21718_003_1
123
+ mcq_21718_001_1
124
+ mcq_21723_003_2
125
+ mcq_21718_002_1
126
+ mcq_22924_008_0
127
+ mcq_19423_020_1
128
+ mcq_21723_003_0
129
+ mcq_22926_012_0
130
+ mcq_19423_014_2
131
+ mcq_22924_009_0
132
+ mcq_19423_014_0
133
+ mcq_21718_006_1
134
+ mcq_19432_001_2
135
+ mcq_19423_007_0
136
+ mcq_22926_007_0
137
+ mcq_22926_015_2
138
+ mcq_19432_000_1
139
+ mcq_21714_003_0
140
+ mcq_21718_009_1
141
+ mcq_21718_006_0
142
+ mcq_19423_002_0
143
+ mcq_22926_004_2
144
+ mcq_19423_002_1
145
+ mcq_22921_011_0
146
+ mcq_22921_006_0
147
+ mcq_19423_008_1
148
+ mcq_22924_001_0
149
+ mcq_21718_001_2
150
+ mcq_21718_003_2
151
+ mcq_21718_001_0
152
+ mcq_21718_000_0
153
+ mcq_19423_020_0
154
+ mcq_21712_016_0
155
+ mcq_22924_006_0
156
+ mcq_903137782_011_2
157
+ mcq_906302875_010_0
158
+ mcq_903137782_019_3
159
+ mcq_903137782_011_0
160
+ mcq_906302875_029_0
161
+ mcq_906302875_009_0
162
+ mcq_906302875_018_6
163
+ mcq_906302875_020_0
164
+ mcq_906302875_010_6
165
+ mcq_903137782_012_0
166
+ mcq_903137782_012_1
167
+ mcq_903137782_020_0
168
+ mcq_906302875_020_2
169
+ mcq_906302875_022_5
170
+ mcq_903137782_011_7
171
+ mcq_906302875_025_3
172
+ mcq_906302875_009_2
173
+ mcq_903137782_009_0
174
+ mcq_903137782_019_2
175
+ mcq_903137782_021_7
176
+ mcq_903137782_008_7
177
+ mcq_903137782_020_1
178
+ mcq_906302875_015_0
179
+ mcq_903137782_012_6
180
+ mcq_903137782_010_3
181
+ mcq_906302875_033_1
182
+ mcq_906302875_027_0
183
+ mcq_906302875_033_0
184
+ mcq_903137782_025_6
185
+ mcq_903137782_011_6
186
+ mcq_903137782_018_2
187
+ mcq_906302875_011_3
188
+ mcq_903137782_009_1
189
+ mcq_906302875_011_1
190
+ mcq_903137782_010_6
191
+ mcq_903137782_011_3
192
+ mcq_903137782_021_2
193
+ mcq_903137782_024_0
194
+ mcq_903137782_010_0
195
+ mcq_903137782_025_2
196
+ mcq_906302875_010_3
197
+ mcq_910693558_025_2
198
+ mcq_910693558_034_0
199
+ mcq_903779140_044_2
200
+ mcq_903779140_009_0
201
+ mcq_910693558_024_2
202
+ mcq_903779140_016_0
203
+ mcq_903779140_006_1
204
+ mcq_903779140_019_0
205
+ mcq_910693558_007_2
206
+ mcq_903779140_009_4
207
+ mcq_910693558_009_1
208
+ mcq_904719733_010_4
209
+ mcq_910693558_010_0
210
+ mcq_903779140_015_5
211
+ mcq_903779140_015_3
212
+ mcq_910693558_023_5
213
+ mcq_903779140_015_1
214
+ mcq_903779140_009_1
215
+ mcq_903779140_007_2
216
+ mcq_903779140_007_0
217
+ mcq_910693558_009_5
218
+ mcq_910693558_014_0
219
+ mcq_916520645_017_0
220
+ mcq_912050769_018_0
221
+ mcq_903568982_005_1
222
+ mcq_916520645_037_4
223
+ mcq_916520645_036_2
224
+ mcq_916520645_020_0
225
+ mcq_916520645_013_1
226
+ mcq_903568982_017_1
227
+ mcq_903568982_015_5
228
+ mcq_916520645_023_0
229
+ mcq_912050769_010_0
230
+ mcq_903568982_042_4
231
+ mcq_903568982_031_4
232
+ mcq_912050769_009_3
233
+ mcq_916520645_023_5
234
+ mcq_903568982_015_0
235
+ mcq_903568982_009_0
236
+ mcq_903568982_011_1
237
+ mcq_903568982_029_0
238
+ mcq_903568982_044_0
239
+ mcq_903568982_034_5
240
+ mcq_903568982_009_1
241
+ mcq_916520645_018_0
242
+ mcq_916520645_046_0
243
+ mcq_916520645_017_4
244
+ mcq_916520645_029_0
245
+ mcq_916520645_029_5
246
+ mcq_903568982_008_4
247
+ mcq_916520645_037_1
248
+ mcq_903568982_031_0
249
+ mcq_903568982_031_1
250
+ mcq_903568982_023_0
251
+ mcq_903568982_008_0
252
+ mcq_916520645_009_1
253
+ mcq_916520645_036_3
254
+ mcq_916520645_033_1
255
+ mcq_912050769_009_1
256
+ mcq_903568982_024_1
257
+ mcq_916520645_007_5
258
+ mcq_916520645_011_4
259
+ mcq_903568982_042_3
260
+ mcq_916520645_041_1
261
+ mcq_916520645_040_5
262
+ mcq_903568982_009_3
263
+ mcq_912050769_005_5
264
+ mcq_916520645_020_1
265
+ mcq_912050769_033_3
266
+ mcq_916520645_013_2
267
+ mcq_916520645_005_4
268
+ mcq_912050769_019_1
269
+ mcq_903568982_038_1
270
+ mcq_912050769_007_2
271
+ mcq_916520645_046_2
272
+ mcq_916520645_011_0
273
+ mcq_916520645_037_0
274
+ mcq_916520645_024_5
275
+ mcq_912050769_024_0
276
+ mcq_916520645_008_0
277
+ mcq_903568982_011_5
278
+ mcq_903568982_016_5
279
+ mcq_916520645_045_5
280
+ mcq_916520645_037_5
281
+ mcq_912050769_014_3
282
+ mcq_903568982_023_1
283
+ mcq_916520645_040_1
284
+ mcq_916520645_036_1
285
+ mcq_903568982_008_5
286
+ mcq_19377_002_3
287
+ mcq_19388_000_0
288
+ mcq_21399_007_1
289
+ mcq_19370_000_0
290
+ mcq_21399_000_0
291
+ mcq_22349_003_0
292
+ mcq_21388_004_3
293
+ mcq_19388_001_3
294
+ mcq_21388_005_3
295
+ mcq_21395_005_0
296
+ mcq_22349_001_0
297
+ mcq_19370_007_0
298
+ mcq_21388_005_1
299
+ mcq_21388_000_2
300
+ mcq_19370_002_1
301
+ mcq_19388_001_0
302
+ mcq_21388_006_0
303
+ mcq_19370_003_0
304
+ mcq_21399_008_2
305
+ mcq_19370_005_0
306
+ mcq_22349_003_1
307
+ mcq_19370_003_1
308
+ mcq_22349_000_0
309
+ mcq_22349_004_0
310
+ mcq_21388_003_0
311
+ mcq_21395_001_2
312
+ mcq_21399_005_3
313
+ mcq_19370_002_0
314
+ mcq_21388_003_2
315
+ mcq_21388_004_0
316
+ mcq_21388_004_1
317
+ mcq_21399_001_0
318
+ mcq_19382_001_1
319
+ mcq_19382_002_0
320
+ mcq_24610_001_0
321
+ mcq_24613_001_0
322
+ mcq_24612_000_0
323
+ mcq_23868_000_2
324
+ mcq_21135_000_0
325
+ mcq_23888_000_2
326
+ mcq_23909_003_2
327
+ mcq_23877_001_0
328
+ mcq_24611_001_0
329
+ mcq_21118_001_0
330
+ mcq_23917_005_1
331
+ mcq_23909_001_0
332
+ mcq_24610_005_1
333
+ mcq_23906_002_0
334
+ mcq_23874_003_0
335
+ mcq_23865_001_1
336
+ mcq_23865_000_0
337
+ mcq_21135_003_0
338
+ mcq_23913_001_2
339
+ mcq_24608_000_0
340
+ mcq_23868_003_0
341
+ mcq_23898_001_0
342
+ mcq_23928_005_2
343
+ mcq_24613_003_2
344
+ mcq_21122_000_2
345
+ mcq_24608_003_0
346
+ mcq_23870_000_0
347
+ mcq_24606_003_0
348
+ mcq_23880_001_0
349
+ mcq_21118_018_0
350
+ mcq_23917_001_0
351
+ mcq_23874_001_1
352
+ mcq_21122_000_0
353
+ mcq_24597_003_0
354
+ mcq_24604_001_1
355
+ mcq_23921_001_1
356
+ mcq_21125_000_0
357
+ mcq_21118_007_0
358
+ mcq_21929_003_3
359
+ mcq_21926_002_0
360
+ mcq_21926_012_0
361
+ mcq_19156_003_1
362
+ mcq_21926_004_0
363
+ mcq_19174_005_0
364
+ mcq_21928_008_1
365
+ mcq_21183_006_0
366
+ mcq_21174_003_0
367
+ mcq_19174_007_0
368
+ mcq_21928_002_1
369
+ mcq_21926_007_1
370
+ mcq_19174_009_3
371
+ mcq_21174_004_1
372
+ mcq_21179_004_0
373
+ mcq_21174_002_0
374
+ mcq_19151_004_0
375
+ mcq_19174_000_0
376
+ mcq_21171_002_3
377
+ mcq_21171_007_0
378
+ mcq_19156_005_0
379
+ mcq_19174_000_1
380
+ mcq_21934_002_3
381
+ mcq_21924_005_0
382
+ mcq_21185_000_0
383
+ mcq_21174_009_4
384
+ mcq_19174_008_1
385
+ mcq_21928_003_0
386
+ mcq_19174_004_3
387
+ mcq_19163_001_0
388
+ mcq_21171_009_0
389
+ mcq_19174_006_2
390
+ mcq_19171_000_0
391
+ mcq_19174_002_0
392
+ mcq_19163_004_4
393
+ mcq_21171_020_2
394
+ mcq_21171_006_0
395
+ mcq_19156_006_4
396
+ mcq_17191_004_2
397
+ mcq_17177_004_1
398
+ mcq_17144_008_0
399
+ mcq_18534_012_1
400
+ mcq_17105_000_2
401
+ mcq_17207_000_0
402
+ mcq_18595_000_2
403
+ mcq_17137_005_0
404
+ mcq_17130_001_1
405
+ mcq_19265_004_0
406
+ mcq_18584_003_2
407
+ mcq_19292_003_0
408
+ mcq_17137_000_0
409
+ mcq_18512_002_0
410
+ mcq_18589_009_0
411
+ mcq_17130_002_1
412
+ mcq_18589_010_0
413
+ mcq_17207_004_0
414
+ mcq_19272_000_1
415
+ mcq_18584_008_1
416
+ mcq_18553_005_1
417
+ mcq_17177_000_1
418
+ mcq_19255_002_2
419
+ mcq_19237_006_2
420
+ mcq_18562_009_0
421
+ mcq_19298_002_1
422
+ mcq_18534_012_2
423
+ mcq_19284_001_2
424
+ mcq_19265_000_1
425
+ mcq_19265_002_0
426
+ mcq_18557_003_1
427
+ mcq_19315_001_0
428
+ mcq_19237_003_2
429
+ mcq_17199_000_1
430
+ mcq_18557_002_1
431
+ mcq_19288_003_0
432
+ mcq_18534_008_1
433
+ mcq_19284_004_0
434
+ mcq_18534_005_0
435
+ mcq_18567_011_0
436
+ mcq_19284_005_1
437
+ mcq_19284_004_2
438
+ mcq_17207_004_2
439
+ mcq_18584_008_0
440
+ mcq_18547_003_0
441
+ mcq_18567_010_0
442
+ mcq_18528_000_1
443
+ mcq_19292_000_0
444
+ mcq_19284_000_0
445
+ mcq_17130_001_0
446
+ mcq_19237_004_0
447
+ mcq_18567_006_1
448
+ mcq_19284_003_1
449
+ mcq_18562_008_0
450
+ mcq_18553_005_0
451
+ mcq_17169_001_0
452
+ mcq_19255_001_0
453
+ mcq_17144_004_2
454
+ mcq_18534_003_2
455
+ mcq_19308_005_2
456
+ mcq_19288_000_0
457
+ mcq_18553_001_2
458
+ mcq_18547_005_2
459
+ mcq_19284_000_2
460
+ mcq_17130_005_0
461
+ mcq_19255_002_0
462
+ mcq_18519_004_2
463
+ mcq_19298_003_2
464
+ mcq_19308_003_1
465
+ mcq_18553_001_0
466
+ mcq_19298_003_1
467
+ mcq_19320_008_1
468
+ mcq_17177_007_0
469
+ mcq_18534_007_0
470
+ mcq_19269_002_1
471
+ mcq_18562_009_2
472
+ mcq_19272_007_0
473
+ mcq_19247_001_0
474
+ mcq_19237_003_0
475
+ mcq_19261_001_2
476
+ mcq_17130_001_2
477
+ mcq_18528_003_0
478
+ mcq_18578_004_2
479
+ mcq_19269_004_2
480
+ mcq_18567_014_0
481
+ mcq_19261_001_1
482
+ mcq_18528_001_1
483
+ mcq_19269_004_0
484
+ mcq_19284_005_0
485
+ mcq_19265_003_0
486
+ mcq_18589_001_0
487
+ mcq_18589_016_2
488
+ mcq_19292_002_0
489
+ mcq_18567_005_1
490
+ mcq_17144_005_1
491
+ mcq_19251_004_1
492
+ mcq_17191_006_0
493
+ mcq_19265_007_0
494
+ mcq_19303_001_0
495
+ mcq_19320_008_0
496
+ mcq_18547_002_1
497
+ mcq_18567_005_0
498
+ mcq_18519_002_2
499
+ mcq_18589_015_2
500
+ mcq_18553_002_0
501
+ mcq_19237_009_0
502
+ mcq_19288_001_2
503
+ mcq_18512_000_2
504
+ mcq_17207_001_0
505
+ mcq_19744_001_3
506
+ mcq_18424_001_0
507
+ mcq_18412_004_2
508
+ mcq_18397_001_3
509
+ mcq_19767_006_2
510
+ mcq_19746_005_3
511
+ mcq_19767_002_1
512
+ mcq_18380_005_2
513
+ mcq_18412_000_0
514
+ mcq_18457_000_0
515
+ mcq_19761_002_2
516
+ mcq_19752_001_0
517
+ mcq_18416_000_0
518
+ mcq_18397_003_1
519
+ mcq_19741_002_1
520
+ mcq_20288_000_0
521
+ mcq_20269_000_1
522
+ mcq_20292_000_0
523
+ mcq_23194_000_0
524
+ mcq_23206_001_0
525
+ mcq_38534_008_1
526
+ mcq_38542_011_2
527
+ mcq_28806_000_0
528
+ mcq_38554_009_1
529
+ mcq_28809_033_0
530
+ mcq_28809_019_0
531
+ mcq_38472_009_2
532
+ mcq_38523_000_2
533
+ mcq_28815_003_0
534
+ mcq_28809_010_0
535
+ mcq_28817_000_2
536
+ mcq_40041_002_0
537
+ mcq_25632_008_2
538
+ mcq_40041_002_4
539
+ mcq_40139_001_1
540
+ mcq_40062_003_0
541
+ mcq_40041_002_3
542
+ mcq_25681_001_0
543
+ mcq_40062_004_0
544
+ mcq_25712_001_2
545
+ mcq_25704_002_0
546
+ mcq_40116_003_0
547
+ mcq_40020_001_4
548
+ mcq_40062_001_4
549
+ mcq_25695_001_4
550
+ mcq_25719_003_2
551
+ mcq_40155_001_0
552
+ mcq_25726_002_1
553
+ mcq_40099_002_4
554
+ mcq_40139_000_2
555
+ mcq_40103_002_3
556
+ mcq_25732_002_3
557
+ mcq_40093_001_2
558
+ mcq_40168_002_2
559
+ mcq_40093_003_4
560
+ mcq_25643_002_0
561
+ mcq_40116_004_3
562
+ mcq_40168_001_0
563
+ mcq_40030_003_2
564
+ mcq_40146_001_4
565
+ mcq_25638_009_0
566
+ mcq_25632_003_3
567
+ mcq_40020_003_4
568
+ mcq_40093_000_1
569
+ mcq_40139_003_4
570
+ mcq_25643_000_3
571
+ mcq_40111_002_1
572
+ mcq_40076_003_2
573
+ mcq_40057_002_2
574
+ mcq_40041_003_1
575
+ mcq_40093_004_1
576
+ mcq_25712_001_4
577
+ mcq_25697_002_0
578
+ mcq_40111_005_2
579
+ mcq_40076_000_4
580
+ mcq_25686_000_4
581
+ mcq_25625_002_2
582
+ mcq_40155_004_0
583
+ mcq_40146_000_1
584
+ mcq_25700_001_0
585
+ mcq_40089_004_0
586
+ mcq_40036_003_3
587
+ mcq_40036_001_2
588
+ mcq_25638_005_4
589
+ mcq_40146_000_2
590
+ mcq_40076_002_3
591
+ mcq_25732_001_2
592
+ mcq_25655_002_2
593
+ mcq_40139_004_0
594
+ mcq_25676_001_2
595
+ mcq_40062_003_1
596
+ mcq_40111_004_0
597
+ mcq_25686_000_2
598
+ mcq_40076_002_1
599
+ mcq_25663_001_2
600
+ mcq_25719_001_3
601
+ mcq_25681_002_2
602
+ mcq_40076_003_0
603
+ mcq_40111_005_0
604
+ mcq_25861_000_0
605
+ mcq_21781_002_0
606
+ mcq_21778_001_0
607
+ mcq_25879_000_0
608
+ mcq_27135_001_0
609
+ mcq_25892_001_2
610
+ mcq_27149_003_2
611
+ mcq_21779_000_2
612
+ mcq_27144_000_2
613
+ mcq_21778_003_2
614
+ mcq_25873_000_0
615
+ mcq_25876_000_1
616
+ mcq_22977_000_0
617
+ mcq_25833_001_0
618
+ mcq_22976_000_0
619
+ mcq_22968_021_0
620
+ mcq_22986_002_2
621
+ mcq_22985_001_2
622
+ mcq_25799_000_0
623
+ mcq_22968_045_2
624
+ mcq_22968_041_0
625
+ mcq_22972_002_2
626
+ mcq_25833_000_0
627
+ mcq_22982_004_1
628
+ mcq_22986_001_2
629
+ mcq_25816_001_2
630
+ mcq_22969_002_2
631
+ mcq_26405_013_1
632
+ mcq_28651_005_2
633
+ mcq_28651_004_0
634
+ mcq_28583_011_1
635
+ mcq_26377_001_1
636
+ mcq_28583_009_1
637
+ mcq_28651_003_1
638
+ mcq_28651_000_1
639
+ mcq_20629_014_1
640
+ mcq_26405_009_0
641
+ mcq_28696_001_1
642
+ mcq_28583_014_0
643
+ mcq_28583_014_1
644
+ mcq_26377_006_2
645
+ mcq_28696_002_1
646
+ mcq_26365_008_1
647
+ mcq_28583_006_1
648
+ mcq_26390_024_0
649
+ mcq_20633_005_0
650
+ mcq_20632_001_0
651
+ mcq_28651_004_1
652
+ mcq_26425_010_1
653
+ mcq_20625_013_0
654
+ mcq_20629_016_2
655
+ mcq_26405_017_1
656
+ mcq_28651_001_0
657
+ mcq_28665_009_0
658
+ mcq_28583_013_2
659
+ mcq_28583_008_1
660
+ mcq_20633_003_1
661
+ mcq_26377_000_2
662
+ mcq_28623_009_1
663
+ mcq_26390_023_0
664
+ mcq_28665_013_1
665
+ mcq_26405_013_0
666
+ mcq_26377_000_1
667
+ mcq_28583_013_1
668
+ mcq_20633_000_1
669
+ mcq_28583_015_1
670
+ mcq_28665_014_0
671
+ mcq_28665_014_2
672
+ mcq_26425_008_0
673
+ mcq_26365_007_0
674
+ mcq_28651_005_0
675
+ mcq_28583_019_0
676
+ mcq_26405_015_0
677
+ mcq_20632_004_0
678
+ mcq_26405_018_0
679
+ mcq_28665_014_1
680
+ mcq_20634_006_1
681
+ mcq_28651_004_2
682
+ mcq_20625_000_0
683
+ mcq_26390_022_2
684
+ mcq_20632_004_2
685
+ mcq_26377_007_0
686
+ mcq_20633_002_0
687
+ mcq_20633_002_2
688
+ mcq_28665_003_0
689
+ mcq_26390_003_0
690
+ mcq_26390_021_0
691
+ mcq_20632_001_2
692
+ mcq_20633_011_0
693
+ mcq_20632_005_0
694
+ mcq_26405_008_2
695
+ mcq_28623_006_0
696
+ mcq_20633_001_0
697
+ mcq_26390_022_0
698
+ mcq_28623_009_0
699
+ mcq_26390_012_2
700
+ mcq_26405_014_1
701
+ mcq_28583_018_1
702
+ mcq_28651_000_0
703
+ mcq_28583_011_0
704
+ mcq_20633_004_0
705
+ mcq_20632_002_0
706
+ mcq_28623_012_1
707
+ mcq_28583_013_0
708
+ mcq_28623_008_1
709
+ mcq_20632_007_2
710
+ mcq_28583_007_0
711
+ mcq_26390_003_1
712
+ mcq_26390_017_0
713
+ mcq_29458_002_2
714
+ mcq_38216_020_0
715
+ mcq_38206_005_0
716
+ mcq_29454_013_0
717
+ mcq_38206_013_2
718
+ mcq_29460_016_1
719
+ mcq_38209_006_2
720
+ mcq_29454_005_2
721
+ mcq_29454_000_1
722
+ mcq_29458_006_0
723
+ mcq_29456_001_1
724
+ mcq_29458_003_0
725
+ mcq_29460_017_1
726
+ mcq_29460_003_2
727
+ mcq_38187_023_0
728
+ mcq_912552759_005_4
729
+ mcq_912552759_006_5
730
+ mcq_900325340_011_2
731
+ mcq_907248739_030_5
732
+ mcq_900325340_011_4
733
+ mcq_912552759_006_4
734
+ mcq_912552759_005_1
735
+ mcq_912552759_006_7
736
+ mcq_907248739_010_4
737
+ mcq_907248739_010_5
738
+ mcq_900325340_015_0
739
+ mcq_907248739_030_2
740
+ mcq_907248739_018_7
741
+ mcq_907248739_009_7
742
+ mcq_907248739_010_1
743
+ mcq_907248739_011_1
744
+ mcq_900325340_016_6
745
+ mcq_907248739_021_3
746
+ mcq_900325340_017_0
747
+ mcq_907248739_008_0
748
+ mcq_907248739_017_3
749
+ mcq_900325340_010_2
750
+ mcq_907248739_009_3
751
+ mcq_907248739_013_5
752
+ mcq_907248739_021_5
753
+ mcq_900325340_011_7
754
+ mcq_900325340_017_7
755
+ mcq_907248739_022_2
756
+ mcq_907248739_022_5
757
+ mcq_907248739_026_6
758
+ mcq_907248739_016_2
759
+ mcq_900325340_013_1
760
+ mcq_900325340_026_0
761
+ mcq_907248739_030_0
762
+ mcq_907248739_009_5
763
+ mcq_907248739_020_4
764
+ mcq_907248739_016_0
765
+ mcq_907248739_020_6
766
+ mcq_907248739_019_0
767
+ mcq_900325340_009_3
768
+ mcq_38260_006_1
769
+ mcq_29487_001_2
770
+ mcq_38249_003_1
771
+ mcq_38262_000_0
772
+ mcq_29485_004_2
773
+ mcq_29486_003_2
774
+ mcq_38260_000_0
775
+ mcq_29488_002_0
776
+ mcq_38263_000_1
777
+ mcq_902928789_006_5
778
+ mcq_902928789_043_0
779
+ mcq_902928789_038_5
780
+ mcq_902928789_011_0
781
+ mcq_902928789_026_2
782
+ mcq_902928789_007_0
783
+ mcq_902928789_034_2
784
+ mcq_902928789_011_2
785
+ mcq_902928789_031_4
786
+ mcq_902928789_027_1
787
+ mcq_908755184_050_0
788
+ mcq_902928789_005_1
789
+ mcq_902928789_029_2
790
+ mcq_902928789_019_2
791
+ mcq_902928789_036_5
792
+ mcq_902928789_035_1
793
+ mcq_902928789_029_1
794
+ mcq_908755184_043_0
795
+ mcq_907562714_007_0
796
+ mcq_908755184_031_2
797
+ mcq_908755184_026_3
798
+ mcq_26233_001_0
799
+ mcq_20322_002_0
800
+ mcq_28019_000_1
801
+ mcq_26208_002_0
802
+ mcq_20322_005_0
803
+ mcq_28004_001_0
804
+ mcq_20327_002_0
805
+ mcq_26186_005_1
806
+ mcq_26226_006_0
807
+ mcq_26216_000_1
808
+ mcq_27955_000_2
809
+ mcq_20319_003_1
810
+ mcq_26216_001_3
811
+ mcq_26216_001_0
812
+ mcq_27975_001_0
813
+ mcq_26226_003_1
814
+ mcq_20322_005_1
815
+ mcq_26186_004_0
816
+ mcq_26220_000_1
817
+ mcq_26186_011_0
818
+ mcq_22172_000_0
819
+ mcq_29340_005_1
820
+ mcq_22190_002_2
821
+ mcq_29363_005_0
822
+ mcq_29376_004_0
823
+ mcq_22194_001_0
824
+ mcq_22175_003_0
825
+ mcq_29340_000_0
826
+ mcq_29363_001_1
827
+ mcq_38855_014_0
828
+ mcq_38838_004_1
829
+ mcq_22189_001_0
830
+ mcq_38879_004_2
831
+ mcq_22186_002_1
832
+ mcq_29340_005_0
833
+ mcq_29368_007_0
834
+ mcq_22192_005_0
835
+ mcq_29363_008_1
836
+ mcq_38843_001_0
837
+ mcq_22194_005_2
838
+ mcq_22192_000_1
839
+ mcq_22177_001_1
840
+ mcq_38883_005_1
841
+ mcq_38829_000_0
842
+ mcq_29368_012_0
843
+ mcq_38861_007_1
844
+ mcq_38883_010_1
845
+ mcq_22194_009_1
846
+ mcq_38829_002_2
847
+ mcq_38861_000_0
848
+ mcq_39084_001_0
849
+ mcq_38976_002_2
850
+ mcq_39060_013_0
851
+ mcq_39084_003_4
852
+ mcq_39095_005_0
853
+ mcq_39084_000_1
854
+ mcq_39072_003_3
855
+ mcq_39023_003_1
856
+ mcq_38976_003_3
857
+ mcq_39072_004_0
858
+ mcq_39007_013_0
859
+ mcq_25538_003_2
860
+ mcq_38948_008_1
861
+ mcq_39072_013_2
862
+ mcq_39023_000_0
863
+ mcq_38948_008_0
864
+ mcq_38976_016_4
865
+ mcq_39060_013_2
866
+ mcq_25538_000_4
867
+ mcq_25538_007_2
868
+ mcq_38976_005_1
869
+ mcq_25549_017_1
870
+ mcq_25476_014_2
871
+ mcq_25459_013_2
872
+ mcq_39023_010_0
873
+ mcq_39095_003_1
874
+ mcq_25555_014_2
875
+ mcq_39007_007_0
876
+ mcq_38976_011_4
877
+ mcq_39060_004_0
878
+ mcq_39084_000_0
879
+ mcq_39023_002_1
880
+ mcq_38948_003_1
881
+ mcq_39007_003_0
882
+ mcq_25549_007_4
883
+ mcq_24866_012_1
884
+ mcq_18673_005_2
885
+ mcq_24683_005_3
886
+ mcq_32977_000_0
887
+ mcq_24866_012_0
888
+ mcq_24649_002_0
889
+ mcq_24649_004_0
890
+ mcq_24763_003_3
891
+ mcq_24843_007_2
892
+ mcq_24702_003_4
893
+ mcq_18633_000_2
894
+ mcq_25114_019_2
895
+ mcq_24755_003_0
896
+ mcq_24866_012_4
897
+ mcq_18637_001_4
898
+ mcq_24773_001_4
899
+ mcq_25176_001_1
900
+ mcq_24702_005_4
901
+ mcq_32977_007_2
902
+ mcq_25167_004_3
903
+ mcq_18641_001_2
904
+ mcq_18658_006_4
905
+ mcq_25066_005_4
906
+ mcq_24792_000_2
907
+ mcq_24803_000_1
908
+ mcq_24812_001_3
909
+ mcq_903217400_152_2
910
+ mcq_903217400_169_3
911
+ mcq_907792485_012_1
912
+ mcq_903217400_212_2
913
+ mcq_907792485_014_3
914
+ mcq_907792485_090_2
915
+ mcq_907792485_014_0
916
+ mcq_906597809_020_2
917
+ mcq_907792485_066_2
918
+ mcq_907792485_089_2
919
+ mcq_913873011_051_1
920
+ mcq_907792485_063_0
921
+ mcq_907792485_026_0
922
+ mcq_907792485_052_2
923
+ mcq_907792485_063_2
924
+ mcq_31810_000_1
925
+ mcq_31763_000_2
926
+ mcq_905145333_054_1
927
+ mcq_905145333_006_1
928
+ mcq_34917_000_0
929
+ mcq_34910_000_3
930
+ mcq_32068_000_2
931
+ mcq_905884636_021_1
932
+ mcq_915703041_031_2
933
+ mcq_915703041_001_0
934
+ mcq_32024_000_2
935
+ mcq_32062_000_5
936
+ mcq_32072_000_4
937
+ mcq_32025_000_1
938
+ mcq_32082_000_2
939
+ mcq_906744851_001_3
940
+ mcq_32084_000_2
941
+ mcq_32075_000_2
942
+ mcq_905719217_187_2
943
+ mcq_915134069_013_3
944
+ mcq_905719217_016_2
945
+ mcq_905719217_290_2
946
+ mcq_912464987_007_1
947
+ mcq_905719217_079_2
948
+ mcq_912464987_015_2
949
+ mcq_905719217_171_1
950
+ mcq_905719217_012_2
951
+ mcq_915134069_014_1
952
+ mcq_905719217_217_2
953
+ mcq_915134069_008_0
954
+ mcq_913593445_028_2
955
+ mcq_930002845_034_3
956
+ mcq_911625854_040_0
957
+ mcq_911625854_038_2
958
+ mcq_911625854_042_3
959
+ mcq_911625854_026_2
960
+ mcq_911625854_023_3
961
+ mcq_930002930_019_2
962
+ mcq_911625854_048_2
963
+ mcq_911625854_026_0
964
+ mcq_913593445_041_2
965
+ mcq_911625854_023_2
966
+ mcq_930002461_029_0
967
+ mcq_29866_000_1
968
+ mcq_29857_000_1
969
+ mcq_29808_000_0
970
+ mcq_29851_000_0
971
+ mcq_29876_000_3
972
+ mcq_901772665_005_1
973
+ mcq_29814_000_2
974
+ mcq_29855_000_2
975
+ mcq_905630786_021_0
976
+ mcq_31039_000_5
977
+ mcq_900181973_021_3
978
+ mcq_900181973_021_2
979
+ mcq_30988_000_3
980
+ mcq_905906820_021_1
981
+ mcq_909740322_060_0
982
+ mcq_909740322_019_2
983
+ mcq_916659363_049_3
984
+ mcq_909740322_031_2
985
+ mcq_909740322_056_2
986
+ mcq_909740322_005_0
987
+ mcq_916659363_003_2
988
+ mcq_909740322_043_1
989
+ mcq_909740322_023_2
990
+ mcq_916659363_057_2
991
+ mcq_916659363_039_2
992
+ mcq_909740322_053_2
993
+ mcq_909740322_022_0
994
+ mcq_909740322_008_2
995
+ mcq_909740322_037_2
996
+ mcq_909740322_057_3
997
+ mcq_909740322_024_2
998
+ mcq_909740322_008_0
999
+ mcq_909740322_037_0
1000
+ mcq_916659363_021_2
1001
+ mcq_916659363_033_1
1002
+ mcq_916659363_045_2
1003
+ mcq_909740322_013_2
1004
+ mcq_903208054_020_2
1005
+ mcq_902849618_031_2
1006
+ mcq_903208054_045_3
1007
+ mcq_902849618_010_0
1008
+ mcq_903208054_036_1
1009
+ mcq_902849618_033_3
1010
+ mcq_903208054_033_0
1011
+ mcq_902849618_031_0
1012
+ mcq_903208054_036_0
1013
+ mcq_902849618_022_0
1014
+ mcq_903208054_026_0
1015
+ mcq_903208054_026_1
1016
+ mcq_34960_000_1
1017
+ mcq_34961_000_0
1018
+ mcq_903208054_024_2
1019
+ mcq_902849618_009_1
1020
+ mcq_910273911_060_3
1021
+ mcq_910273911_053_3
1022
+ mcq_912636831_090_1
1023
+ mcq_912636831_059_0
1024
+ mcq_910273911_026_3
1025
+ mcq_910273911_050_3
1026
+ mcq_910273911_047_2
1027
+ mcq_910273911_031_1
1028
+ mcq_910273911_104_0
1029
+ mcq_910273911_011_1
1030
+ mcq_910273911_117_1
1031
+ mcq_910273911_011_3
1032
+ mcq_910273911_041_1
1033
+ mcq_910273911_120_2
1034
+ mcq_912636831_016_1
1035
+ mcq_910273911_044_3
1036
+ mcq_910273911_025_1
1037
+ mcq_32675_000_0
1038
+ mcq_32675_000_3
1039
+ mcq_32697_000_1
1040
+ mcq_910273911_069_3
1041
+ mcq_910273911_046_3
1042
+ mcq_32675_000_1
1043
+ mcq_910273911_101_0
1044
+ mcq_912636831_072_1
1045
+ mcq_912636831_084_0
1046
+ mcq_912636831_033_2
1047
+ mcq_907144258_025_3
1048
+ mcq_909937432_065_2
1049
+ mcq_909937432_049_0
1050
+ mcq_909937432_027_2
1051
+ mcq_909937432_097_0
1052
+ mcq_907144258_043_0
1053
+ mcq_907144258_006_1
1054
+ mcq_907144258_055_0
1055
+ mcq_909937432_065_0
1056
+ mcq_909937432_065_1
1057
+ mcq_909937432_007_2
1058
+ mcq_909937432_090_3
1059
+ mcq_909937432_019_0
1060
+ mcq_909937432_122_3
1061
+ mcq_907144258_045_0
1062
+ mcq_909937432_128_1
1063
+ mcq_909937432_019_3
1064
+ mcq_909937432_011_0
1065
+ mcq_909937432_085_2
1066
+ mcq_907144258_025_0
1067
+ mcq_909937432_044_0
1068
+ mcq_903906712_080_0
1069
+ mcq_908494993_151_2
1070
+ mcq_908494993_037_0
1071
+ mcq_28067_000_0
1072
+ mcq_903906712_067_1
1073
+ mcq_908494993_040_2
1074
+ mcq_28087_000_2
1075
+ mcq_905057208_125_1
1076
+ mcq_30561_000_2
1077
+ mcq_30642_000_4
1078
+ mcq_30658_000_2
1079
+ mcq_30608_000_2
1080
+ mcq_30645_000_0
1081
+ mcq_901474957_002_2
1082
+ mcq_30607_000_5
1083
+ mcq_30669_000_3
1084
+ mcq_916454267_028_3
1085
+ mcq_30584_000_3
1086
+ mcq_30590_000_4
1087
+ mcq_30664_000_4
1088
+ mcq_914440602_024_1
1089
+ mcq_914440602_042_1
1090
+ mcq_914440602_031_1
1091
+ mcq_915437942_041_0
1092
+ mcq_915437942_029_0
1093
+ mcq_914440602_045_1
1094
+ mcq_914440602_016_1
1095
+ mcq_914440602_012_1
1096
+ mcq_914440602_012_0
1097
+ mcq_914440602_031_0
1098
+ mcq_915437942_014_1
1099
+ mcq_914440602_016_3
1100
+ mcq_915437942_003_1
1101
+ mcq_911005812_011_0
1102
+ mcq_911005812_010_1
1103
+ mcq_901202257_046_2
1104
+ mcq_901202257_025_0
1105
+ mcq_930002764_034_0
1106
+ mcq_930002818_024_2
training/data/overlap-summary.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "training_questions": 10000,
3
+ "organiser_questions": {
4
+ "dev=data/dev-set": 1851,
5
+ "test=data/test-set": 2238,
6
+ "test-old=../Dataset/Test": 2146
7
+ },
8
+ "excluded": 1106,
9
+ "excluded_by_rule": {
10
+ "same question": 0,
11
+ "question jaccard >= 0.5": 17,
12
+ "question containment >= 0.8": 48,
13
+ "3+ same choices and containment >= 0.3": 11,
14
+ "all 4 choices the same": 43,
15
+ "meaning cosine >= 0.70": 1033
16
+ },
17
+ "nearest_cosine_percentiles": {
18
+ "50": 0.598,
19
+ "90": 0.702,
20
+ "99": 0.805,
21
+ "99.9": 0.899
22
+ },
23
+ "reported_below_threshold": 1598
24
+ }
training/data/shard-0.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
training/data/shard-1.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
training/data/star3-thoughts.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3eddcbfa7d45b5a155f593f0128469a28740c76310f4c7feb42a004abe1feafb
3
+ size 11102486
training/kaggle/star3-gen-0/kernel-metadata.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "id": "{owner}/sinhalanuwanacode-star3-gen-0",
3
+ "title": "sinhalanuwanacode-star3-gen-0",
4
+ "code_file": "run.py",
5
+ "language": "python",
6
+ "kernel_type": "script",
7
+ "is_private": true,
8
+ "enable_gpu": true,
9
+ "enable_tpu": false,
10
+ "enable_internet": true,
11
+ "machine_shape": "NvidiaTeslaT4",
12
+ "dataset_sources": ["{owner}/sinhalanuwanacode", "{owner}/sinhalanuwanacode-data"],
13
+ "competition_sources": [],
14
+ "kernel_sources": [],
15
+ "model_sources": []
16
+ }
training/kaggle/star3-gen-0/run.py ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import glob
2
+ import os
3
+ import subprocess
4
+ import sys
5
+ from pathlib import Path
6
+
7
+ REVISION = "ee0ef6023621cff504d758262d4e04895a5af4a2"
8
+
9
+
10
+ def find(name):
11
+ hits = glob.glob(f"/kaggle/input/**/{name}", recursive=True)
12
+ if len(hits) != 1:
13
+ raise SystemExit(f"error: expected one {name} under /kaggle/input: {hits}")
14
+ return Path(hits[0])
15
+
16
+
17
+ code = find("predict.py").parent
18
+ questions = find("star2/shard-0.jsonl")
19
+ print("code snapshot:", code, (code / "COMMIT").read_text().strip())
20
+ print("questions:", questions)
21
+
22
+ env = {**os.environ, "HF_HOME": "/kaggle/temp/hf"}
23
+ offline = {**env, "HF_HUB_OFFLINE": "1"}
24
+ subprocess.run([sys.executable, "-m", "pip", "install", "-q", "-r", str(code / "requirements.txt")], check=True)
25
+ subprocess.run([sys.executable, "-m", "pip", "uninstall", "-y", "-q", "torchao"], check=True)
26
+ subprocess.run(["nvidia-smi", "--query-gpu=name,memory.total", "--format=csv"], check=True)
27
+ subprocess.run(["hf", "download", "google/gemma-4-E4B-it", "--revision", REVISION], check=True, env=env)
28
+ subprocess.run(
29
+ [sys.executable, str(code / "star.py"), "--train", str(questions), "--no_hint_retry",
30
+ "--revision", REVISION, "--out_dir", "/kaggle/working/star"],
31
+ check=True,
32
+ env=offline,
33
+ )
training/kaggle/star3-gen-1/kernel-metadata.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "id": "{owner}/sinhalanuwanacode-star3-gen-1",
3
+ "title": "sinhalanuwanacode-star3-gen-1",
4
+ "code_file": "run.py",
5
+ "language": "python",
6
+ "kernel_type": "script",
7
+ "is_private": true,
8
+ "enable_gpu": true,
9
+ "enable_tpu": false,
10
+ "enable_internet": true,
11
+ "machine_shape": "NvidiaTeslaT4",
12
+ "dataset_sources": ["{owner}/sinhalanuwanacode", "{owner}/sinhalanuwanacode-data"],
13
+ "competition_sources": [],
14
+ "kernel_sources": [],
15
+ "model_sources": []
16
+ }
training/kaggle/star3-gen-1/run.py ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import glob
2
+ import os
3
+ import subprocess
4
+ import sys
5
+ from pathlib import Path
6
+
7
+ REVISION = "ee0ef6023621cff504d758262d4e04895a5af4a2"
8
+
9
+
10
+ def find(name):
11
+ hits = glob.glob(f"/kaggle/input/**/{name}", recursive=True)
12
+ if len(hits) != 1:
13
+ raise SystemExit(f"error: expected one {name} under /kaggle/input: {hits}")
14
+ return Path(hits[0])
15
+
16
+
17
+ code = find("predict.py").parent
18
+ questions = find("star2/shard-1.jsonl")
19
+ print("code snapshot:", code, (code / "COMMIT").read_text().strip())
20
+ print("questions:", questions)
21
+
22
+ env = {**os.environ, "HF_HOME": "/kaggle/temp/hf"}
23
+ offline = {**env, "HF_HUB_OFFLINE": "1"}
24
+ subprocess.run([sys.executable, "-m", "pip", "install", "-q", "-r", str(code / "requirements.txt")], check=True)
25
+ subprocess.run([sys.executable, "-m", "pip", "uninstall", "-y", "-q", "torchao"], check=True)
26
+ subprocess.run(["nvidia-smi", "--query-gpu=name,memory.total", "--format=csv"], check=True)
27
+ subprocess.run(["hf", "download", "google/gemma-4-E4B-it", "--revision", REVISION], check=True, env=env)
28
+ subprocess.run(
29
+ [sys.executable, str(code / "star.py"), "--train", str(questions), "--no_hint_retry",
30
+ "--revision", REVISION, "--out_dir", "/kaggle/working/star"],
31
+ check=True,
32
+ env=offline,
33
+ )
training/kaggle/star3-train/kernel-metadata.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "id": "{owner}/sinhalanuwanacode-star3-train",
3
+ "title": "sinhalanuwanacode-star3-train",
4
+ "code_file": "run.py",
5
+ "language": "python",
6
+ "kernel_type": "script",
7
+ "is_private": true,
8
+ "enable_gpu": true,
9
+ "enable_tpu": false,
10
+ "enable_internet": true,
11
+ "machine_shape": "NvidiaTeslaT4",
12
+ "dataset_sources": ["{owner}/sinhalanuwanacode"],
13
+ "competition_sources": [],
14
+ "kernel_sources": ["{owner}/sinhalanuwanacode-star3-gen-0", "{owner}/sinhalanuwanacode-star3-gen-1"],
15
+ "model_sources": []
16
+ }
training/kaggle/star3-train/run.py ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import glob
2
+ import json
3
+ import os
4
+ import subprocess
5
+ import sys
6
+ from pathlib import Path
7
+
8
+ REVISION = "ee0ef6023621cff504d758262d4e04895a5af4a2"
9
+
10
+
11
+ def find(name):
12
+ hits = glob.glob(f"/kaggle/input/**/{name}", recursive=True)
13
+ if len(hits) != 1:
14
+ raise SystemExit(f"error: expected one {name} under /kaggle/input: {hits}")
15
+ return Path(hits[0])
16
+
17
+
18
+ code = find("predict.py").parent
19
+ print("code snapshot:", code, (code / "COMMIT").read_text().strip())
20
+ parts = sorted(glob.glob("/kaggle/input/**/star/star.jsonl", recursive=True))
21
+ if len(parts) != 2:
22
+ raise SystemExit(f"error: expected the star.jsonl of both star3-gen notebooks: {parts}")
23
+ lines = [line for p in parts for line in Path(p).read_text(encoding="utf-8").splitlines()]
24
+ direct = [line for line in lines if json.loads(line)["source"] == "direct"]
25
+ data = Path("/kaggle/working/star3.jsonl")
26
+ data.write_text("".join(line + "\n" for line in direct), encoding="utf-8")
27
+ print(f"examples: {len(direct)} first-try thoughts written by the model without an adapter")
28
+
29
+ env = {**os.environ, "HF_HOME": "/kaggle/temp/hf"}
30
+ offline = {**env, "HF_HUB_OFFLINE": "1"}
31
+ subprocess.run([sys.executable, "-m", "pip", "install", "-q", "-r", str(code / "requirements.txt")], check=True)
32
+ subprocess.run([sys.executable, "-m", "pip", "uninstall", "-y", "-q", "torchao"], check=True)
33
+ subprocess.run(["nvidia-smi", "--query-gpu=name,memory.total", "--format=csv"], check=True)
34
+ subprocess.run(["hf", "download", "google/gemma-4-E4B-it", "--revision", REVISION], check=True, env=env)
35
+ subprocess.run(
36
+ [sys.executable, str(code / "train_lora.py"), "--data", str(data), "--revision", REVISION,
37
+ "--out_dir", "/kaggle/working/adapter"],
38
+ check=True,
39
+ env=offline,
40
+ )
training/prepare_star_data.py ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import argparse
2
+ import json
3
+ import random
4
+ from pathlib import Path
5
+
6
+
7
+ def main():
8
+ parser = argparse.ArgumentParser()
9
+ parser.add_argument("--questions", default="data/train/verified-mcq.jsonl")
10
+ parser.add_argument("--exclude", default="data/train/star2/overlap/excluded_ids.txt",
11
+ help="ids that review_overlap.py found similar to a dev or test question")
12
+ parser.add_argument("--out_dir", default="data/train/star2")
13
+ parser.add_argument("--shards", type=int, default=2)
14
+ parser.add_argument("--seed", type=int, default=0)
15
+ args = parser.parse_args()
16
+
17
+ lines = Path(args.questions).read_text(encoding="utf-8").splitlines()
18
+ excluded = set(Path(args.exclude).read_text(encoding="utf-8").split())
19
+ kept = [line for line in lines if json.loads(line)["id"] not in excluded]
20
+ assert len(lines) - len(kept) == len(excluded), "an excluded id is not in the question file"
21
+
22
+ random.Random(args.seed).shuffle(kept)
23
+ out_dir = Path(args.out_dir)
24
+ out_dir.mkdir(parents=True, exist_ok=True)
25
+ for n in range(args.shards):
26
+ shard = kept[n :: args.shards]
27
+ (out_dir / f"shard-{n}.jsonl").write_text("".join(line + "\n" for line in shard), encoding="utf-8")
28
+ print(f"shard-{n}.jsonl: {len(shard)} questions")
29
+ print(f"Kept {len(kept)} of {len(lines)} questions; excluded {len(excluded)} listed in {args.exclude}")
30
+
31
+
32
+ if __name__ == "__main__":
33
+ main()
training/review_overlap.py ADDED
@@ -0,0 +1,151 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import argparse
2
+ import json
3
+ import re
4
+ import unicodedata
5
+ from pathlib import Path
6
+
7
+ import numpy as np
8
+ import torch
9
+ from huggingface_hub import snapshot_download
10
+ from safetensors.torch import load_file
11
+ from transformers import AutoModel, AutoTokenizer
12
+
13
+ from predict import load_questions, normalise
14
+
15
+ NGRAM = 6
16
+ EMBEDDER = "sentence-transformers/LaBSE"
17
+ RULES = {
18
+ "same question": lambda m: m["question_key_equal"],
19
+ "question jaccard >= 0.5": lambda m: m["jaccard"] >= 0.5,
20
+ "question containment >= 0.8": lambda m: m["containment"] >= 0.8 and m["min_shingles"] >= 8,
21
+ "3+ same choices and containment >= 0.3": lambda m: m["same_choices"] >= 3 and m["containment"] >= 0.3,
22
+ "all 4 choices the same": lambda m: m["same_choices"] >= 4,
23
+ "meaning cosine >= 0.70": lambda m: m["cosine"] >= 0.70,
24
+ }
25
+
26
+
27
+ def key(text):
28
+ return re.sub(r"[\s​-‍\W_]+", "", unicodedata.normalize("NFC", str(text))).lower()
29
+
30
+
31
+ def shingles(text):
32
+ k = key(text)
33
+ return {k[i : i + NGRAM] for i in range(max(1, len(k) - NGRAM + 1))}
34
+
35
+
36
+ def as_text(q):
37
+ return q["question"].strip() + "\n" + "\n".join(str(c) for c in q["choices"])
38
+
39
+
40
+ def embed(texts, batch_size=64):
41
+ path = Path(snapshot_download(EMBEDDER, allow_patterns=[
42
+ "config.json", "model.safetensors", "tokenizer*", "vocab.txt", "special_tokens_map.json", "2_Dense/model.safetensors",
43
+ ]))
44
+ tokenizer = AutoTokenizer.from_pretrained(path)
45
+ model = AutoModel.from_pretrained(path).eval()
46
+ dense = load_file(path / "2_Dense" / "model.safetensors")
47
+ weight, bias = dense["linear.weight"], dense["linear.bias"]
48
+ out = []
49
+ with torch.inference_mode():
50
+ for i in range(0, len(texts), batch_size):
51
+ batch = tokenizer(texts[i : i + batch_size], padding=True, truncation=True, max_length=256,
52
+ return_tensors="pt")
53
+ cls = model(**batch).last_hidden_state[:, 0]
54
+ vec = torch.tanh(cls @ weight.T + bias)
55
+ out.append(torch.nn.functional.normalize(vec, dim=-1).numpy())
56
+ return np.concatenate(out)
57
+
58
+
59
+ def main():
60
+ parser = argparse.ArgumentParser()
61
+ parser.add_argument("--questions", default="data/train/verified-mcq.jsonl")
62
+ parser.add_argument("--eval", nargs="+", default=["dev=data/dev-set", "test=data/test-set", "test-old=../Dataset/Test"],
63
+ help="name=folder of organiser question files")
64
+ parser.add_argument("--out_dir", default="outputs/overlap")
65
+ parser.add_argument("--report_cosine", type=float, default=0.65)
66
+ args = parser.parse_args()
67
+
68
+ train = [normalise(json.loads(line)) for line in Path(args.questions).read_text(encoding="utf-8").splitlines()]
69
+ evals = []
70
+ for spec in args.eval:
71
+ name, folder = spec.split("=", 1)
72
+ evals.extend({**q, "set": name} for q in load_questions(folder))
73
+ print(f"{len(train)} training questions against {len(evals)} organiser questions from {args.eval}")
74
+
75
+ eval_keys = [key(q["question"]) for q in evals]
76
+ eval_shingles = [shingles(q["question"]) for q in evals]
77
+ eval_choices = [{key(c) for c in q["choices"]} for q in evals]
78
+ index, choice_index = {}, {}
79
+ for i, s in enumerate(eval_shingles):
80
+ for g in s:
81
+ index.setdefault(g, []).append(i)
82
+ for c in eval_choices[i]:
83
+ choice_index.setdefault(c, []).append(i)
84
+
85
+ vectors = embed([as_text(q) for q in train] + [as_text(q) for q in evals])
86
+ cosine = vectors[: len(train)] @ vectors[len(train) :].T
87
+
88
+ rows, excluded = [], []
89
+ for t, q in enumerate(train):
90
+ s = shingles(q["question"])
91
+ shared = {}
92
+ for g in s:
93
+ for i in index.get(g, ()):
94
+ shared[i] = shared.get(i, 0) + 1
95
+ choices = {key(c) for c in q["choices"]}
96
+ shared_choices = {}
97
+ for c in choices:
98
+ for i in choice_index.get(c, ()):
99
+ shared_choices[i] = shared_choices.get(i, 0) + 1
100
+ candidates = (
101
+ {i for i, n in shared.items()
102
+ if n / (len(s) + len(eval_shingles[i]) - n) >= 0.5 or n / min(len(s), len(eval_shingles[i])) >= 0.8}
103
+ | {i for i, n in shared_choices.items() if n >= 3}
104
+ | set(np.argsort(-cosine[t])[:5].tolist())
105
+ )
106
+ matches = []
107
+ for i in sorted(candidates):
108
+ n = shared.get(i, 0)
109
+ m = {
110
+ "question_key_equal": key(q["question"]) == eval_keys[i],
111
+ "jaccard": n / (len(s) + len(eval_shingles[i]) - n),
112
+ "containment": n / min(len(s), len(eval_shingles[i])),
113
+ "min_shingles": min(len(s), len(eval_shingles[i])),
114
+ "same_choices": len(choices & eval_choices[i]),
115
+ "cosine": float(cosine[t, i]),
116
+ }
117
+ m["rules"] = [name for name, rule in RULES.items() if rule(m)]
118
+ matches.append((i, m))
119
+ i, m = max(matches, key=lambda x: (len(x[1]["rules"]), x[1]["cosine"]))
120
+ if m["rules"] or m["cosine"] >= args.report_cosine:
121
+ rows.append({
122
+ "id": q["id"], "flagged": bool(m["rules"]), "rules": m["rules"],
123
+ "cosine": round(m["cosine"], 3), "jaccard": round(m["jaccard"], 3),
124
+ "containment": round(m["containment"], 3), "same_choices": m["same_choices"],
125
+ "train_question": q["question"], "train_choices": q["choices"],
126
+ "eval_set": evals[i]["set"], "eval_q_no": evals[i].get("q_no"), "eval_subject": evals[i].get("subject"),
127
+ "eval_question": evals[i]["question"], "eval_choices": evals[i]["choices"],
128
+ })
129
+ if m["rules"]:
130
+ excluded.append(q["id"])
131
+
132
+ rows.sort(key=lambda r: (not r["flagged"], -r["cosine"]))
133
+ out_dir = Path(args.out_dir)
134
+ out_dir.mkdir(parents=True, exist_ok=True)
135
+ (out_dir / "pairs.jsonl").write_text("".join(json.dumps(r, ensure_ascii=False) + "\n" for r in rows), encoding="utf-8")
136
+ (out_dir / "excluded_ids.txt").write_text("".join(i + "\n" for i in excluded), encoding="utf-8")
137
+ best = cosine.max(axis=1)
138
+ summary = {
139
+ "training_questions": len(train),
140
+ "organiser_questions": {spec: sum(q["set"] == spec.split("=")[0] for q in evals) for spec in args.eval},
141
+ "excluded": len(excluded),
142
+ "excluded_by_rule": {name: sum(name in r["rules"] for r in rows) for name in RULES},
143
+ "nearest_cosine_percentiles": {p: round(float(np.percentile(best, p)), 3) for p in (50, 90, 99, 99.9)},
144
+ "reported_below_threshold": sum(not r["flagged"] for r in rows),
145
+ }
146
+ (out_dir / "summary.json").write_text(json.dumps(summary, ensure_ascii=False, indent=1) + "\n", encoding="utf-8")
147
+ print(json.dumps(summary, ensure_ascii=False, indent=1))
148
+
149
+
150
+ if __name__ == "__main__":
151
+ main()
training/star.py ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import argparse
2
+ import json
3
+ import random
4
+ import re
5
+ from pathlib import Path
6
+
7
+ from predict import ANSWER_CUE, answer, argmax, load_model, normalise, score, thinking_text, user_prompt, write_jsonl
8
+
9
+ HINT_MENTION = re.compile(r"hint|ඉඟි|(?:given|provided|stated|suggested) answer", re.IGNORECASE)
10
+ SENTENCE_BREAK = re.compile(r"((?<=[.!?])\s+|\n+)")
11
+ MIN_KEPT_FRACTION = 0.5
12
+
13
+
14
+ def hinted_prompt(question):
15
+ gold = question["answer"]
16
+ hint = f"Hint: the correct answer is {gold}. {question['choices'][gold - 1]}"
17
+ return user_prompt(question).removesuffix(ANSWER_CUE) + hint + "\n" + ANSWER_CUE
18
+
19
+
20
+ def strip_hint(thought):
21
+ pieces = SENTENCE_BREAK.split(thought)
22
+ sentences = zip(pieces[0::2], pieces[1::2] + [""])
23
+ return "".join(s + sep for s, sep in sentences if not HINT_MENTION.search(s)).strip()
24
+
25
+
26
+ def attempt(model, tokenizer, questions, think, batch_size):
27
+ prompts = [user_prompt(q) for q in questions]
28
+ results = answer(model, tokenizer, prompts, [len(q["choices"]) for q in questions], think, batch_size)
29
+ attempts = [
30
+ {"id": q["id"], "gold": q["answer"], "pred": r["pred"], "finished": r["finished"],
31
+ "thought_tokens": r["thought_tokens"], "hinted": False, "thought": r["thought"]}
32
+ for q, r in zip(questions, results)
33
+ ]
34
+ kept = [
35
+ {"id": q["id"], "prompt": p, "thought": r["thought"], "answer": q["answer"], "source": "direct"}
36
+ for q, p, r in zip(questions, prompts, results)
37
+ if r["finished"] and r["pred"] == q["answer"]
38
+ ]
39
+ return attempts, kept
40
+
41
+
42
+ def rationalize(model, tokenizer, questions, think, batch_size):
43
+ n_choices = [len(q["choices"]) for q in questions]
44
+ prompts = [hinted_prompt(q) for q in questions]
45
+ results = answer(model, tokenizer, prompts, n_choices, think, batch_size)
46
+ cleaned = [strip_hint(r["thought"]) for r in results]
47
+ texts = [thinking_text(tokenizer, user_prompt(q), c) for q, c in zip(questions, cleaned)]
48
+ rescored = [argmax(p) + 1 for p in score(model, tokenizer, texts, n_choices, batch_size)]
49
+ attempts, kept = [], []
50
+ for q, r, c, pred in zip(questions, results, cleaned, rescored):
51
+ attempts.append(
52
+ {"id": q["id"], "gold": q["answer"], "pred": r["pred"], "finished": r["finished"],
53
+ "thought_tokens": r["thought_tokens"], "hinted": True, "thought": r["thought"],
54
+ "cleaned": c, "pred_without_hint": pred}
55
+ )
56
+ if (
57
+ r["finished"]
58
+ and r["pred"] == q["answer"]
59
+ and pred == q["answer"]
60
+ and len(c) >= MIN_KEPT_FRACTION * len(r["thought"])
61
+ ):
62
+ kept.append({"id": q["id"], "prompt": user_prompt(q), "thought": c, "answer": q["answer"],
63
+ "source": "rationalized"})
64
+ return attempts, kept
65
+
66
+
67
+ def main():
68
+ parser = argparse.ArgumentParser()
69
+ parser.add_argument("--model", default="google/gemma-4-E4B-it")
70
+ parser.add_argument("--revision", help="model commit to load; the latest one when not given")
71
+ parser.add_argument("--adapter", help="LoRA adapter that writes the thoughts, merged into the model")
72
+ parser.add_argument("--train", default="data/train/mcq.jsonl")
73
+ parser.add_argument("--n", type=int, help="sample this many questions with --seed; all of them when not given")
74
+ parser.add_argument("--seed", type=int, default=0)
75
+ parser.add_argument("--out_dir", default="star")
76
+ parser.add_argument("--think", type=int, default=512)
77
+ parser.add_argument("--batch_size", type=int, default=32)
78
+ parser.add_argument("--no_hint_retry", action="store_true", help="keep only first-try thoughts and skip the hinted retry")
79
+ args = parser.parse_args()
80
+ if args.think <= 0:
81
+ parser.error("--think must be positive, STaR keeps thoughts")
82
+
83
+ lines = Path(args.train).read_text(encoding="utf-8").splitlines()
84
+ questions = [normalise(json.loads(line)) for line in lines]
85
+ if args.n is not None:
86
+ questions = random.Random(args.seed).sample(questions, args.n)
87
+ print(f"Sampled {len(questions)} of {len(lines)} questions from {args.train} with seed {args.seed}")
88
+ else:
89
+ print(f"Using all {len(questions)} questions from {args.train}")
90
+
91
+ tokenizer, model = load_model(args.model, args.adapter, args.revision)
92
+ out_dir = Path(args.out_dir)
93
+ out_dir.mkdir(parents=True, exist_ok=True)
94
+
95
+ attempts, kept = attempt(model, tokenizer, questions, args.think, args.batch_size)
96
+ write_jsonl(out_dir / "attempts.jsonl", attempts)
97
+ write_jsonl(out_dir / "star.jsonl", kept)
98
+ print(f"Direct: kept {len(kept)}/{len(questions)}")
99
+ if args.no_hint_retry:
100
+ return
101
+
102
+ done = {row["id"] for row in kept}
103
+ missed = [q for q in questions if q["id"] not in done]
104
+ hinted_attempts, rationalized = rationalize(model, tokenizer, missed, args.think, args.batch_size)
105
+ write_jsonl(out_dir / "attempts.jsonl", attempts + hinted_attempts)
106
+ write_jsonl(out_dir / "star.jsonl", kept + rationalized)
107
+ print(f"Rationalized: kept {len(rationalized)}/{len(missed)}")
108
+ print(f"Wrote {len(kept) + len(rationalized)} examples to {out_dir / 'star.jsonl'}")
109
+
110
+
111
+ if __name__ == "__main__":
112
+ main()
training/train_log.json ADDED
@@ -0,0 +1,4626 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "config": {
3
+ "model": "google/gemma-4-E4B-it",
4
+ "revision": "ee0ef6023621cff504d758262d4e04895a5af4a2",
5
+ "data": "/kaggle/working/star3.jsonl",
6
+ "out_dir": "/kaggle/working/adapter",
7
+ "epochs": 2,
8
+ "lr": 0.0001,
9
+ "batch_size": 4,
10
+ "grad_accum": 4,
11
+ "max_length": 1024,
12
+ "rank": 16,
13
+ "alpha": 32,
14
+ "dropout": 0.05,
15
+ "seed": 0
16
+ },
17
+ "dtype": "torch.float16",
18
+ "grad_scaling": true,
19
+ "target_modules": 342,
20
+ "base_params": 7463013376,
21
+ "adapter_params": 38666240,
22
+ "total_params": 7501679616,
23
+ "examples": 4073,
24
+ "trained_examples": 4073,
25
+ "dropped_too_long": 0,
26
+ "dropped_misaligned": 0,
27
+ "skipped_steps": 0,
28
+ "seconds": 15551.6,
29
+ "tokens_per_s": 317.6,
30
+ "peak_memory_gb": [
31
+ 10.56,
32
+ 6.99
33
+ ],
34
+ "steps": [
35
+ {
36
+ "step": 1,
37
+ "epoch": 0,
38
+ "loss": 0.19640883523944777,
39
+ "lr": 0.0,
40
+ "grad_norm": 0.4852641522884369,
41
+ "skipped": false,
42
+ "seconds": 29.4
43
+ },
44
+ {
45
+ "step": 2,
46
+ "epoch": 0,
47
+ "loss": 0.2024406308274182,
48
+ "lr": 6.666666666666667e-06,
49
+ "grad_norm": 0.48907169699668884,
50
+ "skipped": false,
51
+ "seconds": 58.9
52
+ },
53
+ {
54
+ "step": 3,
55
+ "epoch": 0,
56
+ "loss": 0.20496504929589732,
57
+ "lr": 1.3333333333333333e-05,
58
+ "grad_norm": 0.5109589695930481,
59
+ "skipped": false,
60
+ "seconds": 89.4
61
+ },
62
+ {
63
+ "step": 4,
64
+ "epoch": 0,
65
+ "loss": 0.20524678683676226,
66
+ "lr": 2e-05,
67
+ "grad_norm": 0.5412611365318298,
68
+ "skipped": false,
69
+ "seconds": 120.8
70
+ },
71
+ {
72
+ "step": 5,
73
+ "epoch": 0,
74
+ "loss": 0.16709267570479677,
75
+ "lr": 2.6666666666666667e-05,
76
+ "grad_norm": 0.5452609658241272,
77
+ "skipped": false,
78
+ "seconds": 151.0
79
+ },
80
+ {
81
+ "step": 6,
82
+ "epoch": 0,
83
+ "loss": 0.15597860216284942,
84
+ "lr": 3.3333333333333335e-05,
85
+ "grad_norm": 0.4582180082798004,
86
+ "skipped": false,
87
+ "seconds": 180.9
88
+ },
89
+ {
90
+ "step": 7,
91
+ "epoch": 0,
92
+ "loss": 0.14760536539304112,
93
+ "lr": 4e-05,
94
+ "grad_norm": 0.3433503210544586,
95
+ "skipped": false,
96
+ "seconds": 210.8
97
+ },
98
+ {
99
+ "step": 8,
100
+ "epoch": 0,
101
+ "loss": 0.14063837973937082,
102
+ "lr": 4.666666666666667e-05,
103
+ "grad_norm": 0.304032564163208,
104
+ "skipped": false,
105
+ "seconds": 241.3
106
+ },
107
+ {
108
+ "step": 9,
109
+ "epoch": 0,
110
+ "loss": 0.15517175885577025,
111
+ "lr": 5.333333333333333e-05,
112
+ "grad_norm": 0.2853395938873291,
113
+ "skipped": false,
114
+ "seconds": 271.0
115
+ },
116
+ {
117
+ "step": 10,
118
+ "epoch": 0,
119
+ "loss": 0.12460355233487874,
120
+ "lr": 6e-05,
121
+ "grad_norm": 0.26190483570098877,
122
+ "skipped": false,
123
+ "seconds": 301.3
124
+ },
125
+ {
126
+ "step": 11,
127
+ "epoch": 0,
128
+ "loss": 0.13429050899623296,
129
+ "lr": 6.666666666666667e-05,
130
+ "grad_norm": 0.2822328805923462,
131
+ "skipped": false,
132
+ "seconds": 332.0
133
+ },
134
+ {
135
+ "step": 12,
136
+ "epoch": 0,
137
+ "loss": 0.10786084480626937,
138
+ "lr": 7.333333333333333e-05,
139
+ "grad_norm": 0.2527726888656616,
140
+ "skipped": false,
141
+ "seconds": 360.5
142
+ },
143
+ {
144
+ "step": 13,
145
+ "epoch": 0,
146
+ "loss": 0.09978185194823579,
147
+ "lr": 8e-05,
148
+ "grad_norm": 0.23101957142353058,
149
+ "skipped": false,
150
+ "seconds": 391.4
151
+ },
152
+ {
153
+ "step": 14,
154
+ "epoch": 0,
155
+ "loss": 0.10522525868517288,
156
+ "lr": 8.666666666666667e-05,
157
+ "grad_norm": 0.2543775737285614,
158
+ "skipped": false,
159
+ "seconds": 422.5
160
+ },
161
+ {
162
+ "step": 15,
163
+ "epoch": 0,
164
+ "loss": 0.08935808227175758,
165
+ "lr": 9.333333333333334e-05,
166
+ "grad_norm": 0.24526648223400116,
167
+ "skipped": false,
168
+ "seconds": 452.1
169
+ },
170
+ {
171
+ "step": 16,
172
+ "epoch": 0,
173
+ "loss": 0.10548639101148338,
174
+ "lr": 0.0001,
175
+ "grad_norm": 0.30216461420059204,
176
+ "skipped": false,
177
+ "seconds": 484.5
178
+ },
179
+ {
180
+ "step": 17,
181
+ "epoch": 0,
182
+ "loss": 0.0861717793149071,
183
+ "lr": 9.999899300364532e-05,
184
+ "grad_norm": 0.26806312799453735,
185
+ "skipped": false,
186
+ "seconds": 515.7
187
+ },
188
+ {
189
+ "step": 18,
190
+ "epoch": 0,
191
+ "loss": 0.08647315657249598,
192
+ "lr": 9.999597205514297e-05,
193
+ "grad_norm": 0.3897492587566376,
194
+ "skipped": false,
195
+ "seconds": 546.5
196
+ },
197
+ {
198
+ "step": 19,
199
+ "epoch": 0,
200
+ "loss": 0.07331878050296768,
201
+ "lr": 9.99909372761763e-05,
202
+ "grad_norm": 0.2865033745765686,
203
+ "skipped": false,
204
+ "seconds": 575.8
205
+ },
206
+ {
207
+ "step": 20,
208
+ "epoch": 0,
209
+ "loss": 0.0808455167275755,
210
+ "lr": 9.998388886954547e-05,
211
+ "grad_norm": 0.3762819170951843,
212
+ "skipped": false,
213
+ "seconds": 604.1
214
+ },
215
+ {
216
+ "step": 21,
217
+ "epoch": 0,
218
+ "loss": 0.08293077495736136,
219
+ "lr": 9.997482711915927e-05,
220
+ "grad_norm": 0.3262479901313782,
221
+ "skipped": false,
222
+ "seconds": 635.3
223
+ },
224
+ {
225
+ "step": 22,
226
+ "epoch": 0,
227
+ "loss": 0.0765426305353788,
228
+ "lr": 9.996375239002369e-05,
229
+ "grad_norm": 0.36088672280311584,
230
+ "skipped": false,
231
+ "seconds": 664.5
232
+ },
233
+ {
234
+ "step": 23,
235
+ "epoch": 0,
236
+ "loss": 0.08666027548914276,
237
+ "lr": 9.99506651282272e-05,
238
+ "grad_norm": 0.5469640493392944,
239
+ "skipped": false,
240
+ "seconds": 695.4
241
+ },
242
+ {
243
+ "step": 24,
244
+ "epoch": 0,
245
+ "loss": 0.08630259219662725,
246
+ "lr": 9.993556586092281e-05,
247
+ "grad_norm": 0.456892192363739,
248
+ "skipped": false,
249
+ "seconds": 728.2
250
+ },
251
+ {
252
+ "step": 25,
253
+ "epoch": 0,
254
+ "loss": 0.0724076038978558,
255
+ "lr": 9.991845519630678e-05,
256
+ "grad_norm": 0.39262059330940247,
257
+ "skipped": false,
258
+ "seconds": 758.8
259
+ },
260
+ {
261
+ "step": 26,
262
+ "epoch": 0,
263
+ "loss": 0.07770107819389818,
264
+ "lr": 9.989933382359422e-05,
265
+ "grad_norm": 0.4262242317199707,
266
+ "skipped": false,
267
+ "seconds": 791.2
268
+ },
269
+ {
270
+ "step": 27,
271
+ "epoch": 0,
272
+ "loss": 0.06933413065568625,
273
+ "lr": 9.987820251299122e-05,
274
+ "grad_norm": 0.46644866466522217,
275
+ "skipped": false,
276
+ "seconds": 821.9
277
+ },
278
+ {
279
+ "step": 28,
280
+ "epoch": 0,
281
+ "loss": 0.065214456355704,
282
+ "lr": 9.985506211566388e-05,
283
+ "grad_norm": 0.9025358557701111,
284
+ "skipped": false,
285
+ "seconds": 852.3
286
+ },
287
+ {
288
+ "step": 29,
289
+ "epoch": 0,
290
+ "loss": 0.06811053849340527,
291
+ "lr": 9.982991356370404e-05,
292
+ "grad_norm": 0.4470258355140686,
293
+ "skipped": false,
294
+ "seconds": 881.8
295
+ },
296
+ {
297
+ "step": 30,
298
+ "epoch": 0,
299
+ "loss": 0.053144117122032736,
300
+ "lr": 9.98027578700917e-05,
301
+ "grad_norm": 0.38273853063583374,
302
+ "skipped": false,
303
+ "seconds": 912.0
304
+ },
305
+ {
306
+ "step": 31,
307
+ "epoch": 0,
308
+ "loss": 0.05634953098012355,
309
+ "lr": 9.977359612865423e-05,
310
+ "grad_norm": 0.4882364273071289,
311
+ "skipped": false,
312
+ "seconds": 941.3
313
+ },
314
+ {
315
+ "step": 32,
316
+ "epoch": 0,
317
+ "loss": 0.055631592902682075,
318
+ "lr": 9.974242951402235e-05,
319
+ "grad_norm": 0.3918277621269226,
320
+ "skipped": false,
321
+ "seconds": 971.1
322
+ },
323
+ {
324
+ "step": 33,
325
+ "epoch": 0,
326
+ "loss": 0.07527670451454374,
327
+ "lr": 9.970925928158274e-05,
328
+ "grad_norm": 0.5305290222167969,
329
+ "skipped": false,
330
+ "seconds": 1002.1
331
+ },
332
+ {
333
+ "step": 34,
334
+ "epoch": 0,
335
+ "loss": 0.05458790223464191,
336
+ "lr": 9.967408676742751e-05,
337
+ "grad_norm": 0.4513584077358246,
338
+ "skipped": false,
339
+ "seconds": 1031.2
340
+ },
341
+ {
342
+ "step": 35,
343
+ "epoch": 0,
344
+ "loss": 0.050869956201693954,
345
+ "lr": 9.963691338830044e-05,
346
+ "grad_norm": 0.36274057626724243,
347
+ "skipped": false,
348
+ "seconds": 1061.9
349
+ },
350
+ {
351
+ "step": 36,
352
+ "epoch": 0,
353
+ "loss": 0.0570102071433521,
354
+ "lr": 9.959774064153977e-05,
355
+ "grad_norm": 0.42373621463775635,
356
+ "skipped": false,
357
+ "seconds": 1091.4
358
+ },
359
+ {
360
+ "step": 37,
361
+ "epoch": 0,
362
+ "loss": 0.05033422113724285,
363
+ "lr": 9.955657010501806e-05,
364
+ "grad_norm": 0.46532633900642395,
365
+ "skipped": false,
366
+ "seconds": 1121.0
367
+ },
368
+ {
369
+ "step": 38,
370
+ "epoch": 0,
371
+ "loss": 0.054250309157325254,
372
+ "lr": 9.951340343707852e-05,
373
+ "grad_norm": 0.5128265023231506,
374
+ "skipped": false,
375
+ "seconds": 1150.8
376
+ },
377
+ {
378
+ "step": 39,
379
+ "epoch": 0,
380
+ "loss": 0.051204504607117715,
381
+ "lr": 9.946824237646824e-05,
382
+ "grad_norm": 0.3985678553581238,
383
+ "skipped": false,
384
+ "seconds": 1181.8
385
+ },
386
+ {
387
+ "step": 40,
388
+ "epoch": 0,
389
+ "loss": 0.06049295101113949,
390
+ "lr": 9.942108874226811e-05,
391
+ "grad_norm": 0.525611400604248,
392
+ "skipped": false,
393
+ "seconds": 1212.5
394
+ },
395
+ {
396
+ "step": 41,
397
+ "epoch": 0,
398
+ "loss": 0.05473621184691105,
399
+ "lr": 9.937194443381972e-05,
400
+ "grad_norm": 0.503436803817749,
401
+ "skipped": false,
402
+ "seconds": 1242.8
403
+ },
404
+ {
405
+ "step": 42,
406
+ "epoch": 0,
407
+ "loss": 0.05886410636377241,
408
+ "lr": 9.93208114306486e-05,
409
+ "grad_norm": 0.47664114832878113,
410
+ "skipped": false,
411
+ "seconds": 1274.4
412
+ },
413
+ {
414
+ "step": 43,
415
+ "epoch": 0,
416
+ "loss": 0.05740216232730541,
417
+ "lr": 9.926769179238466e-05,
418
+ "grad_norm": 0.994827389717102,
419
+ "skipped": false,
420
+ "seconds": 1304.9
421
+ },
422
+ {
423
+ "step": 44,
424
+ "epoch": 0,
425
+ "loss": 0.05837026187973685,
426
+ "lr": 9.921258765867919e-05,
427
+ "grad_norm": 0.47819700837135315,
428
+ "skipped": false,
429
+ "seconds": 1335.1
430
+ },
431
+ {
432
+ "step": 45,
433
+ "epoch": 0,
434
+ "loss": 0.048231410801350474,
435
+ "lr": 9.915550124911866e-05,
436
+ "grad_norm": 0.41990071535110474,
437
+ "skipped": false,
438
+ "seconds": 1366.3
439
+ },
440
+ {
441
+ "step": 46,
442
+ "epoch": 0,
443
+ "loss": 0.04562145920400366,
444
+ "lr": 9.909643486313533e-05,
445
+ "grad_norm": 0.3867731988430023,
446
+ "skipped": false,
447
+ "seconds": 1396.0
448
+ },
449
+ {
450
+ "step": 47,
451
+ "epoch": 0,
452
+ "loss": 0.04700247855921044,
453
+ "lr": 9.903539087991462e-05,
454
+ "grad_norm": 0.4377094805240631,
455
+ "skipped": false,
456
+ "seconds": 1427.3
457
+ },
458
+ {
459
+ "step": 48,
460
+ "epoch": 0,
461
+ "loss": 0.04771211157444897,
462
+ "lr": 9.897237175829926e-05,
463
+ "grad_norm": 0.4685591757297516,
464
+ "skipped": false,
465
+ "seconds": 1457.2
466
+ },
467
+ {
468
+ "step": 49,
469
+ "epoch": 0,
470
+ "loss": 0.0489195060784648,
471
+ "lr": 9.890738003669029e-05,
472
+ "grad_norm": 0.4277944564819336,
473
+ "skipped": false,
474
+ "seconds": 1487.9
475
+ },
476
+ {
477
+ "step": 50,
478
+ "epoch": 0,
479
+ "loss": 0.05864074655654856,
480
+ "lr": 9.884041833294476e-05,
481
+ "grad_norm": 0.45892971754074097,
482
+ "skipped": false,
483
+ "seconds": 1519.0
484
+ },
485
+ {
486
+ "step": 51,
487
+ "epoch": 0,
488
+ "loss": 0.04818263103261309,
489
+ "lr": 9.877148934427037e-05,
490
+ "grad_norm": 0.39819756150245667,
491
+ "skipped": false,
492
+ "seconds": 1552.3
493
+ },
494
+ {
495
+ "step": 52,
496
+ "epoch": 0,
497
+ "loss": 0.05366593056003958,
498
+ "lr": 9.870059584711668e-05,
499
+ "grad_norm": 0.6030884385108948,
500
+ "skipped": false,
501
+ "seconds": 1581.7
502
+ },
503
+ {
504
+ "step": 53,
505
+ "epoch": 0,
506
+ "loss": 0.043071207878591276,
507
+ "lr": 9.862774069706346e-05,
508
+ "grad_norm": 0.37357521057128906,
509
+ "skipped": false,
510
+ "seconds": 1614.2
511
+ },
512
+ {
513
+ "step": 54,
514
+ "epoch": 0,
515
+ "loss": 0.04875012851107735,
516
+ "lr": 9.855292682870551e-05,
517
+ "grad_norm": 0.4176650047302246,
518
+ "skipped": false,
519
+ "seconds": 1645.7
520
+ },
521
+ {
522
+ "step": 55,
523
+ "epoch": 0,
524
+ "loss": 0.05916158294450872,
525
+ "lr": 9.847615725553456e-05,
526
+ "grad_norm": 0.5978649258613586,
527
+ "skipped": false,
528
+ "seconds": 1675.6
529
+ },
530
+ {
531
+ "step": 56,
532
+ "epoch": 0,
533
+ "loss": 0.058098166422967945,
534
+ "lr": 9.839743506981782e-05,
535
+ "grad_norm": 0.42823487520217896,
536
+ "skipped": false,
537
+ "seconds": 1706.4
538
+ },
539
+ {
540
+ "step": 57,
541
+ "epoch": 0,
542
+ "loss": 0.045172476261220076,
543
+ "lr": 9.831676344247342e-05,
544
+ "grad_norm": 0.4181194603443146,
545
+ "skipped": false,
546
+ "seconds": 1737.6
547
+ },
548
+ {
549
+ "step": 58,
550
+ "epoch": 0,
551
+ "loss": 0.05060952837004283,
552
+ "lr": 9.82341456229428e-05,
553
+ "grad_norm": 0.5255125761032104,
554
+ "skipped": false,
555
+ "seconds": 1765.9
556
+ },
557
+ {
558
+ "step": 59,
559
+ "epoch": 0,
560
+ "loss": 0.05047130558174233,
561
+ "lr": 9.814958493905963e-05,
562
+ "grad_norm": 0.43823546171188354,
563
+ "skipped": false,
564
+ "seconds": 1797.2
565
+ },
566
+ {
567
+ "step": 60,
568
+ "epoch": 0,
569
+ "loss": 0.0491023870761557,
570
+ "lr": 9.806308479691595e-05,
571
+ "grad_norm": 0.4243999719619751,
572
+ "skipped": false,
573
+ "seconds": 1828.1
574
+ },
575
+ {
576
+ "step": 61,
577
+ "epoch": 0,
578
+ "loss": 0.043288892164662245,
579
+ "lr": 9.797464868072488e-05,
580
+ "grad_norm": 0.4273908734321594,
581
+ "skipped": false,
582
+ "seconds": 1857.9
583
+ },
584
+ {
585
+ "step": 62,
586
+ "epoch": 0,
587
+ "loss": 0.04162379607413579,
588
+ "lr": 9.788428015268027e-05,
589
+ "grad_norm": 0.45563948154449463,
590
+ "skipped": false,
591
+ "seconds": 1887.6
592
+ },
593
+ {
594
+ "step": 63,
595
+ "epoch": 0,
596
+ "loss": 0.046959113067771105,
597
+ "lr": 9.779198285281325e-05,
598
+ "grad_norm": 0.5101006031036377,
599
+ "skipped": false,
600
+ "seconds": 1919.9
601
+ },
602
+ {
603
+ "step": 64,
604
+ "epoch": 0,
605
+ "loss": 0.04868613549499087,
606
+ "lr": 9.769776049884563e-05,
607
+ "grad_norm": 0.4730517864227295,
608
+ "skipped": false,
609
+ "seconds": 1951.2
610
+ },
611
+ {
612
+ "step": 65,
613
+ "epoch": 0,
614
+ "loss": 0.052818452819319794,
615
+ "lr": 9.760161688604008e-05,
616
+ "grad_norm": 0.4125804007053375,
617
+ "skipped": false,
618
+ "seconds": 1982.8
619
+ },
620
+ {
621
+ "step": 66,
622
+ "epoch": 0,
623
+ "loss": 0.04659271240234375,
624
+ "lr": 9.750355588704727e-05,
625
+ "grad_norm": 0.45149803161621094,
626
+ "skipped": false,
627
+ "seconds": 2013.5
628
+ },
629
+ {
630
+ "step": 67,
631
+ "epoch": 0,
632
+ "loss": 0.04500601429651194,
633
+ "lr": 9.740358145174998e-05,
634
+ "grad_norm": 0.44188907742500305,
635
+ "skipped": false,
636
+ "seconds": 2045.2
637
+ },
638
+ {
639
+ "step": 68,
640
+ "epoch": 0,
641
+ "loss": 0.046970408207588896,
642
+ "lr": 9.730169760710386e-05,
643
+ "grad_norm": 0.5863640904426575,
644
+ "skipped": false,
645
+ "seconds": 2076.5
646
+ },
647
+ {
648
+ "step": 69,
649
+ "epoch": 0,
650
+ "loss": 0.044865242302458606,
651
+ "lr": 9.719790845697533e-05,
652
+ "grad_norm": 0.39309433102607727,
653
+ "skipped": false,
654
+ "seconds": 2108.1
655
+ },
656
+ {
657
+ "step": 70,
658
+ "epoch": 0,
659
+ "loss": 0.04593456075913328,
660
+ "lr": 9.709221818197624e-05,
661
+ "grad_norm": 0.44956448674201965,
662
+ "skipped": false,
663
+ "seconds": 2139.3
664
+ },
665
+ {
666
+ "step": 71,
667
+ "epoch": 0,
668
+ "loss": 0.045809862771893126,
669
+ "lr": 9.698463103929542e-05,
670
+ "grad_norm": 0.48698508739471436,
671
+ "skipped": false,
672
+ "seconds": 2170.5
673
+ },
674
+ {
675
+ "step": 72,
676
+ "epoch": 0,
677
+ "loss": 0.044335218049706415,
678
+ "lr": 9.687515136252731e-05,
679
+ "grad_norm": 0.536542534828186,
680
+ "skipped": false,
681
+ "seconds": 2201.8
682
+ },
683
+ {
684
+ "step": 73,
685
+ "epoch": 0,
686
+ "loss": 0.034864149286479816,
687
+ "lr": 9.676378356149734e-05,
688
+ "grad_norm": 0.36436447501182556,
689
+ "skipped": false,
690
+ "seconds": 2231.0
691
+ },
692
+ {
693
+ "step": 74,
694
+ "epoch": 0,
695
+ "loss": 0.043896083493069775,
696
+ "lr": 9.665053212208426e-05,
697
+ "grad_norm": 0.4838595688343048,
698
+ "skipped": false,
699
+ "seconds": 2260.5
700
+ },
701
+ {
702
+ "step": 75,
703
+ "epoch": 0,
704
+ "loss": 0.04309926780932544,
705
+ "lr": 9.653540160603956e-05,
706
+ "grad_norm": 0.4336928725242615,
707
+ "skipped": false,
708
+ "seconds": 2291.4
709
+ },
710
+ {
711
+ "step": 76,
712
+ "epoch": 0,
713
+ "loss": 0.049297388306396996,
714
+ "lr": 9.641839665080363e-05,
715
+ "grad_norm": 0.4917004406452179,
716
+ "skipped": false,
717
+ "seconds": 2320.4
718
+ },
719
+ {
720
+ "step": 77,
721
+ "epoch": 0,
722
+ "loss": 0.04662362143164262,
723
+ "lr": 9.629952196931901e-05,
724
+ "grad_norm": 0.7901037335395813,
725
+ "skipped": false,
726
+ "seconds": 2350.6
727
+ },
728
+ {
729
+ "step": 78,
730
+ "epoch": 0,
731
+ "loss": 0.04559790509483134,
732
+ "lr": 9.617878234984055e-05,
733
+ "grad_norm": 0.48896324634552,
734
+ "skipped": false,
735
+ "seconds": 2381.8
736
+ },
737
+ {
738
+ "step": 79,
739
+ "epoch": 0,
740
+ "loss": 0.041544652383531604,
741
+ "lr": 9.60561826557425e-05,
742
+ "grad_norm": 0.43355318903923035,
743
+ "skipped": false,
744
+ "seconds": 2411.3
745
+ },
746
+ {
747
+ "step": 80,
748
+ "epoch": 0,
749
+ "loss": 0.04375480673779016,
750
+ "lr": 9.593172782532268e-05,
751
+ "grad_norm": 0.4469282031059265,
752
+ "skipped": false,
753
+ "seconds": 2442.5
754
+ },
755
+ {
756
+ "step": 81,
757
+ "epoch": 0,
758
+ "loss": 0.043051442354047106,
759
+ "lr": 9.580542287160348e-05,
760
+ "grad_norm": 0.4262138903141022,
761
+ "skipped": false,
762
+ "seconds": 2474.1
763
+ },
764
+ {
765
+ "step": 82,
766
+ "epoch": 0,
767
+ "loss": 0.05389878683908257,
768
+ "lr": 9.567727288213005e-05,
769
+ "grad_norm": 0.533173680305481,
770
+ "skipped": false,
771
+ "seconds": 2505.5
772
+ },
773
+ {
774
+ "step": 83,
775
+ "epoch": 0,
776
+ "loss": 0.04077400034217979,
777
+ "lr": 9.554728301876526e-05,
778
+ "grad_norm": 0.4008263349533081,
779
+ "skipped": false,
780
+ "seconds": 2538.1
781
+ },
782
+ {
783
+ "step": 84,
784
+ "epoch": 0,
785
+ "loss": 0.042045998732131294,
786
+ "lr": 9.541545851748186e-05,
787
+ "grad_norm": 0.4874799847602844,
788
+ "skipped": false,
789
+ "seconds": 2568.2
790
+ },
791
+ {
792
+ "step": 85,
793
+ "epoch": 0,
794
+ "loss": 0.042924036080179126,
795
+ "lr": 9.528180468815155e-05,
796
+ "grad_norm": 0.4657498896121979,
797
+ "skipped": false,
798
+ "seconds": 2599.4
799
+ },
800
+ {
801
+ "step": 86,
802
+ "epoch": 0,
803
+ "loss": 0.04021313511834994,
804
+ "lr": 9.514632691433107e-05,
805
+ "grad_norm": 0.4809572398662567,
806
+ "skipped": false,
807
+ "seconds": 2628.6
808
+ },
809
+ {
810
+ "step": 87,
811
+ "epoch": 0,
812
+ "loss": 0.04092615930167263,
813
+ "lr": 9.50090306530454e-05,
814
+ "grad_norm": 0.48094093799591064,
815
+ "skipped": false,
816
+ "seconds": 2660.8
817
+ },
818
+ {
819
+ "step": 88,
820
+ "epoch": 0,
821
+ "loss": 0.0385408574271613,
822
+ "lr": 9.486992143456792e-05,
823
+ "grad_norm": 0.47969570755958557,
824
+ "skipped": false,
825
+ "seconds": 2690.8
826
+ },
827
+ {
828
+ "step": 89,
829
+ "epoch": 0,
830
+ "loss": 0.040967103461144676,
831
+ "lr": 9.472900486219769e-05,
832
+ "grad_norm": 0.4366934597492218,
833
+ "skipped": false,
834
+ "seconds": 2721.1
835
+ },
836
+ {
837
+ "step": 90,
838
+ "epoch": 0,
839
+ "loss": 0.047251623422032964,
840
+ "lr": 9.458628661203367e-05,
841
+ "grad_norm": 0.48443788290023804,
842
+ "skipped": false,
843
+ "seconds": 2752.0
844
+ },
845
+ {
846
+ "step": 91,
847
+ "epoch": 0,
848
+ "loss": 0.0382828146632823,
849
+ "lr": 9.444177243274618e-05,
850
+ "grad_norm": 0.4706588685512543,
851
+ "skipped": false,
852
+ "seconds": 2783.3
853
+ },
854
+ {
855
+ "step": 92,
856
+ "epoch": 0,
857
+ "loss": 0.04608729774082383,
858
+ "lr": 9.429546814534529e-05,
859
+ "grad_norm": 0.44139933586120605,
860
+ "skipped": false,
861
+ "seconds": 2813.4
862
+ },
863
+ {
864
+ "step": 93,
865
+ "epoch": 0,
866
+ "loss": 0.04839884853088036,
867
+ "lr": 9.414737964294636e-05,
868
+ "grad_norm": 0.4453069567680359,
869
+ "skipped": false,
870
+ "seconds": 2843.4
871
+ },
872
+ {
873
+ "step": 94,
874
+ "epoch": 0,
875
+ "loss": 0.0385095516794599,
876
+ "lr": 9.399751289053267e-05,
877
+ "grad_norm": 0.42764177918434143,
878
+ "skipped": false,
879
+ "seconds": 2874.1
880
+ },
881
+ {
882
+ "step": 95,
883
+ "epoch": 0,
884
+ "loss": 0.03839392269232086,
885
+ "lr": 9.384587392471515e-05,
886
+ "grad_norm": 0.4124580919742584,
887
+ "skipped": false,
888
+ "seconds": 2905.1
889
+ },
890
+ {
891
+ "step": 96,
892
+ "epoch": 0,
893
+ "loss": 0.043852357471378486,
894
+ "lr": 9.369246885348926e-05,
895
+ "grad_norm": 0.47256457805633545,
896
+ "skipped": false,
897
+ "seconds": 2936.3
898
+ },
899
+ {
900
+ "step": 97,
901
+ "epoch": 0,
902
+ "loss": 0.041886468532681916,
903
+ "lr": 9.353730385598887e-05,
904
+ "grad_norm": 0.4709848165512085,
905
+ "skipped": false,
906
+ "seconds": 2965.5
907
+ },
908
+ {
909
+ "step": 98,
910
+ "epoch": 0,
911
+ "loss": 0.044607980541999256,
912
+ "lr": 9.338038518223747e-05,
913
+ "grad_norm": 0.42527738213539124,
914
+ "skipped": false,
915
+ "seconds": 2995.5
916
+ },
917
+ {
918
+ "step": 99,
919
+ "epoch": 0,
920
+ "loss": 0.04058560680755121,
921
+ "lr": 9.322171915289635e-05,
922
+ "grad_norm": 0.41362443566322327,
923
+ "skipped": false,
924
+ "seconds": 3026.1
925
+ },
926
+ {
927
+ "step": 100,
928
+ "epoch": 0,
929
+ "loss": 0.036925773563923486,
930
+ "lr": 9.306131215901003e-05,
931
+ "grad_norm": 0.39879411458969116,
932
+ "skipped": false,
933
+ "seconds": 3056.0
934
+ },
935
+ {
936
+ "step": 101,
937
+ "epoch": 0,
938
+ "loss": 0.04319861298706494,
939
+ "lr": 9.289917066174886e-05,
940
+ "grad_norm": 0.45430848002433777,
941
+ "skipped": false,
942
+ "seconds": 3085.9
943
+ },
944
+ {
945
+ "step": 102,
946
+ "epoch": 0,
947
+ "loss": 0.038103842340568954,
948
+ "lr": 9.273530119214868e-05,
949
+ "grad_norm": 1.6617456674575806,
950
+ "skipped": false,
951
+ "seconds": 3117.3
952
+ },
953
+ {
954
+ "step": 103,
955
+ "epoch": 0,
956
+ "loss": 0.04705844420699579,
957
+ "lr": 9.256971035084785e-05,
958
+ "grad_norm": 0.5413803458213806,
959
+ "skipped": false,
960
+ "seconds": 3148.0
961
+ },
962
+ {
963
+ "step": 104,
964
+ "epoch": 0,
965
+ "loss": 0.04588349056332997,
966
+ "lr": 9.24024048078213e-05,
967
+ "grad_norm": 0.48643723130226135,
968
+ "skipped": false,
969
+ "seconds": 3176.6
970
+ },
971
+ {
972
+ "step": 105,
973
+ "epoch": 0,
974
+ "loss": 0.03868896050454584,
975
+ "lr": 9.223339130211192e-05,
976
+ "grad_norm": 0.4337347447872162,
977
+ "skipped": false,
978
+ "seconds": 3207.2
979
+ },
980
+ {
981
+ "step": 106,
982
+ "epoch": 0,
983
+ "loss": 0.036370536171722645,
984
+ "lr": 9.206267664155907e-05,
985
+ "grad_norm": 0.41438397765159607,
986
+ "skipped": false,
987
+ "seconds": 3236.2
988
+ },
989
+ {
990
+ "step": 107,
991
+ "epoch": 0,
992
+ "loss": 0.045510898442028866,
993
+ "lr": 9.189026770252436e-05,
994
+ "grad_norm": 0.4909036159515381,
995
+ "skipped": false,
996
+ "seconds": 3266.4
997
+ },
998
+ {
999
+ "step": 108,
1000
+ "epoch": 0,
1001
+ "loss": 0.041277409169551436,
1002
+ "lr": 9.171617142961477e-05,
1003
+ "grad_norm": 0.506044864654541,
1004
+ "skipped": false,
1005
+ "seconds": 3295.5
1006
+ },
1007
+ {
1008
+ "step": 109,
1009
+ "epoch": 0,
1010
+ "loss": 0.048108986375681596,
1011
+ "lr": 9.154039483540273e-05,
1012
+ "grad_norm": 0.8060802221298218,
1013
+ "skipped": false,
1014
+ "seconds": 3325.8
1015
+ },
1016
+ {
1017
+ "step": 110,
1018
+ "epoch": 0,
1019
+ "loss": 0.04355858804628586,
1020
+ "lr": 9.136294500014386e-05,
1021
+ "grad_norm": 0.4543282687664032,
1022
+ "skipped": false,
1023
+ "seconds": 3356.2
1024
+ },
1025
+ {
1026
+ "step": 111,
1027
+ "epoch": 0,
1028
+ "loss": 0.038672522803189745,
1029
+ "lr": 9.118382907149165e-05,
1030
+ "grad_norm": 0.40678146481513977,
1031
+ "skipped": false,
1032
+ "seconds": 3387.2
1033
+ },
1034
+ {
1035
+ "step": 112,
1036
+ "epoch": 0,
1037
+ "loss": 0.042898832788448915,
1038
+ "lr": 9.100305426420956e-05,
1039
+ "grad_norm": 0.46925193071365356,
1040
+ "skipped": false,
1041
+ "seconds": 3415.2
1042
+ },
1043
+ {
1044
+ "step": 113,
1045
+ "epoch": 0,
1046
+ "loss": 0.044555553183160804,
1047
+ "lr": 9.082062785988049e-05,
1048
+ "grad_norm": 0.4316609501838684,
1049
+ "skipped": false,
1050
+ "seconds": 3445.5
1051
+ },
1052
+ {
1053
+ "step": 114,
1054
+ "epoch": 0,
1055
+ "loss": 0.05310061437274338,
1056
+ "lr": 9.06365572066134e-05,
1057
+ "grad_norm": 0.47825491428375244,
1058
+ "skipped": false,
1059
+ "seconds": 3476.2
1060
+ },
1061
+ {
1062
+ "step": 115,
1063
+ "epoch": 0,
1064
+ "loss": 0.039852327125268344,
1065
+ "lr": 9.045084971874738e-05,
1066
+ "grad_norm": 0.4318072199821472,
1067
+ "skipped": false,
1068
+ "seconds": 3507.8
1069
+ },
1070
+ {
1071
+ "step": 116,
1072
+ "epoch": 0,
1073
+ "loss": 0.04183180106903781,
1074
+ "lr": 9.026351287655294e-05,
1075
+ "grad_norm": 0.41331470012664795,
1076
+ "skipped": false,
1077
+ "seconds": 3540.0
1078
+ },
1079
+ {
1080
+ "step": 117,
1081
+ "epoch": 0,
1082
+ "loss": 0.03974040917733554,
1083
+ "lr": 9.007455422593077e-05,
1084
+ "grad_norm": 0.5103293657302856,
1085
+ "skipped": false,
1086
+ "seconds": 3570.9
1087
+ },
1088
+ {
1089
+ "step": 118,
1090
+ "epoch": 0,
1091
+ "loss": 0.044967052919180975,
1092
+ "lr": 8.988398137810777e-05,
1093
+ "grad_norm": 0.4268462359905243,
1094
+ "skipped": false,
1095
+ "seconds": 3602.0
1096
+ },
1097
+ {
1098
+ "step": 119,
1099
+ "epoch": 0,
1100
+ "loss": 0.036238125160800834,
1101
+ "lr": 8.969180200933047e-05,
1102
+ "grad_norm": 0.3959253132343292,
1103
+ "skipped": false,
1104
+ "seconds": 3634.4
1105
+ },
1106
+ {
1107
+ "step": 120,
1108
+ "epoch": 0,
1109
+ "loss": 0.03730900039784556,
1110
+ "lr": 8.949802386055581e-05,
1111
+ "grad_norm": 0.4061117172241211,
1112
+ "skipped": false,
1113
+ "seconds": 3665.0
1114
+ },
1115
+ {
1116
+ "step": 121,
1117
+ "epoch": 0,
1118
+ "loss": 0.04315282394073202,
1119
+ "lr": 8.930265473713938e-05,
1120
+ "grad_norm": 0.43387264013290405,
1121
+ "skipped": false,
1122
+ "seconds": 3695.2
1123
+ },
1124
+ {
1125
+ "step": 122,
1126
+ "epoch": 0,
1127
+ "loss": 0.04045547115192259,
1128
+ "lr": 8.910570250852097e-05,
1129
+ "grad_norm": 0.43794116377830505,
1130
+ "skipped": false,
1131
+ "seconds": 3725.1
1132
+ },
1133
+ {
1134
+ "step": 123,
1135
+ "epoch": 0,
1136
+ "loss": 0.039255543758994656,
1137
+ "lr": 8.890717510790763e-05,
1138
+ "grad_norm": 0.421598881483078,
1139
+ "skipped": false,
1140
+ "seconds": 3753.7
1141
+ },
1142
+ {
1143
+ "step": 124,
1144
+ "epoch": 0,
1145
+ "loss": 0.04119531671735658,
1146
+ "lr": 8.870708053195413e-05,
1147
+ "grad_norm": 0.41828998923301697,
1148
+ "skipped": false,
1149
+ "seconds": 3782.7
1150
+ },
1151
+ {
1152
+ "step": 125,
1153
+ "epoch": 0,
1154
+ "loss": 0.03619634128686488,
1155
+ "lr": 8.850542684044078e-05,
1156
+ "grad_norm": 0.3894548714160919,
1157
+ "skipped": false,
1158
+ "seconds": 3813.8
1159
+ },
1160
+ {
1161
+ "step": 126,
1162
+ "epoch": 0,
1163
+ "loss": 0.04429675767294329,
1164
+ "lr": 8.83022221559489e-05,
1165
+ "grad_norm": 0.4620448052883148,
1166
+ "skipped": false,
1167
+ "seconds": 3843.6
1168
+ },
1169
+ {
1170
+ "step": 127,
1171
+ "epoch": 0,
1172
+ "loss": 0.03996556843091452,
1173
+ "lr": 8.809747466353356e-05,
1174
+ "grad_norm": 0.4065825343132019,
1175
+ "skipped": false,
1176
+ "seconds": 3874.3
1177
+ },
1178
+ {
1179
+ "step": 128,
1180
+ "epoch": 0,
1181
+ "loss": 0.0439553558475418,
1182
+ "lr": 8.789119261039385e-05,
1183
+ "grad_norm": 0.4792153239250183,
1184
+ "skipped": false,
1185
+ "seconds": 3904.4
1186
+ },
1187
+ {
1188
+ "step": 129,
1189
+ "epoch": 0,
1190
+ "loss": 0.038623366088057345,
1191
+ "lr": 8.768338430554082e-05,
1192
+ "grad_norm": 0.38725003600120544,
1193
+ "skipped": false,
1194
+ "seconds": 3933.6
1195
+ },
1196
+ {
1197
+ "step": 130,
1198
+ "epoch": 0,
1199
+ "loss": 0.034875345331959726,
1200
+ "lr": 8.74740581194627e-05,
1201
+ "grad_norm": 0.46025949716567993,
1202
+ "skipped": false,
1203
+ "seconds": 3962.5
1204
+ },
1205
+ {
1206
+ "step": 131,
1207
+ "epoch": 0,
1208
+ "loss": 0.03991871696805529,
1209
+ "lr": 8.726322248378775e-05,
1210
+ "grad_norm": 0.5329133868217468,
1211
+ "skipped": false,
1212
+ "seconds": 3993.1
1213
+ },
1214
+ {
1215
+ "step": 132,
1216
+ "epoch": 0,
1217
+ "loss": 0.04528188935060945,
1218
+ "lr": 8.705088589094459e-05,
1219
+ "grad_norm": 0.6367639899253845,
1220
+ "skipped": false,
1221
+ "seconds": 4023.4
1222
+ },
1223
+ {
1224
+ "step": 133,
1225
+ "epoch": 0,
1226
+ "loss": 0.04366885924049116,
1227
+ "lr": 8.683705689382024e-05,
1228
+ "grad_norm": 0.8130128979682922,
1229
+ "skipped": false,
1230
+ "seconds": 4054.7
1231
+ },
1232
+ {
1233
+ "step": 134,
1234
+ "epoch": 0,
1235
+ "loss": 0.04263949807086629,
1236
+ "lr": 8.662174410541555e-05,
1237
+ "grad_norm": 0.47220155596733093,
1238
+ "skipped": false,
1239
+ "seconds": 4086.5
1240
+ },
1241
+ {
1242
+ "step": 135,
1243
+ "epoch": 0,
1244
+ "loss": 0.03748772638578097,
1245
+ "lr": 8.640495619849821e-05,
1246
+ "grad_norm": 0.7511334419250488,
1247
+ "skipped": false,
1248
+ "seconds": 4115.9
1249
+ },
1250
+ {
1251
+ "step": 136,
1252
+ "epoch": 0,
1253
+ "loss": 0.03817583855450704,
1254
+ "lr": 8.618670190525352e-05,
1255
+ "grad_norm": 0.45687562227249146,
1256
+ "skipped": false,
1257
+ "seconds": 4146.9
1258
+ },
1259
+ {
1260
+ "step": 137,
1261
+ "epoch": 0,
1262
+ "loss": 0.045329121330418734,
1263
+ "lr": 8.596699001693255e-05,
1264
+ "grad_norm": 0.5111539959907532,
1265
+ "skipped": false,
1266
+ "seconds": 4177.5
1267
+ },
1268
+ {
1269
+ "step": 138,
1270
+ "epoch": 0,
1271
+ "loss": 0.04316695398120789,
1272
+ "lr": 8.574582938349817e-05,
1273
+ "grad_norm": 0.47795966267585754,
1274
+ "skipped": false,
1275
+ "seconds": 4207.5
1276
+ },
1277
+ {
1278
+ "step": 139,
1279
+ "epoch": 0,
1280
+ "loss": 0.03760606574186284,
1281
+ "lr": 8.552322891326846e-05,
1282
+ "grad_norm": 0.4370393753051758,
1283
+ "skipped": false,
1284
+ "seconds": 4238.5
1285
+ },
1286
+ {
1287
+ "step": 140,
1288
+ "epoch": 0,
1289
+ "loss": 0.03411327835019874,
1290
+ "lr": 8.529919757255783e-05,
1291
+ "grad_norm": 0.5971311926841736,
1292
+ "skipped": false,
1293
+ "seconds": 4269.4
1294
+ },
1295
+ {
1296
+ "step": 141,
1297
+ "epoch": 0,
1298
+ "loss": 0.040823135821758484,
1299
+ "lr": 8.507374438531607e-05,
1300
+ "grad_norm": 0.4045528471469879,
1301
+ "skipped": false,
1302
+ "seconds": 4300.7
1303
+ },
1304
+ {
1305
+ "step": 142,
1306
+ "epoch": 0,
1307
+ "loss": 0.03689725307248674,
1308
+ "lr": 8.484687843276469e-05,
1309
+ "grad_norm": 0.503023624420166,
1310
+ "skipped": false,
1311
+ "seconds": 4330.5
1312
+ },
1313
+ {
1314
+ "step": 143,
1315
+ "epoch": 0,
1316
+ "loss": 0.04255549059662948,
1317
+ "lr": 8.461860885303114e-05,
1318
+ "grad_norm": 1.0986597537994385,
1319
+ "skipped": false,
1320
+ "seconds": 4362.6
1321
+ },
1322
+ {
1323
+ "step": 144,
1324
+ "epoch": 0,
1325
+ "loss": 0.03933713789797076,
1326
+ "lr": 8.438894484078086e-05,
1327
+ "grad_norm": 0.384954571723938,
1328
+ "skipped": false,
1329
+ "seconds": 4394.5
1330
+ },
1331
+ {
1332
+ "step": 145,
1333
+ "epoch": 0,
1334
+ "loss": 0.04379340127772898,
1335
+ "lr": 8.415789564684673e-05,
1336
+ "grad_norm": 0.42970529198646545,
1337
+ "skipped": false,
1338
+ "seconds": 4424.8
1339
+ },
1340
+ {
1341
+ "step": 146,
1342
+ "epoch": 0,
1343
+ "loss": 0.0348121738856441,
1344
+ "lr": 8.392547057785661e-05,
1345
+ "grad_norm": 0.3794669210910797,
1346
+ "skipped": false,
1347
+ "seconds": 4454.9
1348
+ },
1349
+ {
1350
+ "step": 147,
1351
+ "epoch": 0,
1352
+ "loss": 0.03421579952458653,
1353
+ "lr": 8.369167899585841e-05,
1354
+ "grad_norm": 0.3601197600364685,
1355
+ "skipped": false,
1356
+ "seconds": 4485.3
1357
+ },
1358
+ {
1359
+ "step": 148,
1360
+ "epoch": 0,
1361
+ "loss": 0.042821301594670964,
1362
+ "lr": 8.345653031794292e-05,
1363
+ "grad_norm": 0.4644930958747864,
1364
+ "skipped": false,
1365
+ "seconds": 4516.7
1366
+ },
1367
+ {
1368
+ "step": 149,
1369
+ "epoch": 0,
1370
+ "loss": 0.044358414786973915,
1371
+ "lr": 8.322003401586462e-05,
1372
+ "grad_norm": 0.4486781060695648,
1373
+ "skipped": false,
1374
+ "seconds": 4547.8
1375
+ },
1376
+ {
1377
+ "step": 150,
1378
+ "epoch": 0,
1379
+ "loss": 0.04154949754934255,
1380
+ "lr": 8.298219961566009e-05,
1381
+ "grad_norm": 0.4688260853290558,
1382
+ "skipped": false,
1383
+ "seconds": 4579.2
1384
+ },
1385
+ {
1386
+ "step": 151,
1387
+ "epoch": 0,
1388
+ "loss": 0.04206281148280588,
1389
+ "lr": 8.274303669726426e-05,
1390
+ "grad_norm": 0.4345685541629791,
1391
+ "skipped": false,
1392
+ "seconds": 4609.6
1393
+ },
1394
+ {
1395
+ "step": 152,
1396
+ "epoch": 0,
1397
+ "loss": 0.03806614825690483,
1398
+ "lr": 8.250255489412463e-05,
1399
+ "grad_norm": 0.41471055150032043,
1400
+ "skipped": false,
1401
+ "seconds": 4639.3
1402
+ },
1403
+ {
1404
+ "step": 153,
1405
+ "epoch": 0,
1406
+ "loss": 0.036419154975548464,
1407
+ "lr": 8.226076389281316e-05,
1408
+ "grad_norm": 0.39894402027130127,
1409
+ "skipped": false,
1410
+ "seconds": 4670.0
1411
+ },
1412
+ {
1413
+ "step": 154,
1414
+ "epoch": 0,
1415
+ "loss": 0.0412287198855671,
1416
+ "lr": 8.201767343263612e-05,
1417
+ "grad_norm": 0.5558825135231018,
1418
+ "skipped": false,
1419
+ "seconds": 4699.3
1420
+ },
1421
+ {
1422
+ "step": 155,
1423
+ "epoch": 0,
1424
+ "loss": 0.03543429750900332,
1425
+ "lr": 8.177329330524182e-05,
1426
+ "grad_norm": 0.3999188542366028,
1427
+ "skipped": false,
1428
+ "seconds": 4731.7
1429
+ },
1430
+ {
1431
+ "step": 156,
1432
+ "epoch": 0,
1433
+ "loss": 0.0313229477893021,
1434
+ "lr": 8.152763335422613e-05,
1435
+ "grad_norm": 0.36880818009376526,
1436
+ "skipped": false,
1437
+ "seconds": 4762.2
1438
+ },
1439
+ {
1440
+ "step": 157,
1441
+ "epoch": 0,
1442
+ "loss": 0.04267634258650647,
1443
+ "lr": 8.128070347473609e-05,
1444
+ "grad_norm": 0.476824015378952,
1445
+ "skipped": false,
1446
+ "seconds": 4793.5
1447
+ },
1448
+ {
1449
+ "step": 158,
1450
+ "epoch": 0,
1451
+ "loss": 0.036534420304552194,
1452
+ "lr": 8.103251361307119e-05,
1453
+ "grad_norm": 0.3953181505203247,
1454
+ "skipped": false,
1455
+ "seconds": 4824.2
1456
+ },
1457
+ {
1458
+ "step": 159,
1459
+ "epoch": 0,
1460
+ "loss": 0.04185770834502996,
1461
+ "lr": 8.07830737662829e-05,
1462
+ "grad_norm": 0.4075761139392853,
1463
+ "skipped": false,
1464
+ "seconds": 4854.8
1465
+ },
1466
+ {
1467
+ "step": 160,
1468
+ "epoch": 0,
1469
+ "loss": 0.03086744183635943,
1470
+ "lr": 8.053239398177191e-05,
1471
+ "grad_norm": 0.3988531529903412,
1472
+ "skipped": false,
1473
+ "seconds": 4885.7
1474
+ },
1475
+ {
1476
+ "step": 161,
1477
+ "epoch": 0,
1478
+ "loss": 0.030656032216276878,
1479
+ "lr": 8.028048435688333e-05,
1480
+ "grad_norm": 0.41813963651657104,
1481
+ "skipped": false,
1482
+ "seconds": 4915.8
1483
+ },
1484
+ {
1485
+ "step": 162,
1486
+ "epoch": 0,
1487
+ "loss": 0.03457538713973674,
1488
+ "lr": 8.002735503850016e-05,
1489
+ "grad_norm": 0.5292803049087524,
1490
+ "skipped": false,
1491
+ "seconds": 4946.6
1492
+ },
1493
+ {
1494
+ "step": 163,
1495
+ "epoch": 0,
1496
+ "loss": 0.04431626313934932,
1497
+ "lr": 7.97730162226344e-05,
1498
+ "grad_norm": 0.46250706911087036,
1499
+ "skipped": false,
1500
+ "seconds": 4977.1
1501
+ },
1502
+ {
1503
+ "step": 164,
1504
+ "epoch": 0,
1505
+ "loss": 0.03613297641050265,
1506
+ "lr": 7.95174781540165e-05,
1507
+ "grad_norm": 0.4473329484462738,
1508
+ "skipped": false,
1509
+ "seconds": 5006.5
1510
+ },
1511
+ {
1512
+ "step": 165,
1513
+ "epoch": 0,
1514
+ "loss": 0.04166648178634685,
1515
+ "lr": 7.926075112568259e-05,
1516
+ "grad_norm": 0.45099830627441406,
1517
+ "skipped": false,
1518
+ "seconds": 5039.0
1519
+ },
1520
+ {
1521
+ "step": 166,
1522
+ "epoch": 0,
1523
+ "loss": 0.0461718571295432,
1524
+ "lr": 7.900284547855991e-05,
1525
+ "grad_norm": 0.4615466594696045,
1526
+ "skipped": false,
1527
+ "seconds": 5070.3
1528
+ },
1529
+ {
1530
+ "step": 167,
1531
+ "epoch": 0,
1532
+ "loss": 0.03558595718876008,
1533
+ "lr": 7.874377160105036e-05,
1534
+ "grad_norm": 0.40478748083114624,
1535
+ "skipped": false,
1536
+ "seconds": 5101.0
1537
+ },
1538
+ {
1539
+ "step": 168,
1540
+ "epoch": 0,
1541
+ "loss": 0.03655152665563376,
1542
+ "lr": 7.848353992861195e-05,
1543
+ "grad_norm": 0.8066860437393188,
1544
+ "skipped": false,
1545
+ "seconds": 5131.0
1546
+ },
1547
+ {
1548
+ "step": 169,
1549
+ "epoch": 0,
1550
+ "loss": 0.04193836329213726,
1551
+ "lr": 7.822216094333847e-05,
1552
+ "grad_norm": 0.47176116704940796,
1553
+ "skipped": false,
1554
+ "seconds": 5161.5
1555
+ },
1556
+ {
1557
+ "step": 170,
1558
+ "epoch": 0,
1559
+ "loss": 0.04063318507788144,
1560
+ "lr": 7.795964517353735e-05,
1561
+ "grad_norm": 0.6494160294532776,
1562
+ "skipped": false,
1563
+ "seconds": 5190.9
1564
+ },
1565
+ {
1566
+ "step": 171,
1567
+ "epoch": 0,
1568
+ "loss": 0.031576382511724656,
1569
+ "lr": 7.769600319330552e-05,
1570
+ "grad_norm": 0.33635416626930237,
1571
+ "skipped": false,
1572
+ "seconds": 5222.1
1573
+ },
1574
+ {
1575
+ "step": 172,
1576
+ "epoch": 0,
1577
+ "loss": 0.03734357056854235,
1578
+ "lr": 7.74312456221035e-05,
1579
+ "grad_norm": 0.4150267243385315,
1580
+ "skipped": false,
1581
+ "seconds": 5253.9
1582
+ },
1583
+ {
1584
+ "step": 173,
1585
+ "epoch": 0,
1586
+ "loss": 0.032456102336556145,
1587
+ "lr": 7.716538312432766e-05,
1588
+ "grad_norm": 0.4122450649738312,
1589
+ "skipped": false,
1590
+ "seconds": 5285.7
1591
+ },
1592
+ {
1593
+ "step": 174,
1594
+ "epoch": 0,
1595
+ "loss": 0.04108603528774564,
1596
+ "lr": 7.689842640888063e-05,
1597
+ "grad_norm": 0.4406798183917999,
1598
+ "skipped": false,
1599
+ "seconds": 5316.2
1600
+ },
1601
+ {
1602
+ "step": 175,
1603
+ "epoch": 0,
1604
+ "loss": 0.034947429970073884,
1605
+ "lr": 7.663038622873999e-05,
1606
+ "grad_norm": 0.388076514005661,
1607
+ "skipped": false,
1608
+ "seconds": 5345.7
1609
+ },
1610
+ {
1611
+ "step": 176,
1612
+ "epoch": 0,
1613
+ "loss": 0.03984182050221951,
1614
+ "lr": 7.636127338052512e-05,
1615
+ "grad_norm": 0.4097675085067749,
1616
+ "skipped": false,
1617
+ "seconds": 5376.6
1618
+ },
1619
+ {
1620
+ "step": 177,
1621
+ "epoch": 0,
1622
+ "loss": 0.03554444531306821,
1623
+ "lr": 7.60910987040623e-05,
1624
+ "grad_norm": 0.4486690163612366,
1625
+ "skipped": false,
1626
+ "seconds": 5404.5
1627
+ },
1628
+ {
1629
+ "step": 178,
1630
+ "epoch": 0,
1631
+ "loss": 0.03406732369196045,
1632
+ "lr": 7.58198730819481e-05,
1633
+ "grad_norm": 0.36147722601890564,
1634
+ "skipped": false,
1635
+ "seconds": 5437.3
1636
+ },
1637
+ {
1638
+ "step": 179,
1639
+ "epoch": 0,
1640
+ "loss": 0.03996114220770357,
1641
+ "lr": 7.554760743911103e-05,
1642
+ "grad_norm": 0.6578200459480286,
1643
+ "skipped": false,
1644
+ "seconds": 5468.4
1645
+ },
1646
+ {
1647
+ "step": 180,
1648
+ "epoch": 0,
1649
+ "loss": 0.03974208406398927,
1650
+ "lr": 7.52743127423715e-05,
1651
+ "grad_norm": 0.5207664370536804,
1652
+ "skipped": false,
1653
+ "seconds": 5498.2
1654
+ },
1655
+ {
1656
+ "step": 181,
1657
+ "epoch": 0,
1658
+ "loss": 0.04600800008996591,
1659
+ "lr": 7.500000000000001e-05,
1660
+ "grad_norm": 0.5798813104629517,
1661
+ "skipped": false,
1662
+ "seconds": 5528.0
1663
+ },
1664
+ {
1665
+ "step": 182,
1666
+ "epoch": 0,
1667
+ "loss": 0.039908104562122335,
1668
+ "lr": 7.472468026127385e-05,
1669
+ "grad_norm": 0.4419390559196472,
1670
+ "skipped": false,
1671
+ "seconds": 5559.1
1672
+ },
1673
+ {
1674
+ "step": 183,
1675
+ "epoch": 0,
1676
+ "loss": 0.03292939452479223,
1677
+ "lr": 7.444836461603195e-05,
1678
+ "grad_norm": 0.3788493871688843,
1679
+ "skipped": false,
1680
+ "seconds": 5588.1
1681
+ },
1682
+ {
1683
+ "step": 184,
1684
+ "epoch": 0,
1685
+ "loss": 0.04538562315394896,
1686
+ "lr": 7.417106419422819e-05,
1687
+ "grad_norm": 0.48531362414360046,
1688
+ "skipped": false,
1689
+ "seconds": 5617.4
1690
+ },
1691
+ {
1692
+ "step": 185,
1693
+ "epoch": 0,
1694
+ "loss": 0.03726213373671817,
1695
+ "lr": 7.389279016548316e-05,
1696
+ "grad_norm": 0.4027515649795532,
1697
+ "skipped": false,
1698
+ "seconds": 5650.0
1699
+ },
1700
+ {
1701
+ "step": 186,
1702
+ "epoch": 0,
1703
+ "loss": 0.03393715986206677,
1704
+ "lr": 7.361355373863414e-05,
1705
+ "grad_norm": 0.3956986963748932,
1706
+ "skipped": false,
1707
+ "seconds": 5680.1
1708
+ },
1709
+ {
1710
+ "step": 187,
1711
+ "epoch": 0,
1712
+ "loss": 0.04360706535456188,
1713
+ "lr": 7.333336616128369e-05,
1714
+ "grad_norm": 0.4776063561439514,
1715
+ "skipped": false,
1716
+ "seconds": 5709.6
1717
+ },
1718
+ {
1719
+ "step": 188,
1720
+ "epoch": 0,
1721
+ "loss": 0.05108193350914854,
1722
+ "lr": 7.305223871934657e-05,
1723
+ "grad_norm": 0.4673639237880707,
1724
+ "skipped": false,
1725
+ "seconds": 5739.7
1726
+ },
1727
+ {
1728
+ "step": 189,
1729
+ "epoch": 0,
1730
+ "loss": 0.03513687010553615,
1731
+ "lr": 7.277018273659517e-05,
1732
+ "grad_norm": 0.3786344826221466,
1733
+ "skipped": false,
1734
+ "seconds": 5769.9
1735
+ },
1736
+ {
1737
+ "step": 190,
1738
+ "epoch": 0,
1739
+ "loss": 0.037264012151926776,
1740
+ "lr": 7.24872095742033e-05,
1741
+ "grad_norm": 0.4696302115917206,
1742
+ "skipped": false,
1743
+ "seconds": 5801.1
1744
+ },
1745
+ {
1746
+ "step": 191,
1747
+ "epoch": 0,
1748
+ "loss": 0.03839773619213788,
1749
+ "lr": 7.220333063028872e-05,
1750
+ "grad_norm": 1.4208773374557495,
1751
+ "skipped": false,
1752
+ "seconds": 5832.1
1753
+ },
1754
+ {
1755
+ "step": 192,
1756
+ "epoch": 0,
1757
+ "loss": 0.037638320253307794,
1758
+ "lr": 7.191855733945387e-05,
1759
+ "grad_norm": 0.4687727987766266,
1760
+ "skipped": false,
1761
+ "seconds": 5861.9
1762
+ },
1763
+ {
1764
+ "step": 193,
1765
+ "epoch": 0,
1766
+ "loss": 0.033059018984484906,
1767
+ "lr": 7.163290117232542e-05,
1768
+ "grad_norm": 0.46348440647125244,
1769
+ "skipped": false,
1770
+ "seconds": 5892.3
1771
+ },
1772
+ {
1773
+ "step": 194,
1774
+ "epoch": 0,
1775
+ "loss": 0.037771729388868955,
1776
+ "lr": 7.13463736350921e-05,
1777
+ "grad_norm": 0.39239150285720825,
1778
+ "skipped": false,
1779
+ "seconds": 5921.5
1780
+ },
1781
+ {
1782
+ "step": 195,
1783
+ "epoch": 0,
1784
+ "loss": 0.04014919540012298,
1785
+ "lr": 7.105898626904134e-05,
1786
+ "grad_norm": 0.4191938638687134,
1787
+ "skipped": false,
1788
+ "seconds": 5952.6
1789
+ },
1790
+ {
1791
+ "step": 196,
1792
+ "epoch": 0,
1793
+ "loss": 0.032287506898942726,
1794
+ "lr": 7.077075065009433e-05,
1795
+ "grad_norm": 0.3714689612388611,
1796
+ "skipped": false,
1797
+ "seconds": 5983.1
1798
+ },
1799
+ {
1800
+ "step": 197,
1801
+ "epoch": 0,
1802
+ "loss": 0.03435342616117841,
1803
+ "lr": 7.048167838833977e-05,
1804
+ "grad_norm": 0.43851959705352783,
1805
+ "skipped": false,
1806
+ "seconds": 6014.3
1807
+ },
1808
+ {
1809
+ "step": 198,
1810
+ "epoch": 0,
1811
+ "loss": 0.031339017286041354,
1812
+ "lr": 7.019178112756624e-05,
1813
+ "grad_norm": 1.0957211256027222,
1814
+ "skipped": false,
1815
+ "seconds": 6045.5
1816
+ },
1817
+ {
1818
+ "step": 199,
1819
+ "epoch": 0,
1820
+ "loss": 0.03213614967368697,
1821
+ "lr": 6.990107054479312e-05,
1822
+ "grad_norm": 0.4667567014694214,
1823
+ "skipped": false,
1824
+ "seconds": 6075.9
1825
+ },
1826
+ {
1827
+ "step": 200,
1828
+ "epoch": 0,
1829
+ "loss": 0.03776222146967406,
1830
+ "lr": 6.960955834980028e-05,
1831
+ "grad_norm": 0.49867287278175354,
1832
+ "skipped": false,
1833
+ "seconds": 6106.6
1834
+ },
1835
+ {
1836
+ "step": 201,
1837
+ "epoch": 0,
1838
+ "loss": 0.03299907082185107,
1839
+ "lr": 6.931725628465643e-05,
1840
+ "grad_norm": 0.4388504922389984,
1841
+ "skipped": false,
1842
+ "seconds": 6137.2
1843
+ },
1844
+ {
1845
+ "step": 202,
1846
+ "epoch": 0,
1847
+ "loss": 0.02845420716160882,
1848
+ "lr": 6.902417612324615e-05,
1849
+ "grad_norm": 0.4300897717475891,
1850
+ "skipped": false,
1851
+ "seconds": 6167.6
1852
+ },
1853
+ {
1854
+ "step": 203,
1855
+ "epoch": 0,
1856
+ "loss": 0.048140803469887264,
1857
+ "lr": 6.873032967079561e-05,
1858
+ "grad_norm": 0.4720727205276489,
1859
+ "skipped": false,
1860
+ "seconds": 6196.9
1861
+ },
1862
+ {
1863
+ "step": 204,
1864
+ "epoch": 0,
1865
+ "loss": 0.04197649929110564,
1866
+ "lr": 6.843572876339705e-05,
1867
+ "grad_norm": 0.5733126997947693,
1868
+ "skipped": false,
1869
+ "seconds": 6228.0
1870
+ },
1871
+ {
1872
+ "step": 205,
1873
+ "epoch": 0,
1874
+ "loss": 0.0407797022241052,
1875
+ "lr": 6.814038526753205e-05,
1876
+ "grad_norm": 0.4141710102558136,
1877
+ "skipped": false,
1878
+ "seconds": 6258.9
1879
+ },
1880
+ {
1881
+ "step": 206,
1882
+ "epoch": 0,
1883
+ "loss": 0.03560397631227188,
1884
+ "lr": 6.784431107959359e-05,
1885
+ "grad_norm": 0.4068869650363922,
1886
+ "skipped": false,
1887
+ "seconds": 6289.4
1888
+ },
1889
+ {
1890
+ "step": 207,
1891
+ "epoch": 0,
1892
+ "loss": 0.03401413873482035,
1893
+ "lr": 6.754751812540679e-05,
1894
+ "grad_norm": 0.3947623372077942,
1895
+ "skipped": false,
1896
+ "seconds": 6319.6
1897
+ },
1898
+ {
1899
+ "step": 208,
1900
+ "epoch": 0,
1901
+ "loss": 0.04135789566635663,
1902
+ "lr": 6.725001835974853e-05,
1903
+ "grad_norm": 0.4253414571285248,
1904
+ "skipped": false,
1905
+ "seconds": 6351.6
1906
+ },
1907
+ {
1908
+ "step": 209,
1909
+ "epoch": 0,
1910
+ "loss": 0.03787880008467034,
1911
+ "lr": 6.695182376586603e-05,
1912
+ "grad_norm": 0.4344177544116974,
1913
+ "skipped": false,
1914
+ "seconds": 6382.8
1915
+ },
1916
+ {
1917
+ "step": 210,
1918
+ "epoch": 0,
1919
+ "loss": 0.03571759499921796,
1920
+ "lr": 6.665294635499404e-05,
1921
+ "grad_norm": 0.3693549633026123,
1922
+ "skipped": false,
1923
+ "seconds": 6413.8
1924
+ },
1925
+ {
1926
+ "step": 211,
1927
+ "epoch": 0,
1928
+ "loss": 0.037497748775431376,
1929
+ "lr": 6.635339816587109e-05,
1930
+ "grad_norm": 0.4440297484397888,
1931
+ "skipped": false,
1932
+ "seconds": 6443.4
1933
+ },
1934
+ {
1935
+ "step": 212,
1936
+ "epoch": 0,
1937
+ "loss": 0.03740905688192839,
1938
+ "lr": 6.605319126425454e-05,
1939
+ "grad_norm": 0.4463842213153839,
1940
+ "skipped": false,
1941
+ "seconds": 6474.5
1942
+ },
1943
+ {
1944
+ "step": 213,
1945
+ "epoch": 0,
1946
+ "loss": 0.04070149968421992,
1947
+ "lr": 6.575233774243465e-05,
1948
+ "grad_norm": 0.6535020470619202,
1949
+ "skipped": false,
1950
+ "seconds": 6505.5
1951
+ },
1952
+ {
1953
+ "step": 214,
1954
+ "epoch": 0,
1955
+ "loss": 0.03551791987161815,
1956
+ "lr": 6.545084971874738e-05,
1957
+ "grad_norm": 0.4679766297340393,
1958
+ "skipped": false,
1959
+ "seconds": 6536.2
1960
+ },
1961
+ {
1962
+ "step": 215,
1963
+ "epoch": 0,
1964
+ "loss": 0.0383298000410759,
1965
+ "lr": 6.514873933708638e-05,
1966
+ "grad_norm": 0.3855707347393036,
1967
+ "skipped": false,
1968
+ "seconds": 6566.2
1969
+ },
1970
+ {
1971
+ "step": 216,
1972
+ "epoch": 0,
1973
+ "loss": 0.037831665922547046,
1974
+ "lr": 6.484601876641375e-05,
1975
+ "grad_norm": 1.139644742012024,
1976
+ "skipped": false,
1977
+ "seconds": 6595.9
1978
+ },
1979
+ {
1980
+ "step": 217,
1981
+ "epoch": 0,
1982
+ "loss": 0.03648110361960469,
1983
+ "lr": 6.454270020026995e-05,
1984
+ "grad_norm": 0.4173310101032257,
1985
+ "skipped": false,
1986
+ "seconds": 6626.4
1987
+ },
1988
+ {
1989
+ "step": 218,
1990
+ "epoch": 0,
1991
+ "loss": 0.033973121468026765,
1992
+ "lr": 6.423879585628261e-05,
1993
+ "grad_norm": 0.4316014349460602,
1994
+ "skipped": false,
1995
+ "seconds": 6655.2
1996
+ },
1997
+ {
1998
+ "step": 219,
1999
+ "epoch": 0,
2000
+ "loss": 0.04896280768634715,
2001
+ "lr": 6.39343179756744e-05,
2002
+ "grad_norm": 1.1312209367752075,
2003
+ "skipped": false,
2004
+ "seconds": 6685.7
2005
+ },
2006
+ {
2007
+ "step": 220,
2008
+ "epoch": 0,
2009
+ "loss": 0.03579341232938403,
2010
+ "lr": 6.36292788227699e-05,
2011
+ "grad_norm": 0.40495115518569946,
2012
+ "skipped": false,
2013
+ "seconds": 6716.8
2014
+ },
2015
+ {
2016
+ "step": 221,
2017
+ "epoch": 0,
2018
+ "loss": 0.05005555049648453,
2019
+ "lr": 6.332369068450174e-05,
2020
+ "grad_norm": 0.47920170426368713,
2021
+ "skipped": false,
2022
+ "seconds": 6749.8
2023
+ },
2024
+ {
2025
+ "step": 222,
2026
+ "epoch": 0,
2027
+ "loss": 0.03518659511842654,
2028
+ "lr": 6.30175658699156e-05,
2029
+ "grad_norm": 0.47350093722343445,
2030
+ "skipped": false,
2031
+ "seconds": 6780.5
2032
+ },
2033
+ {
2034
+ "step": 223,
2035
+ "epoch": 0,
2036
+ "loss": 0.03665763939553687,
2037
+ "lr": 6.271091670967436e-05,
2038
+ "grad_norm": 0.42811599373817444,
2039
+ "skipped": false,
2040
+ "seconds": 6810.9
2041
+ },
2042
+ {
2043
+ "step": 224,
2044
+ "epoch": 0,
2045
+ "loss": 0.07557717694559939,
2046
+ "lr": 6.240375555556145e-05,
2047
+ "grad_norm": 0.5362834930419922,
2048
+ "skipped": false,
2049
+ "seconds": 6841.8
2050
+ },
2051
+ {
2052
+ "step": 225,
2053
+ "epoch": 0,
2054
+ "loss": 0.034370320694503485,
2055
+ "lr": 6.209609477998338e-05,
2056
+ "grad_norm": 0.3875359296798706,
2057
+ "skipped": false,
2058
+ "seconds": 6873.3
2059
+ },
2060
+ {
2061
+ "step": 226,
2062
+ "epoch": 0,
2063
+ "loss": 0.03586724312368848,
2064
+ "lr": 6.178794677547137e-05,
2065
+ "grad_norm": 0.4375789761543274,
2066
+ "skipped": false,
2067
+ "seconds": 6903.7
2068
+ },
2069
+ {
2070
+ "step": 227,
2071
+ "epoch": 0,
2072
+ "loss": 0.03204754625441711,
2073
+ "lr": 6.147932395418205e-05,
2074
+ "grad_norm": 0.37311556935310364,
2075
+ "skipped": false,
2076
+ "seconds": 6934.6
2077
+ },
2078
+ {
2079
+ "step": 228,
2080
+ "epoch": 0,
2081
+ "loss": 0.029651823812095246,
2082
+ "lr": 6.117023874739772e-05,
2083
+ "grad_norm": 0.3873976469039917,
2084
+ "skipped": false,
2085
+ "seconds": 6965.5
2086
+ },
2087
+ {
2088
+ "step": 229,
2089
+ "epoch": 0,
2090
+ "loss": 0.03313081313206076,
2091
+ "lr": 6.0860703605025395e-05,
2092
+ "grad_norm": 0.40196579694747925,
2093
+ "skipped": false,
2094
+ "seconds": 6997.5
2095
+ },
2096
+ {
2097
+ "step": 230,
2098
+ "epoch": 0,
2099
+ "loss": 0.032857811465442976,
2100
+ "lr": 6.05507309950955e-05,
2101
+ "grad_norm": 0.3450320065021515,
2102
+ "skipped": false,
2103
+ "seconds": 7025.7
2104
+ },
2105
+ {
2106
+ "step": 231,
2107
+ "epoch": 0,
2108
+ "loss": 0.03128418165351189,
2109
+ "lr": 6.024033340325954e-05,
2110
+ "grad_norm": 0.33902105689048767,
2111
+ "skipped": false,
2112
+ "seconds": 7058.4
2113
+ },
2114
+ {
2115
+ "step": 232,
2116
+ "epoch": 0,
2117
+ "loss": 0.033792713284052735,
2118
+ "lr": 5.992952333228728e-05,
2119
+ "grad_norm": 0.3558861017227173,
2120
+ "skipped": false,
2121
+ "seconds": 7088.5
2122
+ },
2123
+ {
2124
+ "step": 233,
2125
+ "epoch": 0,
2126
+ "loss": 0.03406227171537694,
2127
+ "lr": 5.9618313301563055e-05,
2128
+ "grad_norm": 0.4204740524291992,
2129
+ "skipped": false,
2130
+ "seconds": 7120.3
2131
+ },
2132
+ {
2133
+ "step": 234,
2134
+ "epoch": 0,
2135
+ "loss": 0.03475309157182153,
2136
+ "lr": 5.9306715846581506e-05,
2137
+ "grad_norm": 0.38286036252975464,
2138
+ "skipped": false,
2139
+ "seconds": 7149.4
2140
+ },
2141
+ {
2142
+ "step": 235,
2143
+ "epoch": 0,
2144
+ "loss": 0.032176283458823195,
2145
+ "lr": 5.8994743518442694e-05,
2146
+ "grad_norm": 0.40629762411117554,
2147
+ "skipped": false,
2148
+ "seconds": 7180.5
2149
+ },
2150
+ {
2151
+ "step": 236,
2152
+ "epoch": 0,
2153
+ "loss": 0.031434473539711294,
2154
+ "lr": 5.868240888334653e-05,
2155
+ "grad_norm": 0.3440655469894409,
2156
+ "skipped": false,
2157
+ "seconds": 7211.0
2158
+ },
2159
+ {
2160
+ "step": 237,
2161
+ "epoch": 0,
2162
+ "loss": 0.036813643134599484,
2163
+ "lr": 5.836972452208654e-05,
2164
+ "grad_norm": 0.3786338269710541,
2165
+ "skipped": false,
2166
+ "seconds": 7242.7
2167
+ },
2168
+ {
2169
+ "step": 238,
2170
+ "epoch": 0,
2171
+ "loss": 0.028255267931254515,
2172
+ "lr": 5.805670302954321e-05,
2173
+ "grad_norm": 0.3729824125766754,
2174
+ "skipped": false,
2175
+ "seconds": 7274.4
2176
+ },
2177
+ {
2178
+ "step": 239,
2179
+ "epoch": 0,
2180
+ "loss": 0.041683754948011256,
2181
+ "lr": 5.7743357014176624e-05,
2182
+ "grad_norm": 0.475638210773468,
2183
+ "skipped": false,
2184
+ "seconds": 7306.1
2185
+ },
2186
+ {
2187
+ "step": 240,
2188
+ "epoch": 0,
2189
+ "loss": 0.03886621624397832,
2190
+ "lr": 5.7429699097518585e-05,
2191
+ "grad_norm": 0.44749245047569275,
2192
+ "skipped": false,
2193
+ "seconds": 7337.5
2194
+ },
2195
+ {
2196
+ "step": 241,
2197
+ "epoch": 0,
2198
+ "loss": 0.0370755632110252,
2199
+ "lr": 5.7115741913664264e-05,
2200
+ "grad_norm": 0.4899304211139679,
2201
+ "skipped": false,
2202
+ "seconds": 7368.2
2203
+ },
2204
+ {
2205
+ "step": 242,
2206
+ "epoch": 0,
2207
+ "loss": 0.032659575216887886,
2208
+ "lr": 5.680149810876322e-05,
2209
+ "grad_norm": 0.3824728727340698,
2210
+ "skipped": false,
2211
+ "seconds": 7398.7
2212
+ },
2213
+ {
2214
+ "step": 243,
2215
+ "epoch": 0,
2216
+ "loss": 0.041655277951663454,
2217
+ "lr": 5.6486980340510086e-05,
2218
+ "grad_norm": 0.5157487988471985,
2219
+ "skipped": false,
2220
+ "seconds": 7428.5
2221
+ },
2222
+ {
2223
+ "step": 244,
2224
+ "epoch": 0,
2225
+ "loss": 0.03493482644935842,
2226
+ "lr": 5.617220127763474e-05,
2227
+ "grad_norm": 0.8254408836364746,
2228
+ "skipped": false,
2229
+ "seconds": 7458.7
2230
+ },
2231
+ {
2232
+ "step": 245,
2233
+ "epoch": 0,
2234
+ "loss": 0.03271396995609642,
2235
+ "lr": 5.585717359939192e-05,
2236
+ "grad_norm": 0.4264238178730011,
2237
+ "skipped": false,
2238
+ "seconds": 7489.6
2239
+ },
2240
+ {
2241
+ "step": 246,
2242
+ "epoch": 0,
2243
+ "loss": 0.035557805931201635,
2244
+ "lr": 5.5541909995050554e-05,
2245
+ "grad_norm": 0.7259626388549805,
2246
+ "skipped": false,
2247
+ "seconds": 7520.5
2248
+ },
2249
+ {
2250
+ "step": 247,
2251
+ "epoch": 0,
2252
+ "loss": 0.03830919612537731,
2253
+ "lr": 5.522642316338268e-05,
2254
+ "grad_norm": 0.5846589803695679,
2255
+ "skipped": false,
2256
+ "seconds": 7550.8
2257
+ },
2258
+ {
2259
+ "step": 248,
2260
+ "epoch": 0,
2261
+ "loss": 0.030078849312401398,
2262
+ "lr": 5.4910725812151864e-05,
2263
+ "grad_norm": 0.3776968717575073,
2264
+ "skipped": false,
2265
+ "seconds": 7581.3
2266
+ },
2267
+ {
2268
+ "step": 249,
2269
+ "epoch": 0,
2270
+ "loss": 0.03155149267491511,
2271
+ "lr": 5.4594830657601384e-05,
2272
+ "grad_norm": 0.3725808262825012,
2273
+ "skipped": false,
2274
+ "seconds": 7610.1
2275
+ },
2276
+ {
2277
+ "step": 250,
2278
+ "epoch": 0,
2279
+ "loss": 0.028693306861097875,
2280
+ "lr": 5.427875042394199e-05,
2281
+ "grad_norm": 0.4124157130718231,
2282
+ "skipped": false,
2283
+ "seconds": 7642.6
2284
+ },
2285
+ {
2286
+ "step": 251,
2287
+ "epoch": 0,
2288
+ "loss": 0.03217434105471025,
2289
+ "lr": 5.396249784283942e-05,
2290
+ "grad_norm": 0.5312711000442505,
2291
+ "skipped": false,
2292
+ "seconds": 7673.0
2293
+ },
2294
+ {
2295
+ "step": 252,
2296
+ "epoch": 0,
2297
+ "loss": 0.03104523542030881,
2298
+ "lr": 5.364608565290155e-05,
2299
+ "grad_norm": 0.4328680634498596,
2300
+ "skipped": false,
2301
+ "seconds": 7704.1
2302
+ },
2303
+ {
2304
+ "step": 253,
2305
+ "epoch": 0,
2306
+ "loss": 0.038518297395887566,
2307
+ "lr": 5.3329526599165204e-05,
2308
+ "grad_norm": 0.4788975417613983,
2309
+ "skipped": false,
2310
+ "seconds": 7735.2
2311
+ },
2312
+ {
2313
+ "step": 254,
2314
+ "epoch": 0,
2315
+ "loss": 0.03644856197733275,
2316
+ "lr": 5.301283343258293e-05,
2317
+ "grad_norm": 0.3760280907154083,
2318
+ "skipped": false,
2319
+ "seconds": 7765.5
2320
+ },
2321
+ {
2322
+ "step": 255,
2323
+ "epoch": 0,
2324
+ "loss": 0.040502291837035805,
2325
+ "lr": 5.2696018909509306e-05,
2326
+ "grad_norm": 0.609524667263031,
2327
+ "skipped": false,
2328
+ "seconds": 7781.9
2329
+ },
2330
+ {
2331
+ "step": 256,
2332
+ "epoch": 1,
2333
+ "loss": 0.024327973316301866,
2334
+ "lr": 5.2379095791187124e-05,
2335
+ "grad_norm": 0.34370267391204834,
2336
+ "skipped": false,
2337
+ "seconds": 7813.3
2338
+ },
2339
+ {
2340
+ "step": 257,
2341
+ "epoch": 1,
2342
+ "loss": 0.023225568969183718,
2343
+ "lr": 5.2062076843233366e-05,
2344
+ "grad_norm": 0.2865596413612366,
2345
+ "skipped": false,
2346
+ "seconds": 7844.7
2347
+ },
2348
+ {
2349
+ "step": 258,
2350
+ "epoch": 1,
2351
+ "loss": 0.020964424002418502,
2352
+ "lr": 5.174497483512506e-05,
2353
+ "grad_norm": 0.29307377338409424,
2354
+ "skipped": false,
2355
+ "seconds": 7874.0
2356
+ },
2357
+ {
2358
+ "step": 259,
2359
+ "epoch": 1,
2360
+ "loss": 0.02225420688061004,
2361
+ "lr": 5.142780253968481e-05,
2362
+ "grad_norm": 0.25329098105430603,
2363
+ "skipped": false,
2364
+ "seconds": 7905.2
2365
+ },
2366
+ {
2367
+ "step": 260,
2368
+ "epoch": 1,
2369
+ "loss": 0.019704535258939154,
2370
+ "lr": 5.1110572732566475e-05,
2371
+ "grad_norm": 0.2547796964645386,
2372
+ "skipped": false,
2373
+ "seconds": 7936.0
2374
+ },
2375
+ {
2376
+ "step": 261,
2377
+ "epoch": 1,
2378
+ "loss": 0.029142963339943442,
2379
+ "lr": 5.0793298191740404e-05,
2380
+ "grad_norm": 0.457135945558548,
2381
+ "skipped": false,
2382
+ "seconds": 7966.4
2383
+ },
2384
+ {
2385
+ "step": 262,
2386
+ "epoch": 1,
2387
+ "loss": 0.024066689716361174,
2388
+ "lr": 5.047599169697884e-05,
2389
+ "grad_norm": 0.2987236976623535,
2390
+ "skipped": false,
2391
+ "seconds": 7998.0
2392
+ },
2393
+ {
2394
+ "step": 263,
2395
+ "epoch": 1,
2396
+ "loss": 0.021392749322089965,
2397
+ "lr": 5.015866602934112e-05,
2398
+ "grad_norm": 0.2809486985206604,
2399
+ "skipped": false,
2400
+ "seconds": 8028.5
2401
+ },
2402
+ {
2403
+ "step": 264,
2404
+ "epoch": 1,
2405
+ "loss": 0.018585208267671207,
2406
+ "lr": 4.984133397065889e-05,
2407
+ "grad_norm": 0.2966468930244446,
2408
+ "skipped": false,
2409
+ "seconds": 8060.1
2410
+ },
2411
+ {
2412
+ "step": 265,
2413
+ "epoch": 1,
2414
+ "loss": 0.023124013230306148,
2415
+ "lr": 4.952400830302117e-05,
2416
+ "grad_norm": 0.4006018340587616,
2417
+ "skipped": false,
2418
+ "seconds": 8091.2
2419
+ },
2420
+ {
2421
+ "step": 266,
2422
+ "epoch": 1,
2423
+ "loss": 0.019659400110981634,
2424
+ "lr": 4.92067018082596e-05,
2425
+ "grad_norm": 0.29323676228523254,
2426
+ "skipped": false,
2427
+ "seconds": 8120.9
2428
+ },
2429
+ {
2430
+ "step": 267,
2431
+ "epoch": 1,
2432
+ "loss": 0.024482026068742894,
2433
+ "lr": 4.888942726743353e-05,
2434
+ "grad_norm": 0.3428184390068054,
2435
+ "skipped": false,
2436
+ "seconds": 8151.8
2437
+ },
2438
+ {
2439
+ "step": 268,
2440
+ "epoch": 1,
2441
+ "loss": 0.02003022017938944,
2442
+ "lr": 4.85721974603152e-05,
2443
+ "grad_norm": 0.3119227886199951,
2444
+ "skipped": false,
2445
+ "seconds": 8182.3
2446
+ },
2447
+ {
2448
+ "step": 269,
2449
+ "epoch": 1,
2450
+ "loss": 0.026439435787854695,
2451
+ "lr": 4.825502516487497e-05,
2452
+ "grad_norm": 0.3782959580421448,
2453
+ "skipped": false,
2454
+ "seconds": 8212.2
2455
+ },
2456
+ {
2457
+ "step": 270,
2458
+ "epoch": 1,
2459
+ "loss": 0.014993694335972417,
2460
+ "lr": 4.7937923156766646e-05,
2461
+ "grad_norm": 0.23553837835788727,
2462
+ "skipped": false,
2463
+ "seconds": 8242.5
2464
+ },
2465
+ {
2466
+ "step": 271,
2467
+ "epoch": 1,
2468
+ "loss": 0.01803465460008746,
2469
+ "lr": 4.762090420881289e-05,
2470
+ "grad_norm": 0.2514285147190094,
2471
+ "skipped": false,
2472
+ "seconds": 8273.6
2473
+ },
2474
+ {
2475
+ "step": 272,
2476
+ "epoch": 1,
2477
+ "loss": 0.019902860205701138,
2478
+ "lr": 4.730398109049071e-05,
2479
+ "grad_norm": 0.2984468340873718,
2480
+ "skipped": false,
2481
+ "seconds": 8304.0
2482
+ },
2483
+ {
2484
+ "step": 273,
2485
+ "epoch": 1,
2486
+ "loss": 0.01947339402151121,
2487
+ "lr": 4.698716656741708e-05,
2488
+ "grad_norm": 0.2736494541168213,
2489
+ "skipped": false,
2490
+ "seconds": 8335.5
2491
+ },
2492
+ {
2493
+ "step": 274,
2494
+ "epoch": 1,
2495
+ "loss": 0.01885466807551386,
2496
+ "lr": 4.667047340083481e-05,
2497
+ "grad_norm": 0.25517645478248596,
2498
+ "skipped": false,
2499
+ "seconds": 8364.6
2500
+ },
2501
+ {
2502
+ "step": 275,
2503
+ "epoch": 1,
2504
+ "loss": 0.01877950233943932,
2505
+ "lr": 4.635391434709847e-05,
2506
+ "grad_norm": 0.2774704396724701,
2507
+ "skipped": false,
2508
+ "seconds": 8394.3
2509
+ },
2510
+ {
2511
+ "step": 276,
2512
+ "epoch": 1,
2513
+ "loss": 0.018360153023932645,
2514
+ "lr": 4.603750215716057e-05,
2515
+ "grad_norm": 0.32435178756713867,
2516
+ "skipped": false,
2517
+ "seconds": 8424.5
2518
+ },
2519
+ {
2520
+ "step": 277,
2521
+ "epoch": 1,
2522
+ "loss": 0.01531967046614941,
2523
+ "lr": 4.5721249576058027e-05,
2524
+ "grad_norm": 0.3591376543045044,
2525
+ "skipped": false,
2526
+ "seconds": 8456.0
2527
+ },
2528
+ {
2529
+ "step": 278,
2530
+ "epoch": 1,
2531
+ "loss": 0.016068661741435234,
2532
+ "lr": 4.5405169342398634e-05,
2533
+ "grad_norm": 0.32163316011428833,
2534
+ "skipped": false,
2535
+ "seconds": 8484.3
2536
+ },
2537
+ {
2538
+ "step": 279,
2539
+ "epoch": 1,
2540
+ "loss": 0.017871897473814482,
2541
+ "lr": 4.508927418784815e-05,
2542
+ "grad_norm": 0.2604014277458191,
2543
+ "skipped": false,
2544
+ "seconds": 8515.2
2545
+ },
2546
+ {
2547
+ "step": 280,
2548
+ "epoch": 1,
2549
+ "loss": 0.021977489380508728,
2550
+ "lr": 4.477357683661734e-05,
2551
+ "grad_norm": 0.3197914958000183,
2552
+ "skipped": false,
2553
+ "seconds": 8547.2
2554
+ },
2555
+ {
2556
+ "step": 281,
2557
+ "epoch": 1,
2558
+ "loss": 0.02219422790948942,
2559
+ "lr": 4.445809000494946e-05,
2560
+ "grad_norm": 0.36903974413871765,
2561
+ "skipped": false,
2562
+ "seconds": 8577.6
2563
+ },
2564
+ {
2565
+ "step": 282,
2566
+ "epoch": 1,
2567
+ "loss": 0.017691280488369144,
2568
+ "lr": 4.4142826400608086e-05,
2569
+ "grad_norm": 0.29918819665908813,
2570
+ "skipped": false,
2571
+ "seconds": 8607.6
2572
+ },
2573
+ {
2574
+ "step": 283,
2575
+ "epoch": 1,
2576
+ "loss": 0.016365259626193267,
2577
+ "lr": 4.3827798722365264e-05,
2578
+ "grad_norm": 0.34842997789382935,
2579
+ "skipped": false,
2580
+ "seconds": 8638.8
2581
+ },
2582
+ {
2583
+ "step": 284,
2584
+ "epoch": 1,
2585
+ "loss": 0.020046620939416723,
2586
+ "lr": 4.351301965948991e-05,
2587
+ "grad_norm": 0.2710837423801422,
2588
+ "skipped": false,
2589
+ "seconds": 8671.2
2590
+ },
2591
+ {
2592
+ "step": 285,
2593
+ "epoch": 1,
2594
+ "loss": 0.01676117178713448,
2595
+ "lr": 4.3198501891236804e-05,
2596
+ "grad_norm": 0.27728036046028137,
2597
+ "skipped": false,
2598
+ "seconds": 8700.4
2599
+ },
2600
+ {
2601
+ "step": 286,
2602
+ "epoch": 1,
2603
+ "loss": 0.017474436593507493,
2604
+ "lr": 4.288425808633575e-05,
2605
+ "grad_norm": 0.2791229486465454,
2606
+ "skipped": false,
2607
+ "seconds": 8731.9
2608
+ },
2609
+ {
2610
+ "step": 287,
2611
+ "epoch": 1,
2612
+ "loss": 0.01543151501258758,
2613
+ "lr": 4.2570300902481426e-05,
2614
+ "grad_norm": 0.25070998072624207,
2615
+ "skipped": false,
2616
+ "seconds": 8762.9
2617
+ },
2618
+ {
2619
+ "step": 288,
2620
+ "epoch": 1,
2621
+ "loss": 0.017339263243646895,
2622
+ "lr": 4.2256642985823395e-05,
2623
+ "grad_norm": 0.2656727433204651,
2624
+ "skipped": false,
2625
+ "seconds": 8793.3
2626
+ },
2627
+ {
2628
+ "step": 289,
2629
+ "epoch": 1,
2630
+ "loss": 0.022872012997628945,
2631
+ "lr": 4.19432969704568e-05,
2632
+ "grad_norm": 0.36633551120758057,
2633
+ "skipped": false,
2634
+ "seconds": 8823.6
2635
+ },
2636
+ {
2637
+ "step": 290,
2638
+ "epoch": 1,
2639
+ "loss": 0.020003974834431417,
2640
+ "lr": 4.163027547791347e-05,
2641
+ "grad_norm": 0.26786261796951294,
2642
+ "skipped": false,
2643
+ "seconds": 8853.5
2644
+ },
2645
+ {
2646
+ "step": 291,
2647
+ "epoch": 1,
2648
+ "loss": 0.016302781465769377,
2649
+ "lr": 4.131759111665349e-05,
2650
+ "grad_norm": 0.2734525501728058,
2651
+ "skipped": false,
2652
+ "seconds": 8884.3
2653
+ },
2654
+ {
2655
+ "step": 292,
2656
+ "epoch": 1,
2657
+ "loss": 0.01887829475529337,
2658
+ "lr": 4.100525648155731e-05,
2659
+ "grad_norm": 0.31800055503845215,
2660
+ "skipped": false,
2661
+ "seconds": 8913.4
2662
+ },
2663
+ {
2664
+ "step": 293,
2665
+ "epoch": 1,
2666
+ "loss": 0.020399836793905158,
2667
+ "lr": 4.06932841534185e-05,
2668
+ "grad_norm": 0.3321515619754791,
2669
+ "skipped": false,
2670
+ "seconds": 8946.0
2671
+ },
2672
+ {
2673
+ "step": 294,
2674
+ "epoch": 1,
2675
+ "loss": 0.021608482857536256,
2676
+ "lr": 4.038168669843697e-05,
2677
+ "grad_norm": 0.3299846351146698,
2678
+ "skipped": false,
2679
+ "seconds": 8976.4
2680
+ },
2681
+ {
2682
+ "step": 295,
2683
+ "epoch": 1,
2684
+ "loss": 0.015938243765422702,
2685
+ "lr": 4.007047666771274e-05,
2686
+ "grad_norm": 0.32036611437797546,
2687
+ "skipped": false,
2688
+ "seconds": 9007.7
2689
+ },
2690
+ {
2691
+ "step": 296,
2692
+ "epoch": 1,
2693
+ "loss": 0.016782717475817,
2694
+ "lr": 3.9759666596740476e-05,
2695
+ "grad_norm": 0.2806603014469147,
2696
+ "skipped": false,
2697
+ "seconds": 9039.7
2698
+ },
2699
+ {
2700
+ "step": 297,
2701
+ "epoch": 1,
2702
+ "loss": 0.014644961975055359,
2703
+ "lr": 3.944926900490452e-05,
2704
+ "grad_norm": 0.2742427885532379,
2705
+ "skipped": false,
2706
+ "seconds": 9071.9
2707
+ },
2708
+ {
2709
+ "step": 298,
2710
+ "epoch": 1,
2711
+ "loss": 0.016398670697453047,
2712
+ "lr": 3.913929639497462e-05,
2713
+ "grad_norm": 0.28872784972190857,
2714
+ "skipped": false,
2715
+ "seconds": 9104.5
2716
+ },
2717
+ {
2718
+ "step": 299,
2719
+ "epoch": 1,
2720
+ "loss": 0.017263746750174284,
2721
+ "lr": 3.882976125260229e-05,
2722
+ "grad_norm": 0.41232573986053467,
2723
+ "skipped": false,
2724
+ "seconds": 9133.6
2725
+ },
2726
+ {
2727
+ "step": 300,
2728
+ "epoch": 1,
2729
+ "loss": 0.019409321586866885,
2730
+ "lr": 3.852067604581794e-05,
2731
+ "grad_norm": 0.36655980348587036,
2732
+ "skipped": false,
2733
+ "seconds": 9165.4
2734
+ },
2735
+ {
2736
+ "step": 301,
2737
+ "epoch": 1,
2738
+ "loss": 0.013817376942734192,
2739
+ "lr": 3.821205322452863e-05,
2740
+ "grad_norm": 0.4269910156726837,
2741
+ "skipped": false,
2742
+ "seconds": 9197.3
2743
+ },
2744
+ {
2745
+ "step": 302,
2746
+ "epoch": 1,
2747
+ "loss": 0.02174159104628318,
2748
+ "lr": 3.790390522001662e-05,
2749
+ "grad_norm": 0.3511791229248047,
2750
+ "skipped": false,
2751
+ "seconds": 9226.2
2752
+ },
2753
+ {
2754
+ "step": 303,
2755
+ "epoch": 1,
2756
+ "loss": 0.016236488907425493,
2757
+ "lr": 3.759624444443858e-05,
2758
+ "grad_norm": 0.23098163306713104,
2759
+ "skipped": false,
2760
+ "seconds": 9255.1
2761
+ },
2762
+ {
2763
+ "step": 304,
2764
+ "epoch": 1,
2765
+ "loss": 0.017032122276003547,
2766
+ "lr": 3.728908329032567e-05,
2767
+ "grad_norm": 0.3353688716888428,
2768
+ "skipped": false,
2769
+ "seconds": 9285.3
2770
+ },
2771
+ {
2772
+ "step": 305,
2773
+ "epoch": 1,
2774
+ "loss": 0.01921281299615016,
2775
+ "lr": 3.69824341300844e-05,
2776
+ "grad_norm": 0.2812039256095886,
2777
+ "skipped": false,
2778
+ "seconds": 9317.4
2779
+ },
2780
+ {
2781
+ "step": 306,
2782
+ "epoch": 1,
2783
+ "loss": 0.016250054041544598,
2784
+ "lr": 3.6676309315498256e-05,
2785
+ "grad_norm": 0.28371351957321167,
2786
+ "skipped": false,
2787
+ "seconds": 9346.9
2788
+ },
2789
+ {
2790
+ "step": 307,
2791
+ "epoch": 1,
2792
+ "loss": 0.017268654154290946,
2793
+ "lr": 3.6370721177230116e-05,
2794
+ "grad_norm": 0.30808404088020325,
2795
+ "skipped": false,
2796
+ "seconds": 9377.3
2797
+ },
2798
+ {
2799
+ "step": 308,
2800
+ "epoch": 1,
2801
+ "loss": 0.018877130984260353,
2802
+ "lr": 3.606568202432562e-05,
2803
+ "grad_norm": 0.2958217263221741,
2804
+ "skipped": false,
2805
+ "seconds": 9408.6
2806
+ },
2807
+ {
2808
+ "step": 309,
2809
+ "epoch": 1,
2810
+ "loss": 0.018510348657640053,
2811
+ "lr": 3.5761204143717385e-05,
2812
+ "grad_norm": 0.2983313500881195,
2813
+ "skipped": false,
2814
+ "seconds": 9438.1
2815
+ },
2816
+ {
2817
+ "step": 310,
2818
+ "epoch": 1,
2819
+ "loss": 0.027753260579261186,
2820
+ "lr": 3.545729979973005e-05,
2821
+ "grad_norm": 0.49328893423080444,
2822
+ "skipped": false,
2823
+ "seconds": 9468.4
2824
+ },
2825
+ {
2826
+ "step": 311,
2827
+ "epoch": 1,
2828
+ "loss": 0.021194045424342375,
2829
+ "lr": 3.515398123358627e-05,
2830
+ "grad_norm": 0.29437315464019775,
2831
+ "skipped": false,
2832
+ "seconds": 9498.7
2833
+ },
2834
+ {
2835
+ "step": 312,
2836
+ "epoch": 1,
2837
+ "loss": 0.01686973282576468,
2838
+ "lr": 3.485126066291364e-05,
2839
+ "grad_norm": 0.24846428632736206,
2840
+ "skipped": false,
2841
+ "seconds": 9529.9
2842
+ },
2843
+ {
2844
+ "step": 313,
2845
+ "epoch": 1,
2846
+ "loss": 0.020775053623928477,
2847
+ "lr": 3.4549150281252636e-05,
2848
+ "grad_norm": 0.32179757952690125,
2849
+ "skipped": false,
2850
+ "seconds": 9561.7
2851
+ },
2852
+ {
2853
+ "step": 314,
2854
+ "epoch": 1,
2855
+ "loss": 0.01746008980630427,
2856
+ "lr": 3.424766225756537e-05,
2857
+ "grad_norm": 0.2708369493484497,
2858
+ "skipped": false,
2859
+ "seconds": 9592.7
2860
+ },
2861
+ {
2862
+ "step": 315,
2863
+ "epoch": 1,
2864
+ "loss": 0.02235273347283802,
2865
+ "lr": 3.394680873574546e-05,
2866
+ "grad_norm": 0.30049774050712585,
2867
+ "skipped": false,
2868
+ "seconds": 9623.0
2869
+ },
2870
+ {
2871
+ "step": 316,
2872
+ "epoch": 1,
2873
+ "loss": 0.020062926840855224,
2874
+ "lr": 3.364660183412892e-05,
2875
+ "grad_norm": 0.27229195833206177,
2876
+ "skipped": false,
2877
+ "seconds": 9654.1
2878
+ },
2879
+ {
2880
+ "step": 317,
2881
+ "epoch": 1,
2882
+ "loss": 0.017258836476076313,
2883
+ "lr": 3.334705364500596e-05,
2884
+ "grad_norm": 0.26787665486335754,
2885
+ "skipped": false,
2886
+ "seconds": 9684.8
2887
+ },
2888
+ {
2889
+ "step": 318,
2890
+ "epoch": 1,
2891
+ "loss": 0.01641855517474037,
2892
+ "lr": 3.304817623413397e-05,
2893
+ "grad_norm": 0.2533664405345917,
2894
+ "skipped": false,
2895
+ "seconds": 9715.7
2896
+ },
2897
+ {
2898
+ "step": 319,
2899
+ "epoch": 1,
2900
+ "loss": 0.019590947524596114,
2901
+ "lr": 3.274998164025148e-05,
2902
+ "grad_norm": 0.2662172317504883,
2903
+ "skipped": false,
2904
+ "seconds": 9746.9
2905
+ },
2906
+ {
2907
+ "step": 320,
2908
+ "epoch": 1,
2909
+ "loss": 0.015173372780071455,
2910
+ "lr": 3.2452481874593234e-05,
2911
+ "grad_norm": 0.2734486162662506,
2912
+ "skipped": false,
2913
+ "seconds": 9777.2
2914
+ },
2915
+ {
2916
+ "step": 321,
2917
+ "epoch": 1,
2918
+ "loss": 0.01690472215391683,
2919
+ "lr": 3.215568892040641e-05,
2920
+ "grad_norm": 0.2521533966064453,
2921
+ "skipped": false,
2922
+ "seconds": 9806.3
2923
+ },
2924
+ {
2925
+ "step": 322,
2926
+ "epoch": 1,
2927
+ "loss": 0.02087894162760005,
2928
+ "lr": 3.1859614732467954e-05,
2929
+ "grad_norm": 0.31441473960876465,
2930
+ "skipped": false,
2931
+ "seconds": 9836.5
2932
+ },
2933
+ {
2934
+ "step": 323,
2935
+ "epoch": 1,
2936
+ "loss": 0.013367866929058109,
2937
+ "lr": 3.156427123660297e-05,
2938
+ "grad_norm": 0.2140335887670517,
2939
+ "skipped": false,
2940
+ "seconds": 9867.4
2941
+ },
2942
+ {
2943
+ "step": 324,
2944
+ "epoch": 1,
2945
+ "loss": 0.014857198143227932,
2946
+ "lr": 3.12696703292044e-05,
2947
+ "grad_norm": 0.25735756754875183,
2948
+ "skipped": false,
2949
+ "seconds": 9898.8
2950
+ },
2951
+ {
2952
+ "step": 325,
2953
+ "epoch": 1,
2954
+ "loss": 0.017185792865311567,
2955
+ "lr": 3.097582387675385e-05,
2956
+ "grad_norm": 0.311068594455719,
2957
+ "skipped": false,
2958
+ "seconds": 9929.0
2959
+ },
2960
+ {
2961
+ "step": 326,
2962
+ "epoch": 1,
2963
+ "loss": 0.02158736824714009,
2964
+ "lr": 3.0682743715343564e-05,
2965
+ "grad_norm": 0.40494808554649353,
2966
+ "skipped": false,
2967
+ "seconds": 9960.3
2968
+ },
2969
+ {
2970
+ "step": 327,
2971
+ "epoch": 1,
2972
+ "loss": 0.017084697947514934,
2973
+ "lr": 3.0390441650199724e-05,
2974
+ "grad_norm": 0.40005937218666077,
2975
+ "skipped": false,
2976
+ "seconds": 9990.1
2977
+ },
2978
+ {
2979
+ "step": 328,
2980
+ "epoch": 1,
2981
+ "loss": 0.018331635892169955,
2982
+ "lr": 3.0098929455206904e-05,
2983
+ "grad_norm": 0.29285380244255066,
2984
+ "skipped": false,
2985
+ "seconds": 10020.1
2986
+ },
2987
+ {
2988
+ "step": 329,
2989
+ "epoch": 1,
2990
+ "loss": 0.01609054411061065,
2991
+ "lr": 2.9808218872433767e-05,
2992
+ "grad_norm": 0.3758953809738159,
2993
+ "skipped": false,
2994
+ "seconds": 10048.8
2995
+ },
2996
+ {
2997
+ "step": 330,
2998
+ "epoch": 1,
2999
+ "loss": 0.022970987022469896,
3000
+ "lr": 2.9518321611660237e-05,
3001
+ "grad_norm": 0.3137178421020508,
3002
+ "skipped": false,
3003
+ "seconds": 10079.0
3004
+ },
3005
+ {
3006
+ "step": 331,
3007
+ "epoch": 1,
3008
+ "loss": 0.017783200439661022,
3009
+ "lr": 2.9229249349905684e-05,
3010
+ "grad_norm": 0.29773151874542236,
3011
+ "skipped": false,
3012
+ "seconds": 10109.6
3013
+ },
3014
+ {
3015
+ "step": 332,
3016
+ "epoch": 1,
3017
+ "loss": 0.016127112212563518,
3018
+ "lr": 2.894101373095867e-05,
3019
+ "grad_norm": 0.2919289171695709,
3020
+ "skipped": false,
3021
+ "seconds": 10137.5
3022
+ },
3023
+ {
3024
+ "step": 333,
3025
+ "epoch": 1,
3026
+ "loss": 0.01922946286664721,
3027
+ "lr": 2.8653626364907917e-05,
3028
+ "grad_norm": 0.2525309920310974,
3029
+ "skipped": false,
3030
+ "seconds": 10168.2
3031
+ },
3032
+ {
3033
+ "step": 334,
3034
+ "epoch": 1,
3035
+ "loss": 0.013304160924842517,
3036
+ "lr": 2.8367098827674578e-05,
3037
+ "grad_norm": 0.23909994959831238,
3038
+ "skipped": false,
3039
+ "seconds": 10199.6
3040
+ },
3041
+ {
3042
+ "step": 335,
3043
+ "epoch": 1,
3044
+ "loss": 0.016354744904398068,
3045
+ "lr": 2.8081442660546125e-05,
3046
+ "grad_norm": 0.22283875942230225,
3047
+ "skipped": false,
3048
+ "seconds": 10228.6
3049
+ },
3050
+ {
3051
+ "step": 336,
3052
+ "epoch": 1,
3053
+ "loss": 0.015653531660566027,
3054
+ "lr": 2.7796669369711294e-05,
3055
+ "grad_norm": 0.2464396357536316,
3056
+ "skipped": false,
3057
+ "seconds": 10258.2
3058
+ },
3059
+ {
3060
+ "step": 337,
3061
+ "epoch": 1,
3062
+ "loss": 0.016884816086275165,
3063
+ "lr": 2.7512790425796718e-05,
3064
+ "grad_norm": 0.25359708070755005,
3065
+ "skipped": false,
3066
+ "seconds": 10288.8
3067
+ },
3068
+ {
3069
+ "step": 338,
3070
+ "epoch": 1,
3071
+ "loss": 0.02054701702025414,
3072
+ "lr": 2.7229817263404866e-05,
3073
+ "grad_norm": 0.22650858759880066,
3074
+ "skipped": false,
3075
+ "seconds": 10320.9
3076
+ },
3077
+ {
3078
+ "step": 339,
3079
+ "epoch": 1,
3080
+ "loss": 0.01796677281747861,
3081
+ "lr": 2.694776128065345e-05,
3082
+ "grad_norm": 0.3973900377750397,
3083
+ "skipped": false,
3084
+ "seconds": 10350.4
3085
+ },
3086
+ {
3087
+ "step": 340,
3088
+ "epoch": 1,
3089
+ "loss": 0.01574439181162856,
3090
+ "lr": 2.6666633838716314e-05,
3091
+ "grad_norm": 0.2303837239742279,
3092
+ "skipped": false,
3093
+ "seconds": 10380.1
3094
+ },
3095
+ {
3096
+ "step": 341,
3097
+ "epoch": 1,
3098
+ "loss": 0.013421567281087239,
3099
+ "lr": 2.638644626136587e-05,
3100
+ "grad_norm": 0.256214439868927,
3101
+ "skipped": false,
3102
+ "seconds": 10411.5
3103
+ },
3104
+ {
3105
+ "step": 342,
3106
+ "epoch": 1,
3107
+ "loss": 0.01560402047647239,
3108
+ "lr": 2.6107209834516854e-05,
3109
+ "grad_norm": 0.2719871401786804,
3110
+ "skipped": false,
3111
+ "seconds": 10444.1
3112
+ },
3113
+ {
3114
+ "step": 343,
3115
+ "epoch": 1,
3116
+ "loss": 0.02437654976241827,
3117
+ "lr": 2.5828935805771802e-05,
3118
+ "grad_norm": 0.5778554081916809,
3119
+ "skipped": false,
3120
+ "seconds": 10474.6
3121
+ },
3122
+ {
3123
+ "step": 344,
3124
+ "epoch": 1,
3125
+ "loss": 0.025893028253831666,
3126
+ "lr": 2.5551635383968065e-05,
3127
+ "grad_norm": 1.2740740776062012,
3128
+ "skipped": false,
3129
+ "seconds": 10505.2
3130
+ },
3131
+ {
3132
+ "step": 345,
3133
+ "epoch": 1,
3134
+ "loss": 0.01596813173179167,
3135
+ "lr": 2.5275319738726165e-05,
3136
+ "grad_norm": 0.3198592960834503,
3137
+ "skipped": false,
3138
+ "seconds": 10535.3
3139
+ },
3140
+ {
3141
+ "step": 346,
3142
+ "epoch": 1,
3143
+ "loss": 0.02277532178302144,
3144
+ "lr": 2.500000000000001e-05,
3145
+ "grad_norm": 0.36020344495773315,
3146
+ "skipped": false,
3147
+ "seconds": 10565.9
3148
+ },
3149
+ {
3150
+ "step": 347,
3151
+ "epoch": 1,
3152
+ "loss": 0.03668016211487209,
3153
+ "lr": 2.4725687257628534e-05,
3154
+ "grad_norm": 0.3347547948360443,
3155
+ "skipped": false,
3156
+ "seconds": 10596.5
3157
+ },
3158
+ {
3159
+ "step": 348,
3160
+ "epoch": 1,
3161
+ "loss": 0.018362691837820064,
3162
+ "lr": 2.4452392560888976e-05,
3163
+ "grad_norm": 0.5395991802215576,
3164
+ "skipped": false,
3165
+ "seconds": 10627.8
3166
+ },
3167
+ {
3168
+ "step": 349,
3169
+ "epoch": 1,
3170
+ "loss": 0.021723086045103975,
3171
+ "lr": 2.418012691805191e-05,
3172
+ "grad_norm": 0.30525851249694824,
3173
+ "skipped": false,
3174
+ "seconds": 10655.7
3175
+ },
3176
+ {
3177
+ "step": 350,
3178
+ "epoch": 1,
3179
+ "loss": 0.013355130647918101,
3180
+ "lr": 2.3908901295937713e-05,
3181
+ "grad_norm": 0.2056380659341812,
3182
+ "skipped": false,
3183
+ "seconds": 10687.6
3184
+ },
3185
+ {
3186
+ "step": 351,
3187
+ "epoch": 1,
3188
+ "loss": 0.01658166001536888,
3189
+ "lr": 2.363872661947488e-05,
3190
+ "grad_norm": 0.29792430996894836,
3191
+ "skipped": false,
3192
+ "seconds": 10717.7
3193
+ },
3194
+ {
3195
+ "step": 352,
3196
+ "epoch": 1,
3197
+ "loss": 0.01986786977065489,
3198
+ "lr": 2.336961377126001e-05,
3199
+ "grad_norm": 0.33303678035736084,
3200
+ "skipped": false,
3201
+ "seconds": 10749.8
3202
+ },
3203
+ {
3204
+ "step": 353,
3205
+ "epoch": 1,
3206
+ "loss": 0.019453472974544632,
3207
+ "lr": 2.310157359111938e-05,
3208
+ "grad_norm": 0.35702478885650635,
3209
+ "skipped": false,
3210
+ "seconds": 10779.0
3211
+ },
3212
+ {
3213
+ "step": 354,
3214
+ "epoch": 1,
3215
+ "loss": 0.015191067429245598,
3216
+ "lr": 2.283461687567236e-05,
3217
+ "grad_norm": 0.2647939622402191,
3218
+ "skipped": false,
3219
+ "seconds": 10808.7
3220
+ },
3221
+ {
3222
+ "step": 355,
3223
+ "epoch": 1,
3224
+ "loss": 0.015050849344550908,
3225
+ "lr": 2.2568754377896516e-05,
3226
+ "grad_norm": 0.2411239743232727,
3227
+ "skipped": false,
3228
+ "seconds": 10840.6
3229
+ },
3230
+ {
3231
+ "step": 356,
3232
+ "epoch": 1,
3233
+ "loss": 0.012920646420356383,
3234
+ "lr": 2.2303996806694488e-05,
3235
+ "grad_norm": 0.22789867222309113,
3236
+ "skipped": false,
3237
+ "seconds": 10871.0
3238
+ },
3239
+ {
3240
+ "step": 357,
3241
+ "epoch": 1,
3242
+ "loss": 0.014633365573149149,
3243
+ "lr": 2.2040354826462668e-05,
3244
+ "grad_norm": 0.2780497670173645,
3245
+ "skipped": false,
3246
+ "seconds": 10902.1
3247
+ },
3248
+ {
3249
+ "step": 358,
3250
+ "epoch": 1,
3251
+ "loss": 0.015241143214731,
3252
+ "lr": 2.1777839056661554e-05,
3253
+ "grad_norm": 0.2793889045715332,
3254
+ "skipped": false,
3255
+ "seconds": 10933.8
3256
+ },
3257
+ {
3258
+ "step": 359,
3259
+ "epoch": 1,
3260
+ "loss": 0.017730983503526435,
3261
+ "lr": 2.1516460071388062e-05,
3262
+ "grad_norm": 0.2675914466381073,
3263
+ "skipped": false,
3264
+ "seconds": 10964.3
3265
+ },
3266
+ {
3267
+ "step": 360,
3268
+ "epoch": 1,
3269
+ "loss": 0.02158524816624618,
3270
+ "lr": 2.125622839894964e-05,
3271
+ "grad_norm": 0.29603734612464905,
3272
+ "skipped": false,
3273
+ "seconds": 10995.1
3274
+ },
3275
+ {
3276
+ "step": 361,
3277
+ "epoch": 1,
3278
+ "loss": 0.016972364705656273,
3279
+ "lr": 2.09971545214401e-05,
3280
+ "grad_norm": 0.3738466203212738,
3281
+ "skipped": false,
3282
+ "seconds": 11026.7
3283
+ },
3284
+ {
3285
+ "step": 362,
3286
+ "epoch": 1,
3287
+ "loss": 0.021522874766122458,
3288
+ "lr": 2.073924887431744e-05,
3289
+ "grad_norm": 0.31328442692756653,
3290
+ "skipped": false,
3291
+ "seconds": 11058.1
3292
+ },
3293
+ {
3294
+ "step": 363,
3295
+ "epoch": 1,
3296
+ "loss": 0.017776748608779275,
3297
+ "lr": 2.048252184598352e-05,
3298
+ "grad_norm": 0.2673688232898712,
3299
+ "skipped": false,
3300
+ "seconds": 11089.1
3301
+ },
3302
+ {
3303
+ "step": 364,
3304
+ "epoch": 1,
3305
+ "loss": 0.020682575531182877,
3306
+ "lr": 2.0226983777365604e-05,
3307
+ "grad_norm": 0.3776637017726898,
3308
+ "skipped": false,
3309
+ "seconds": 11120.0
3310
+ },
3311
+ {
3312
+ "step": 365,
3313
+ "epoch": 1,
3314
+ "loss": 0.01417801892561934,
3315
+ "lr": 1.9972644961499854e-05,
3316
+ "grad_norm": 0.20646420121192932,
3317
+ "skipped": false,
3318
+ "seconds": 11150.7
3319
+ },
3320
+ {
3321
+ "step": 366,
3322
+ "epoch": 1,
3323
+ "loss": 0.019781235268653725,
3324
+ "lr": 1.9719515643116674e-05,
3325
+ "grad_norm": 0.31171584129333496,
3326
+ "skipped": false,
3327
+ "seconds": 11181.4
3328
+ },
3329
+ {
3330
+ "step": 367,
3331
+ "epoch": 1,
3332
+ "loss": 0.016028509728283503,
3333
+ "lr": 1.946760601822809e-05,
3334
+ "grad_norm": 0.271849662065506,
3335
+ "skipped": false,
3336
+ "seconds": 11211.2
3337
+ },
3338
+ {
3339
+ "step": 368,
3340
+ "epoch": 1,
3341
+ "loss": 0.01597410992545235,
3342
+ "lr": 1.9216926233717085e-05,
3343
+ "grad_norm": 0.26115888357162476,
3344
+ "skipped": false,
3345
+ "seconds": 11241.2
3346
+ },
3347
+ {
3348
+ "step": 369,
3349
+ "epoch": 1,
3350
+ "loss": 0.01464600051658741,
3351
+ "lr": 1.8967486386928817e-05,
3352
+ "grad_norm": 0.20717978477478027,
3353
+ "skipped": false,
3354
+ "seconds": 11271.8
3355
+ },
3356
+ {
3357
+ "step": 370,
3358
+ "epoch": 1,
3359
+ "loss": 0.014690513336154173,
3360
+ "lr": 1.8719296525263922e-05,
3361
+ "grad_norm": 0.2489292472600937,
3362
+ "skipped": false,
3363
+ "seconds": 11300.7
3364
+ },
3365
+ {
3366
+ "step": 371,
3367
+ "epoch": 1,
3368
+ "loss": 0.019532598908972135,
3369
+ "lr": 1.847236664577389e-05,
3370
+ "grad_norm": 0.2948475182056427,
3371
+ "skipped": false,
3372
+ "seconds": 11332.0
3373
+ },
3374
+ {
3375
+ "step": 372,
3376
+ "epoch": 1,
3377
+ "loss": 0.019013768308514138,
3378
+ "lr": 1.8226706694758195e-05,
3379
+ "grad_norm": 0.24077652394771576,
3380
+ "skipped": false,
3381
+ "seconds": 11363.0
3382
+ },
3383
+ {
3384
+ "step": 373,
3385
+ "epoch": 1,
3386
+ "loss": 0.015933554452930872,
3387
+ "lr": 1.7982326567363888e-05,
3388
+ "grad_norm": 0.287951797246933,
3389
+ "skipped": false,
3390
+ "seconds": 11394.9
3391
+ },
3392
+ {
3393
+ "step": 374,
3394
+ "epoch": 1,
3395
+ "loss": 0.01682713304488164,
3396
+ "lr": 1.773923610718686e-05,
3397
+ "grad_norm": 0.22983764111995697,
3398
+ "skipped": false,
3399
+ "seconds": 11424.4
3400
+ },
3401
+ {
3402
+ "step": 375,
3403
+ "epoch": 1,
3404
+ "loss": 0.017295656077654046,
3405
+ "lr": 1.7497445105875377e-05,
3406
+ "grad_norm": 0.2799907922744751,
3407
+ "skipped": false,
3408
+ "seconds": 11455.1
3409
+ },
3410
+ {
3411
+ "step": 376,
3412
+ "epoch": 1,
3413
+ "loss": 0.014463379727276486,
3414
+ "lr": 1.725696330273575e-05,
3415
+ "grad_norm": 0.2402082234621048,
3416
+ "skipped": false,
3417
+ "seconds": 11483.6
3418
+ },
3419
+ {
3420
+ "step": 377,
3421
+ "epoch": 1,
3422
+ "loss": 0.01813724382882879,
3423
+ "lr": 1.7017800384339928e-05,
3424
+ "grad_norm": 0.39935919642448425,
3425
+ "skipped": false,
3426
+ "seconds": 11513.5
3427
+ },
3428
+ {
3429
+ "step": 378,
3430
+ "epoch": 1,
3431
+ "loss": 0.02063750761723156,
3432
+ "lr": 1.6779965984135377e-05,
3433
+ "grad_norm": 0.26636335253715515,
3434
+ "skipped": false,
3435
+ "seconds": 11542.8
3436
+ },
3437
+ {
3438
+ "step": 379,
3439
+ "epoch": 1,
3440
+ "loss": 0.01720981912825147,
3441
+ "lr": 1.6543469682057106e-05,
3442
+ "grad_norm": 0.25584572553634644,
3443
+ "skipped": false,
3444
+ "seconds": 11573.4
3445
+ },
3446
+ {
3447
+ "step": 380,
3448
+ "epoch": 1,
3449
+ "loss": 0.016045881793675845,
3450
+ "lr": 1.6308321004141607e-05,
3451
+ "grad_norm": 0.24034883081912994,
3452
+ "skipped": false,
3453
+ "seconds": 11604.8
3454
+ },
3455
+ {
3456
+ "step": 381,
3457
+ "epoch": 1,
3458
+ "loss": 0.016837453895027516,
3459
+ "lr": 1.60745294221434e-05,
3460
+ "grad_norm": 0.27986347675323486,
3461
+ "skipped": false,
3462
+ "seconds": 11636.5
3463
+ },
3464
+ {
3465
+ "step": 382,
3466
+ "epoch": 1,
3467
+ "loss": 0.020221882823811536,
3468
+ "lr": 1.5842104353153287e-05,
3469
+ "grad_norm": 27.728328704833984,
3470
+ "skipped": false,
3471
+ "seconds": 11665.6
3472
+ },
3473
+ {
3474
+ "step": 383,
3475
+ "epoch": 1,
3476
+ "loss": 0.01467958791457942,
3477
+ "lr": 1.5611055159219152e-05,
3478
+ "grad_norm": 0.27296140789985657,
3479
+ "skipped": false,
3480
+ "seconds": 11696.4
3481
+ },
3482
+ {
3483
+ "step": 384,
3484
+ "epoch": 1,
3485
+ "loss": 0.014055224498078696,
3486
+ "lr": 1.5381391146968866e-05,
3487
+ "grad_norm": 0.22324781119823456,
3488
+ "skipped": false,
3489
+ "seconds": 11727.0
3490
+ },
3491
+ {
3492
+ "step": 385,
3493
+ "epoch": 1,
3494
+ "loss": 0.016929681425198358,
3495
+ "lr": 1.5153121567235335e-05,
3496
+ "grad_norm": 0.2702989876270294,
3497
+ "skipped": false,
3498
+ "seconds": 11757.3
3499
+ },
3500
+ {
3501
+ "step": 386,
3502
+ "epoch": 1,
3503
+ "loss": 0.015159464784758233,
3504
+ "lr": 1.4926255614683932e-05,
3505
+ "grad_norm": 0.2476302534341812,
3506
+ "skipped": false,
3507
+ "seconds": 11788.4
3508
+ },
3509
+ {
3510
+ "step": 387,
3511
+ "epoch": 1,
3512
+ "loss": 0.018204662800171433,
3513
+ "lr": 1.4700802427442179e-05,
3514
+ "grad_norm": 1.1057723760604858,
3515
+ "skipped": false,
3516
+ "seconds": 11819.5
3517
+ },
3518
+ {
3519
+ "step": 388,
3520
+ "epoch": 1,
3521
+ "loss": 0.01382485911035508,
3522
+ "lr": 1.4476771086731567e-05,
3523
+ "grad_norm": 0.2819043695926666,
3524
+ "skipped": false,
3525
+ "seconds": 11848.7
3526
+ },
3527
+ {
3528
+ "step": 389,
3529
+ "epoch": 1,
3530
+ "loss": 0.013176220352306017,
3531
+ "lr": 1.4254170616501827e-05,
3532
+ "grad_norm": 0.2870631217956543,
3533
+ "skipped": false,
3534
+ "seconds": 11879.2
3535
+ },
3536
+ {
3537
+ "step": 390,
3538
+ "epoch": 1,
3539
+ "loss": 0.015560504752145687,
3540
+ "lr": 1.4033009983067452e-05,
3541
+ "grad_norm": 0.2705937325954437,
3542
+ "skipped": false,
3543
+ "seconds": 11909.6
3544
+ },
3545
+ {
3546
+ "step": 391,
3547
+ "epoch": 1,
3548
+ "loss": 0.0172401643150863,
3549
+ "lr": 1.3813298094746491e-05,
3550
+ "grad_norm": 0.3437158465385437,
3551
+ "skipped": false,
3552
+ "seconds": 11940.3
3553
+ },
3554
+ {
3555
+ "step": 392,
3556
+ "epoch": 1,
3557
+ "loss": 0.021647427999498762,
3558
+ "lr": 1.3595043801501794e-05,
3559
+ "grad_norm": 0.2943425476551056,
3560
+ "skipped": false,
3561
+ "seconds": 11970.0
3562
+ },
3563
+ {
3564
+ "step": 393,
3565
+ "epoch": 1,
3566
+ "loss": 0.02094827180419021,
3567
+ "lr": 1.3378255894584463e-05,
3568
+ "grad_norm": 0.2669637203216553,
3569
+ "skipped": false,
3570
+ "seconds": 11999.7
3571
+ },
3572
+ {
3573
+ "step": 394,
3574
+ "epoch": 1,
3575
+ "loss": 0.016528638708385404,
3576
+ "lr": 1.3162943106179749e-05,
3577
+ "grad_norm": 0.29634103178977966,
3578
+ "skipped": false,
3579
+ "seconds": 12031.1
3580
+ },
3581
+ {
3582
+ "step": 395,
3583
+ "epoch": 1,
3584
+ "loss": 0.013307068416540571,
3585
+ "lr": 1.2949114109055415e-05,
3586
+ "grad_norm": 0.2215854972600937,
3587
+ "skipped": false,
3588
+ "seconds": 12060.2
3589
+ },
3590
+ {
3591
+ "step": 396,
3592
+ "epoch": 1,
3593
+ "loss": 0.015899094069978637,
3594
+ "lr": 1.2736777516212266e-05,
3595
+ "grad_norm": 0.2678273022174835,
3596
+ "skipped": false,
3597
+ "seconds": 12089.3
3598
+ },
3599
+ {
3600
+ "step": 397,
3601
+ "epoch": 1,
3602
+ "loss": 0.011314437034100134,
3603
+ "lr": 1.2525941880537307e-05,
3604
+ "grad_norm": 0.2707388997077942,
3605
+ "skipped": false,
3606
+ "seconds": 12119.0
3607
+ },
3608
+ {
3609
+ "step": 398,
3610
+ "epoch": 1,
3611
+ "loss": 0.01665331870056188,
3612
+ "lr": 1.2316615694459189e-05,
3613
+ "grad_norm": 0.4135851263999939,
3614
+ "skipped": false,
3615
+ "seconds": 12149.1
3616
+ },
3617
+ {
3618
+ "step": 399,
3619
+ "epoch": 1,
3620
+ "loss": 0.022952738952416948,
3621
+ "lr": 1.2108807389606158e-05,
3622
+ "grad_norm": 0.3070237338542938,
3623
+ "skipped": false,
3624
+ "seconds": 12179.5
3625
+ },
3626
+ {
3627
+ "step": 400,
3628
+ "epoch": 1,
3629
+ "loss": 0.017071752871094466,
3630
+ "lr": 1.1902525336466464e-05,
3631
+ "grad_norm": 0.23360101878643036,
3632
+ "skipped": false,
3633
+ "seconds": 12209.9
3634
+ },
3635
+ {
3636
+ "step": 401,
3637
+ "epoch": 1,
3638
+ "loss": 0.02012303668381288,
3639
+ "lr": 1.1697777844051105e-05,
3640
+ "grad_norm": 0.5425054430961609,
3641
+ "skipped": false,
3642
+ "seconds": 12240.2
3643
+ },
3644
+ {
3645
+ "step": 402,
3646
+ "epoch": 1,
3647
+ "loss": 0.013822645244752747,
3648
+ "lr": 1.1494573159559213e-05,
3649
+ "grad_norm": 0.24790161848068237,
3650
+ "skipped": false,
3651
+ "seconds": 12269.8
3652
+ },
3653
+ {
3654
+ "step": 403,
3655
+ "epoch": 1,
3656
+ "loss": 0.01809105012161628,
3657
+ "lr": 1.1292919468045877e-05,
3658
+ "grad_norm": 0.2774483263492584,
3659
+ "skipped": false,
3660
+ "seconds": 12299.4
3661
+ },
3662
+ {
3663
+ "step": 404,
3664
+ "epoch": 1,
3665
+ "loss": 0.014330840732265222,
3666
+ "lr": 1.1092824892092373e-05,
3667
+ "grad_norm": 0.30954477190971375,
3668
+ "skipped": false,
3669
+ "seconds": 12330.3
3670
+ },
3671
+ {
3672
+ "step": 405,
3673
+ "epoch": 1,
3674
+ "loss": 0.018357951065589642,
3675
+ "lr": 1.0894297491479045e-05,
3676
+ "grad_norm": 1.0409938097000122,
3677
+ "skipped": false,
3678
+ "seconds": 12360.4
3679
+ },
3680
+ {
3681
+ "step": 406,
3682
+ "epoch": 1,
3683
+ "loss": 0.016694805807263444,
3684
+ "lr": 1.0697345262860636e-05,
3685
+ "grad_norm": 0.3196686804294586,
3686
+ "skipped": false,
3687
+ "seconds": 12390.2
3688
+ },
3689
+ {
3690
+ "step": 407,
3691
+ "epoch": 1,
3692
+ "loss": 0.017687978299173884,
3693
+ "lr": 1.0501976139444191e-05,
3694
+ "grad_norm": 0.27741143107414246,
3695
+ "skipped": false,
3696
+ "seconds": 12420.6
3697
+ },
3698
+ {
3699
+ "step": 408,
3700
+ "epoch": 1,
3701
+ "loss": 0.02315771045021266,
3702
+ "lr": 1.0308197990669538e-05,
3703
+ "grad_norm": 0.33277827501296997,
3704
+ "skipped": false,
3705
+ "seconds": 12450.5
3706
+ },
3707
+ {
3708
+ "step": 409,
3709
+ "epoch": 1,
3710
+ "loss": 0.014765257162961296,
3711
+ "lr": 1.0116018621892237e-05,
3712
+ "grad_norm": 0.26430729031562805,
3713
+ "skipped": false,
3714
+ "seconds": 12481.0
3715
+ },
3716
+ {
3717
+ "step": 410,
3718
+ "epoch": 1,
3719
+ "loss": 0.021278894573238723,
3720
+ "lr": 9.92544577406923e-06,
3721
+ "grad_norm": 0.2686549127101898,
3722
+ "skipped": false,
3723
+ "seconds": 12511.7
3724
+ },
3725
+ {
3726
+ "step": 411,
3727
+ "epoch": 1,
3728
+ "loss": 0.014673768498664539,
3729
+ "lr": 9.73648712344707e-06,
3730
+ "grad_norm": 0.22932101786136627,
3731
+ "skipped": false,
3732
+ "seconds": 12540.4
3733
+ },
3734
+ {
3735
+ "step": 412,
3736
+ "epoch": 1,
3737
+ "loss": 0.012732859466220641,
3738
+ "lr": 9.549150281252633e-06,
3739
+ "grad_norm": 0.21991147100925446,
3740
+ "skipped": false,
3741
+ "seconds": 12571.3
3742
+ },
3743
+ {
3744
+ "step": 413,
3745
+ "epoch": 1,
3746
+ "loss": 0.01871246826772906,
3747
+ "lr": 9.363442793386606e-06,
3748
+ "grad_norm": 0.24232839047908783,
3749
+ "skipped": false,
3750
+ "seconds": 12603.8
3751
+ },
3752
+ {
3753
+ "step": 414,
3754
+ "epoch": 1,
3755
+ "loss": 0.013039972662259746,
3756
+ "lr": 9.179372140119525e-06,
3757
+ "grad_norm": 0.21381565928459167,
3758
+ "skipped": false,
3759
+ "seconds": 12636.0
3760
+ },
3761
+ {
3762
+ "step": 415,
3763
+ "epoch": 1,
3764
+ "loss": 0.01748069505959961,
3765
+ "lr": 8.996945735790447e-06,
3766
+ "grad_norm": 0.2568955421447754,
3767
+ "skipped": false,
3768
+ "seconds": 12664.7
3769
+ },
3770
+ {
3771
+ "step": 416,
3772
+ "epoch": 1,
3773
+ "loss": 0.014440955766563963,
3774
+ "lr": 8.816170928508365e-06,
3775
+ "grad_norm": 0.2171037197113037,
3776
+ "skipped": false,
3777
+ "seconds": 12695.5
3778
+ },
3779
+ {
3780
+ "step": 417,
3781
+ "epoch": 1,
3782
+ "loss": 0.013840633916014087,
3783
+ "lr": 8.637054999856148e-06,
3784
+ "grad_norm": 0.265576034784317,
3785
+ "skipped": false,
3786
+ "seconds": 12723.2
3787
+ },
3788
+ {
3789
+ "step": 418,
3790
+ "epoch": 1,
3791
+ "loss": 0.014396657270685956,
3792
+ "lr": 8.459605164597267e-06,
3793
+ "grad_norm": 0.26587891578674316,
3794
+ "skipped": false,
3795
+ "seconds": 12754.4
3796
+ },
3797
+ {
3798
+ "step": 419,
3799
+ "epoch": 1,
3800
+ "loss": 0.01791663248030866,
3801
+ "lr": 8.283828570385238e-06,
3802
+ "grad_norm": 0.3830026388168335,
3803
+ "skipped": false,
3804
+ "seconds": 12785.5
3805
+ },
3806
+ {
3807
+ "step": 420,
3808
+ "epoch": 1,
3809
+ "loss": 0.016166413976127142,
3810
+ "lr": 8.109732297475635e-06,
3811
+ "grad_norm": 0.26750504970550537,
3812
+ "skipped": false,
3813
+ "seconds": 12816.0
3814
+ },
3815
+ {
3816
+ "step": 421,
3817
+ "epoch": 1,
3818
+ "loss": 0.012980075526736159,
3819
+ "lr": 7.937323358440935e-06,
3820
+ "grad_norm": 0.23061294853687286,
3821
+ "skipped": false,
3822
+ "seconds": 12847.4
3823
+ },
3824
+ {
3825
+ "step": 422,
3826
+ "epoch": 1,
3827
+ "loss": 0.01326038453287219,
3828
+ "lr": 7.766608697888095e-06,
3829
+ "grad_norm": 0.2267688363790512,
3830
+ "skipped": false,
3831
+ "seconds": 12877.5
3832
+ },
3833
+ {
3834
+ "step": 423,
3835
+ "epoch": 1,
3836
+ "loss": 0.01464304382652022,
3837
+ "lr": 7.597595192178702e-06,
3838
+ "grad_norm": 0.26651710271835327,
3839
+ "skipped": false,
3840
+ "seconds": 12906.8
3841
+ },
3842
+ {
3843
+ "step": 424,
3844
+ "epoch": 1,
3845
+ "loss": 0.014991654364183522,
3846
+ "lr": 7.430289649152156e-06,
3847
+ "grad_norm": 3.3915822505950928,
3848
+ "skipped": false,
3849
+ "seconds": 12938.5
3850
+ },
3851
+ {
3852
+ "step": 425,
3853
+ "epoch": 1,
3854
+ "loss": 0.01039733584913624,
3855
+ "lr": 7.264698807851328e-06,
3856
+ "grad_norm": 0.1901535987854004,
3857
+ "skipped": false,
3858
+ "seconds": 12967.8
3859
+ },
3860
+ {
3861
+ "step": 426,
3862
+ "epoch": 1,
3863
+ "loss": 0.01814713527780788,
3864
+ "lr": 7.100829338251147e-06,
3865
+ "grad_norm": 0.3595639765262604,
3866
+ "skipped": false,
3867
+ "seconds": 12997.6
3868
+ },
3869
+ {
3870
+ "step": 427,
3871
+ "epoch": 1,
3872
+ "loss": 0.017600897006762102,
3873
+ "lr": 6.9386878409899715e-06,
3874
+ "grad_norm": 0.26794108748435974,
3875
+ "skipped": false,
3876
+ "seconds": 13028.5
3877
+ },
3878
+ {
3879
+ "step": 428,
3880
+ "epoch": 1,
3881
+ "loss": 0.013089698404604005,
3882
+ "lr": 6.778280847103669e-06,
3883
+ "grad_norm": 0.22527790069580078,
3884
+ "skipped": false,
3885
+ "seconds": 13058.3
3886
+ },
3887
+ {
3888
+ "step": 429,
3889
+ "epoch": 1,
3890
+ "loss": 0.014918052926552072,
3891
+ "lr": 6.619614817762537e-06,
3892
+ "grad_norm": 0.23448950052261353,
3893
+ "skipped": false,
3894
+ "seconds": 13090.1
3895
+ },
3896
+ {
3897
+ "step": 430,
3898
+ "epoch": 1,
3899
+ "loss": 0.01596330983663676,
3900
+ "lr": 6.462696144011149e-06,
3901
+ "grad_norm": 0.2590503692626953,
3902
+ "skipped": false,
3903
+ "seconds": 13121.9
3904
+ },
3905
+ {
3906
+ "step": 431,
3907
+ "epoch": 1,
3908
+ "loss": 0.0151835978799376,
3909
+ "lr": 6.3075311465107535e-06,
3910
+ "grad_norm": 0.20222195982933044,
3911
+ "skipped": false,
3912
+ "seconds": 13152.0
3913
+ },
3914
+ {
3915
+ "step": 432,
3916
+ "epoch": 1,
3917
+ "loss": 0.016157260446313156,
3918
+ "lr": 6.154126075284855e-06,
3919
+ "grad_norm": 0.26201319694519043,
3920
+ "skipped": false,
3921
+ "seconds": 13182.5
3922
+ },
3923
+ {
3924
+ "step": 433,
3925
+ "epoch": 1,
3926
+ "loss": 0.017083022302860837,
3927
+ "lr": 6.002487109467347e-06,
3928
+ "grad_norm": 0.3449777364730835,
3929
+ "skipped": false,
3930
+ "seconds": 13212.7
3931
+ },
3932
+ {
3933
+ "step": 434,
3934
+ "epoch": 1,
3935
+ "loss": 0.01500254542848523,
3936
+ "lr": 5.852620357053651e-06,
3937
+ "grad_norm": 0.2756975293159485,
3938
+ "skipped": false,
3939
+ "seconds": 13243.5
3940
+ },
3941
+ {
3942
+ "step": 435,
3943
+ "epoch": 1,
3944
+ "loss": 0.02222851620663891,
3945
+ "lr": 5.704531854654721e-06,
3946
+ "grad_norm": 0.3507115840911865,
3947
+ "skipped": false,
3948
+ "seconds": 13273.1
3949
+ },
3950
+ {
3951
+ "step": 436,
3952
+ "epoch": 1,
3953
+ "loss": 0.019562456892998556,
3954
+ "lr": 5.558227567253832e-06,
3955
+ "grad_norm": 0.49055540561676025,
3956
+ "skipped": false,
3957
+ "seconds": 13303.6
3958
+ },
3959
+ {
3960
+ "step": 437,
3961
+ "epoch": 1,
3962
+ "loss": 0.016707392397116234,
3963
+ "lr": 5.413713387966329e-06,
3964
+ "grad_norm": 0.30712446570396423,
3965
+ "skipped": false,
3966
+ "seconds": 13331.3
3967
+ },
3968
+ {
3969
+ "step": 438,
3970
+ "epoch": 1,
3971
+ "loss": 0.015860420129522206,
3972
+ "lr": 5.270995137802315e-06,
3973
+ "grad_norm": 0.2504942715167999,
3974
+ "skipped": false,
3975
+ "seconds": 13361.0
3976
+ },
3977
+ {
3978
+ "step": 439,
3979
+ "epoch": 1,
3980
+ "loss": 0.017581775125712695,
3981
+ "lr": 5.13007856543209e-06,
3982
+ "grad_norm": 0.24654711782932281,
3983
+ "skipped": false,
3984
+ "seconds": 13393.6
3985
+ },
3986
+ {
3987
+ "step": 440,
3988
+ "epoch": 1,
3989
+ "loss": 0.017193995594407954,
3990
+ "lr": 4.99096934695461e-06,
3991
+ "grad_norm": 0.2912333011627197,
3992
+ "skipped": false,
3993
+ "seconds": 13423.5
3994
+ },
3995
+ {
3996
+ "step": 441,
3997
+ "epoch": 1,
3998
+ "loss": 0.016572819199672965,
3999
+ "lr": 4.853673085668947e-06,
4000
+ "grad_norm": 0.24467350542545319,
4001
+ "skipped": false,
4002
+ "seconds": 13452.7
4003
+ },
4004
+ {
4005
+ "step": 442,
4006
+ "epoch": 1,
4007
+ "loss": 0.0161877468859019,
4008
+ "lr": 4.7181953118484556e-06,
4009
+ "grad_norm": 0.3681254982948303,
4010
+ "skipped": false,
4011
+ "seconds": 13482.4
4012
+ },
4013
+ {
4014
+ "step": 443,
4015
+ "epoch": 1,
4016
+ "loss": 0.017729474168756372,
4017
+ "lr": 4.58454148251814e-06,
4018
+ "grad_norm": 0.25886455178260803,
4019
+ "skipped": false,
4020
+ "seconds": 13513.4
4021
+ },
4022
+ {
4023
+ "step": 444,
4024
+ "epoch": 1,
4025
+ "loss": 0.017672039854985017,
4026
+ "lr": 4.452716981234744e-06,
4027
+ "grad_norm": 0.3544117510318756,
4028
+ "skipped": false,
4029
+ "seconds": 13543.3
4030
+ },
4031
+ {
4032
+ "step": 445,
4033
+ "epoch": 1,
4034
+ "loss": 0.014902976864204671,
4035
+ "lr": 4.322727117869951e-06,
4036
+ "grad_norm": 0.2283497452735901,
4037
+ "skipped": false,
4038
+ "seconds": 13573.1
4039
+ },
4040
+ {
4041
+ "step": 446,
4042
+ "epoch": 1,
4043
+ "loss": 0.017319539780133623,
4044
+ "lr": 4.19457712839652e-06,
4045
+ "grad_norm": 0.36809778213500977,
4046
+ "skipped": false,
4047
+ "seconds": 13602.4
4048
+ },
4049
+ {
4050
+ "step": 447,
4051
+ "epoch": 1,
4052
+ "loss": 0.021381757385359655,
4053
+ "lr": 4.068272174677335e-06,
4054
+ "grad_norm": 0.3147641718387604,
4055
+ "skipped": false,
4056
+ "seconds": 13632.3
4057
+ },
4058
+ {
4059
+ "step": 448,
4060
+ "epoch": 1,
4061
+ "loss": 0.01543112478605562,
4062
+ "lr": 3.9438173442575e-06,
4063
+ "grad_norm": 0.22462071478366852,
4064
+ "skipped": false,
4065
+ "seconds": 13662.9
4066
+ },
4067
+ {
4068
+ "step": 449,
4069
+ "epoch": 1,
4070
+ "loss": 0.01753268618065157,
4071
+ "lr": 3.821217650159453e-06,
4072
+ "grad_norm": 0.22539229691028595,
4073
+ "skipped": false,
4074
+ "seconds": 13694.8
4075
+ },
4076
+ {
4077
+ "step": 450,
4078
+ "epoch": 1,
4079
+ "loss": 0.01648473962055351,
4080
+ "lr": 3.700478030680987e-06,
4081
+ "grad_norm": 0.22293080389499664,
4082
+ "skipped": false,
4083
+ "seconds": 13725.2
4084
+ },
4085
+ {
4086
+ "step": 451,
4087
+ "epoch": 1,
4088
+ "loss": 0.01837570977896805,
4089
+ "lr": 3.581603349196372e-06,
4090
+ "grad_norm": 0.24224314093589783,
4091
+ "skipped": false,
4092
+ "seconds": 13755.3
4093
+ },
4094
+ {
4095
+ "step": 452,
4096
+ "epoch": 1,
4097
+ "loss": 0.011402834787101922,
4098
+ "lr": 3.4645983939604496e-06,
4099
+ "grad_norm": 0.21129898726940155,
4100
+ "skipped": false,
4101
+ "seconds": 13784.0
4102
+ },
4103
+ {
4104
+ "step": 453,
4105
+ "epoch": 1,
4106
+ "loss": 0.013870194191312664,
4107
+ "lr": 3.349467877915746e-06,
4108
+ "grad_norm": 0.21010389924049377,
4109
+ "skipped": false,
4110
+ "seconds": 13813.6
4111
+ },
4112
+ {
4113
+ "step": 454,
4114
+ "epoch": 1,
4115
+ "loss": 0.014568589164859322,
4116
+ "lr": 3.2362164385026706e-06,
4117
+ "grad_norm": 0.2321111261844635,
4118
+ "skipped": false,
4119
+ "seconds": 13845.4
4120
+ },
4121
+ {
4122
+ "step": 455,
4123
+ "epoch": 1,
4124
+ "loss": 0.015580425932430933,
4125
+ "lr": 3.1248486374726883e-06,
4126
+ "grad_norm": 0.2638421356678009,
4127
+ "skipped": false,
4128
+ "seconds": 13877.1
4129
+ },
4130
+ {
4131
+ "step": 456,
4132
+ "epoch": 1,
4133
+ "loss": 0.013652178491824374,
4134
+ "lr": 3.0153689607045845e-06,
4135
+ "grad_norm": 0.24279172718524933,
4136
+ "skipped": false,
4137
+ "seconds": 13907.7
4138
+ },
4139
+ {
4140
+ "step": 457,
4141
+ "epoch": 1,
4142
+ "loss": 0.01109541549945247,
4143
+ "lr": 2.9077818180237693e-06,
4144
+ "grad_norm": 0.22842855751514435,
4145
+ "skipped": false,
4146
+ "seconds": 13939.2
4147
+ },
4148
+ {
4149
+ "step": 458,
4150
+ "epoch": 1,
4151
+ "loss": 0.016054675009398334,
4152
+ "lr": 2.802091543024671e-06,
4153
+ "grad_norm": 0.3169231414794922,
4154
+ "skipped": false,
4155
+ "seconds": 13968.8
4156
+ },
4157
+ {
4158
+ "step": 459,
4159
+ "epoch": 1,
4160
+ "loss": 0.021520703001592777,
4161
+ "lr": 2.6983023928961404e-06,
4162
+ "grad_norm": 0.4069320857524872,
4163
+ "skipped": false,
4164
+ "seconds": 14000.2
4165
+ },
4166
+ {
4167
+ "step": 460,
4168
+ "epoch": 1,
4169
+ "loss": 0.013510759170049744,
4170
+ "lr": 2.596418548250029e-06,
4171
+ "grad_norm": 0.21013274788856506,
4172
+ "skipped": false,
4173
+ "seconds": 14031.5
4174
+ },
4175
+ {
4176
+ "step": 461,
4177
+ "epoch": 1,
4178
+ "loss": 0.013634231950015235,
4179
+ "lr": 2.496444112952734e-06,
4180
+ "grad_norm": 0.29028260707855225,
4181
+ "skipped": false,
4182
+ "seconds": 14063.1
4183
+ },
4184
+ {
4185
+ "step": 462,
4186
+ "epoch": 1,
4187
+ "loss": 0.01630439492373671,
4188
+ "lr": 2.3983831139599287e-06,
4189
+ "grad_norm": 0.23812183737754822,
4190
+ "skipped": false,
4191
+ "seconds": 14094.4
4192
+ },
4193
+ {
4194
+ "step": 463,
4195
+ "epoch": 1,
4196
+ "loss": 0.015388567299092912,
4197
+ "lr": 2.3022395011543686e-06,
4198
+ "grad_norm": 0.22293654084205627,
4199
+ "skipped": false,
4200
+ "seconds": 14123.4
4201
+ },
4202
+ {
4203
+ "step": 464,
4204
+ "epoch": 1,
4205
+ "loss": 0.015927969555081974,
4206
+ "lr": 2.208017147186736e-06,
4207
+ "grad_norm": 0.28787466883659363,
4208
+ "skipped": false,
4209
+ "seconds": 14154.5
4210
+ },
4211
+ {
4212
+ "step": 465,
4213
+ "epoch": 1,
4214
+ "loss": 0.014266629292836635,
4215
+ "lr": 2.1157198473197414e-06,
4216
+ "grad_norm": 0.23060643672943115,
4217
+ "skipped": false,
4218
+ "seconds": 14185.9
4219
+ },
4220
+ {
4221
+ "step": 466,
4222
+ "epoch": 1,
4223
+ "loss": 0.019002444870969852,
4224
+ "lr": 2.0253513192751373e-06,
4225
+ "grad_norm": 0.2352025806903839,
4226
+ "skipped": false,
4227
+ "seconds": 14216.0
4228
+ },
4229
+ {
4230
+ "step": 467,
4231
+ "epoch": 1,
4232
+ "loss": 0.016235436245141923,
4233
+ "lr": 1.9369152030840556e-06,
4234
+ "grad_norm": 0.3779015839099884,
4235
+ "skipped": false,
4236
+ "seconds": 14246.5
4237
+ },
4238
+ {
4239
+ "step": 468,
4240
+ "epoch": 1,
4241
+ "loss": 0.02078640302022298,
4242
+ "lr": 1.8504150609403858e-06,
4243
+ "grad_norm": 0.3310161232948303,
4244
+ "skipped": false,
4245
+ "seconds": 14277.5
4246
+ },
4247
+ {
4248
+ "step": 469,
4249
+ "epoch": 1,
4250
+ "loss": 0.012792520942559773,
4251
+ "lr": 1.7658543770572189e-06,
4252
+ "grad_norm": 0.21761828660964966,
4253
+ "skipped": false,
4254
+ "seconds": 14307.9
4255
+ },
4256
+ {
4257
+ "step": 470,
4258
+ "epoch": 1,
4259
+ "loss": 0.016218211290812422,
4260
+ "lr": 1.6832365575265741e-06,
4261
+ "grad_norm": 0.20596861839294434,
4262
+ "skipped": false,
4263
+ "seconds": 14338.0
4264
+ },
4265
+ {
4266
+ "step": 471,
4267
+ "epoch": 1,
4268
+ "loss": 0.019815962166179115,
4269
+ "lr": 1.6025649301821876e-06,
4270
+ "grad_norm": 0.28267160058021545,
4271
+ "skipped": false,
4272
+ "seconds": 14369.4
4273
+ },
4274
+ {
4275
+ "step": 472,
4276
+ "epoch": 1,
4277
+ "loss": 0.013912331480348034,
4278
+ "lr": 1.523842744465437e-06,
4279
+ "grad_norm": 0.23686163127422333,
4280
+ "skipped": false,
4281
+ "seconds": 14399.0
4282
+ },
4283
+ {
4284
+ "step": 473,
4285
+ "epoch": 1,
4286
+ "loss": 0.013959775194577858,
4287
+ "lr": 1.4470731712944884e-06,
4288
+ "grad_norm": 0.2434159815311432,
4289
+ "skipped": false,
4290
+ "seconds": 14429.9
4291
+ },
4292
+ {
4293
+ "step": 474,
4294
+ "epoch": 1,
4295
+ "loss": 0.01357290552109755,
4296
+ "lr": 1.372259302936546e-06,
4297
+ "grad_norm": 0.2746292054653168,
4298
+ "skipped": false,
4299
+ "seconds": 14461.3
4300
+ },
4301
+ {
4302
+ "step": 475,
4303
+ "epoch": 1,
4304
+ "loss": 0.014042890674668011,
4305
+ "lr": 1.2994041528833266e-06,
4306
+ "grad_norm": 0.2632994055747986,
4307
+ "skipped": false,
4308
+ "seconds": 14492.8
4309
+ },
4310
+ {
4311
+ "step": 476,
4312
+ "epoch": 1,
4313
+ "loss": 0.013474665587544012,
4314
+ "lr": 1.2285106557296477e-06,
4315
+ "grad_norm": 0.2416546642780304,
4316
+ "skipped": false,
4317
+ "seconds": 14523.3
4318
+ },
4319
+ {
4320
+ "step": 477,
4321
+ "epoch": 1,
4322
+ "loss": 0.01666516979245374,
4323
+ "lr": 1.1595816670552428e-06,
4324
+ "grad_norm": 0.23275969922542572,
4325
+ "skipped": false,
4326
+ "seconds": 14552.4
4327
+ },
4328
+ {
4329
+ "step": 478,
4330
+ "epoch": 1,
4331
+ "loss": 0.011933755860480118,
4332
+ "lr": 1.0926199633097157e-06,
4333
+ "grad_norm": 0.22021210193634033,
4334
+ "skipped": false,
4335
+ "seconds": 14582.8
4336
+ },
4337
+ {
4338
+ "step": 479,
4339
+ "epoch": 1,
4340
+ "loss": 0.01824787427528745,
4341
+ "lr": 1.02762824170074e-06,
4342
+ "grad_norm": 0.2591199576854706,
4343
+ "skipped": false,
4344
+ "seconds": 14612.6
4345
+ },
4346
+ {
4347
+ "step": 480,
4348
+ "epoch": 1,
4349
+ "loss": 0.01649331980774414,
4350
+ "lr": 9.646091200853802e-07,
4351
+ "grad_norm": 0.3194705545902252,
4352
+ "skipped": false,
4353
+ "seconds": 14645.0
4354
+ },
4355
+ {
4356
+ "step": 481,
4357
+ "epoch": 1,
4358
+ "loss": 0.02036778127466428,
4359
+ "lr": 9.035651368646648e-07,
4360
+ "grad_norm": 0.43635284900665283,
4361
+ "skipped": false,
4362
+ "seconds": 14675.4
4363
+ },
4364
+ {
4365
+ "step": 482,
4366
+ "epoch": 1,
4367
+ "loss": 0.016031105149885316,
4368
+ "lr": 8.444987508813451e-07,
4369
+ "grad_norm": 0.22120577096939087,
4370
+ "skipped": false,
4371
+ "seconds": 14706.1
4372
+ },
4373
+ {
4374
+ "step": 483,
4375
+ "epoch": 1,
4376
+ "loss": 0.015851634324078795,
4377
+ "lr": 7.874123413208145e-07,
4378
+ "grad_norm": 0.3351321816444397,
4379
+ "skipped": false,
4380
+ "seconds": 14737.7
4381
+ },
4382
+ {
4383
+ "step": 484,
4384
+ "epoch": 1,
4385
+ "loss": 0.017026997200027875,
4386
+ "lr": 7.323082076153509e-07,
4387
+ "grad_norm": 0.28247079253196716,
4388
+ "skipped": false,
4389
+ "seconds": 14768.3
4390
+ },
4391
+ {
4392
+ "step": 485,
4393
+ "epoch": 1,
4394
+ "loss": 0.021605440543634866,
4395
+ "lr": 6.791885693514133e-07,
4396
+ "grad_norm": 0.27851662039756775,
4397
+ "skipped": false,
4398
+ "seconds": 14799.0
4399
+ },
4400
+ {
4401
+ "step": 486,
4402
+ "epoch": 1,
4403
+ "loss": 0.017235946980944803,
4404
+ "lr": 6.280555661802856e-07,
4405
+ "grad_norm": 0.2936553657054901,
4406
+ "skipped": false,
4407
+ "seconds": 14829.3
4408
+ },
4409
+ {
4410
+ "step": 487,
4411
+ "epoch": 1,
4412
+ "loss": 0.01512704289275211,
4413
+ "lr": 5.78911257731879e-07,
4414
+ "grad_norm": 0.21169595420360565,
4415
+ "skipped": false,
4416
+ "seconds": 14860.4
4417
+ },
4418
+ {
4419
+ "step": 488,
4420
+ "epoch": 1,
4421
+ "loss": 0.016688139252046503,
4422
+ "lr": 5.317576235317756e-07,
4423
+ "grad_norm": 0.2827041745185852,
4424
+ "skipped": false,
4425
+ "seconds": 14891.6
4426
+ },
4427
+ {
4428
+ "step": 489,
4429
+ "epoch": 1,
4430
+ "loss": 0.014433720455782647,
4431
+ "lr": 4.865965629214819e-07,
4432
+ "grad_norm": 0.24454833567142487,
4433
+ "skipped": false,
4434
+ "seconds": 14922.8
4435
+ },
4436
+ {
4437
+ "step": 490,
4438
+ "epoch": 1,
4439
+ "loss": 0.01710877140949955,
4440
+ "lr": 4.434298949819449e-07,
4441
+ "grad_norm": 0.2576327621936798,
4442
+ "skipped": false,
4443
+ "seconds": 14954.1
4444
+ },
4445
+ {
4446
+ "step": 491,
4447
+ "epoch": 1,
4448
+ "loss": 0.024297605621693766,
4449
+ "lr": 4.02259358460233e-07,
4450
+ "grad_norm": 0.46404898166656494,
4451
+ "skipped": false,
4452
+ "seconds": 14983.7
4453
+ },
4454
+ {
4455
+ "step": 492,
4456
+ "epoch": 1,
4457
+ "loss": 0.01663580822664791,
4458
+ "lr": 3.630866116995757e-07,
4459
+ "grad_norm": 0.27184104919433594,
4460
+ "skipped": false,
4461
+ "seconds": 15014.6
4462
+ },
4463
+ {
4464
+ "step": 493,
4465
+ "epoch": 1,
4466
+ "loss": 0.020265022200381948,
4467
+ "lr": 3.2591323257248893e-07,
4468
+ "grad_norm": 0.24386714398860931,
4469
+ "skipped": false,
4470
+ "seconds": 15045.4
4471
+ },
4472
+ {
4473
+ "step": 494,
4474
+ "epoch": 1,
4475
+ "loss": 0.016951551928618313,
4476
+ "lr": 2.907407184172706e-07,
4477
+ "grad_norm": 0.27427002787590027,
4478
+ "skipped": false,
4479
+ "seconds": 15075.4
4480
+ },
4481
+ {
4482
+ "step": 495,
4483
+ "epoch": 1,
4484
+ "loss": 0.016049816498071592,
4485
+ "lr": 2.5757048597765396e-07,
4486
+ "grad_norm": 0.22172033786773682,
4487
+ "skipped": false,
4488
+ "seconds": 15106.9
4489
+ },
4490
+ {
4491
+ "step": 496,
4492
+ "epoch": 1,
4493
+ "loss": 0.01609070582001692,
4494
+ "lr": 2.2640387134577058e-07,
4495
+ "grad_norm": 0.2710008919239044,
4496
+ "skipped": false,
4497
+ "seconds": 15136.7
4498
+ },
4499
+ {
4500
+ "step": 497,
4501
+ "epoch": 1,
4502
+ "loss": 0.015595577054981822,
4503
+ "lr": 1.9724212990830938e-07,
4504
+ "grad_norm": 0.25194889307022095,
4505
+ "skipped": false,
4506
+ "seconds": 15166.6
4507
+ },
4508
+ {
4509
+ "step": 498,
4510
+ "epoch": 1,
4511
+ "loss": 0.011678507451703827,
4512
+ "lr": 1.7008643629596866e-07,
4513
+ "grad_norm": 2.243579626083374,
4514
+ "skipped": false,
4515
+ "seconds": 15197.3
4516
+ },
4517
+ {
4518
+ "step": 499,
4519
+ "epoch": 1,
4520
+ "loss": 0.014588745646268718,
4521
+ "lr": 1.449378843361271e-07,
4522
+ "grad_norm": 0.2866562604904175,
4523
+ "skipped": false,
4524
+ "seconds": 15228.6
4525
+ },
4526
+ {
4527
+ "step": 500,
4528
+ "epoch": 1,
4529
+ "loss": 0.013277890113232332,
4530
+ "lr": 1.2179748700879012e-07,
4531
+ "grad_norm": 0.2638900876045227,
4532
+ "skipped": false,
4533
+ "seconds": 15259.5
4534
+ },
4535
+ {
4536
+ "step": 501,
4537
+ "epoch": 1,
4538
+ "loss": 0.013807131787219783,
4539
+ "lr": 1.0066617640578368e-07,
4540
+ "grad_norm": 0.23005108535289764,
4541
+ "skipped": false,
4542
+ "seconds": 15290.9
4543
+ },
4544
+ {
4545
+ "step": 502,
4546
+ "epoch": 1,
4547
+ "loss": 0.02514329022550263,
4548
+ "lr": 8.15448036932176e-08,
4549
+ "grad_norm": 0.24505768716335297,
4550
+ "skipped": false,
4551
+ "seconds": 15323.3
4552
+ },
4553
+ {
4554
+ "step": 503,
4555
+ "epoch": 1,
4556
+ "loss": 0.019522010527541444,
4557
+ "lr": 6.443413907720186e-08,
4558
+ "grad_norm": 0.3740701973438263,
4559
+ "skipped": false,
4560
+ "seconds": 15353.2
4561
+ },
4562
+ {
4563
+ "step": 504,
4564
+ "epoch": 1,
4565
+ "loss": 0.015291050259849599,
4566
+ "lr": 4.933487177280482e-08,
4567
+ "grad_norm": 0.29071199893951416,
4568
+ "skipped": false,
4569
+ "seconds": 15383.7
4570
+ },
4571
+ {
4572
+ "step": 505,
4573
+ "epoch": 1,
4574
+ "loss": 0.014405335253931761,
4575
+ "lr": 3.624760997631982e-08,
4576
+ "grad_norm": 0.2308592051267624,
4577
+ "skipped": false,
4578
+ "seconds": 15414.3
4579
+ },
4580
+ {
4581
+ "step": 506,
4582
+ "epoch": 1,
4583
+ "loss": 0.012780588496198009,
4584
+ "lr": 2.5172880840745873e-08,
4585
+ "grad_norm": 0.25191834568977356,
4586
+ "skipped": false,
4587
+ "seconds": 15445.2
4588
+ },
4589
+ {
4590
+ "step": 507,
4591
+ "epoch": 1,
4592
+ "loss": 0.01951780338693646,
4593
+ "lr": 1.6111130454543598e-08,
4594
+ "grad_norm": 0.47091758251190186,
4595
+ "skipped": false,
4596
+ "seconds": 15474.9
4597
+ },
4598
+ {
4599
+ "step": 508,
4600
+ "epoch": 1,
4601
+ "loss": 0.014618728624938905,
4602
+ "lr": 9.06272382371065e-09,
4603
+ "grad_norm": 0.2414289265871048,
4604
+ "skipped": false,
4605
+ "seconds": 15506.0
4606
+ },
4607
+ {
4608
+ "step": 509,
4609
+ "epoch": 1,
4610
+ "loss": 0.014318742624718845,
4611
+ "lr": 4.0279448570323954e-09,
4612
+ "grad_norm": 0.24327567219734192,
4613
+ "skipped": false,
4614
+ "seconds": 15534.2
4615
+ },
4616
+ {
4617
+ "step": 510,
4618
+ "epoch": 1,
4619
+ "loss": 0.010492502323318565,
4620
+ "lr": 1.0069963546743832e-09,
4621
+ "grad_norm": 0.2578527629375458,
4622
+ "skipped": false,
4623
+ "seconds": 15551.6
4624
+ }
4625
+ ]
4626
+ }
training/train_lora.py ADDED
@@ -0,0 +1,205 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import argparse
2
+ import json
3
+ import math
4
+ import random
5
+ import time
6
+ from pathlib import Path
7
+
8
+ import torch
9
+ import torch.nn.functional as F
10
+ from peft import LoraConfig, get_peft_model
11
+ from torch import nn
12
+ from torch.utils.checkpoint import checkpoint
13
+ from transformers import get_cosine_schedule_with_warmup
14
+
15
+ from predict import LABELS, label_ids, load_model, render, thinking_text
16
+
17
+ LOSS_CHUNK = 256
18
+ WARMUP_FRACTION = 0.03
19
+ MAX_GRAD_NORM = 1.0
20
+ MAX_SKIPPED_IN_A_ROW = 10
21
+
22
+
23
+ def target_modules(model):
24
+ layers = model.model.layers.named_modules(prefix="model.layers")
25
+ return [name for name, module in layers if isinstance(module, nn.Linear)]
26
+
27
+
28
+ def encode_example(tokenizer, labels, row):
29
+ context = tokenizer.encode(render(tokenizer, row["prompt"], True), add_special_tokens=False)
30
+ text = thinking_text(tokenizer, row["prompt"], row["thought"]) + LABELS[row["answer"] - 1]
31
+ ids = tokenizer.encode(text, add_special_tokens=False)
32
+ if ids[: len(context)] != context or ids[-1] != labels[row["answer"] - 1]:
33
+ return None
34
+ return ids, len(context)
35
+
36
+
37
+ def collate(batch, pad_id, device):
38
+ width = max(len(ids) for ids, _ in batch)
39
+ input_ids = torch.full((len(batch), width), pad_id)
40
+ mask = torch.zeros((len(batch), width), dtype=torch.long)
41
+ targets = torch.full((len(batch), width), -100)
42
+ for row, (ids, context) in enumerate(batch):
43
+ start = width - len(ids)
44
+ input_ids[row, start:] = torch.tensor(ids)
45
+ mask[row, start:] = 1
46
+ targets[row, start + context :] = torch.tensor(ids[context:])
47
+ return input_ids.to(device), mask.to(device), targets
48
+
49
+
50
+ def chunk_loss(base, hidden, targets):
51
+ logits = base.lm_head(hidden).float()
52
+ cap = base.config.final_logit_softcapping
53
+ if cap is not None:
54
+ logits = torch.tanh(logits / cap) * cap
55
+ return F.cross_entropy(logits, targets.to(logits.device), reduction="sum")
56
+
57
+
58
+ def loss_sum(model, input_ids, mask, targets):
59
+ base = model.get_base_model()
60
+ position_ids = (mask.cumsum(-1) - 1).clamp(min=0)
61
+ hidden = base.model(
62
+ input_ids=input_ids, attention_mask=mask, position_ids=position_ids, use_cache=False
63
+ ).last_hidden_state
64
+ shifted = targets[:, 1:].to(hidden.device)
65
+ select = shifted != -100
66
+ hidden, shifted = hidden[:, :-1][select], shifted[select]
67
+ chunks = range(0, len(shifted), LOSS_CHUNK)
68
+ return sum(
69
+ checkpoint(chunk_loss, base, hidden[i : i + LOSS_CHUNK], shifted[i : i + LOSS_CHUNK], use_reentrant=False)
70
+ for i in chunks
71
+ )
72
+
73
+
74
+ def peak_memory():
75
+ if not torch.cuda.is_available():
76
+ return []
77
+ return [round(torch.cuda.max_memory_allocated(i) / 2**30, 2) for i in range(torch.cuda.device_count())]
78
+
79
+
80
+ def main():
81
+ parser = argparse.ArgumentParser()
82
+ parser.add_argument("--model", default="google/gemma-4-E4B-it")
83
+ parser.add_argument("--revision", help="model commit to load; the latest one when not given")
84
+ parser.add_argument("--data", default="star/star.jsonl")
85
+ parser.add_argument("--out_dir", default="adapter")
86
+ parser.add_argument("--epochs", type=int, default=2)
87
+ parser.add_argument("--lr", type=float, default=1e-4)
88
+ parser.add_argument("--batch_size", type=int, default=4)
89
+ parser.add_argument("--grad_accum", type=int, default=4)
90
+ parser.add_argument("--max_length", type=int, default=1024)
91
+ parser.add_argument("--rank", type=int, default=16)
92
+ parser.add_argument("--alpha", type=int, default=32)
93
+ parser.add_argument("--dropout", type=float, default=0.05)
94
+ parser.add_argument("--seed", type=int, default=0)
95
+ args = parser.parse_args()
96
+
97
+ tokenizer, model = load_model(args.model, revision=args.revision)
98
+ base_params = sum(p.numel() for p in model.parameters())
99
+ labels = label_ids(tokenizer)
100
+ rows = [json.loads(line) for line in Path(args.data).read_text(encoding="utf-8").splitlines()]
101
+ encoded = [encode_example(tokenizer, labels, row) for row in rows]
102
+ misaligned = sum(e is None for e in encoded)
103
+ examples = [e for e in encoded if e is not None and len(e[0]) <= args.max_length]
104
+ too_long = len(encoded) - misaligned - len(examples)
105
+ print(f"Training on {len(examples)} of {len(rows)} examples: {too_long} longer than {args.max_length} tokens"
106
+ f" and {misaligned} that do not tokenize as context + target were dropped")
107
+ if not examples:
108
+ raise SystemExit("error: no training examples left")
109
+
110
+ dtype = model.dtype
111
+ torch.manual_seed(args.seed)
112
+ modules = target_modules(model)
113
+ config = LoraConfig(
114
+ r=args.rank, lora_alpha=args.alpha, lora_dropout=args.dropout, bias="none", target_modules=modules
115
+ )
116
+ model = get_peft_model(model, config)
117
+ model.gradient_checkpointing_enable(gradient_checkpointing_kwargs={"use_reentrant": False})
118
+ model.enable_input_require_grads()
119
+ model.train()
120
+ params = [p for p in model.parameters() if p.requires_grad]
121
+ adapter_params = sum(p.numel() for p in params)
122
+ print(f"LoRA r={args.rank} on {len(modules)} linear modules: {adapter_params:,} adapter parameters,"
123
+ f" {base_params + adapter_params:,} in total")
124
+
125
+ longest = sorted(examples, key=lambda e: -len(e[0]))[: args.batch_size]
126
+ loss_sum(model, *collate(longest, tokenizer.pad_token_id, model.device)).backward()
127
+ model.zero_grad(set_to_none=True)
128
+ print(f"Longest micro-batch ({len(longest[0][0])} tokens) fits: peak GPU memory {peak_memory()} GB")
129
+
130
+ step_size = args.batch_size * args.grad_accum
131
+ total_steps = args.epochs * math.ceil(len(examples) / step_size)
132
+ optimizer = torch.optim.AdamW(params, lr=args.lr, weight_decay=0.0)
133
+ scheduler = get_cosine_schedule_with_warmup(optimizer, round(WARMUP_FRACTION * total_steps), total_steps)
134
+ scaler = torch.amp.GradScaler(model.device.type, init_scale=2.0**10, enabled=dtype == torch.float16)
135
+ rng = random.Random(args.seed)
136
+ steps, tokens, skipped_in_a_row = [], 0, 0
137
+ start_time = time.time()
138
+ for epoch in range(args.epochs):
139
+ order = examples[:]
140
+ rng.shuffle(order)
141
+ for start in range(0, len(order), step_size):
142
+ step_examples = sorted(order[start : start + step_size], key=lambda e: len(e[0]))
143
+ n_targets = sum(len(ids) - context for ids, context in step_examples)
144
+ step_loss = 0.0
145
+ for i in range(0, len(step_examples), args.batch_size):
146
+ micro = step_examples[i : i + args.batch_size]
147
+ input_ids, mask, targets = collate(micro, tokenizer.pad_token_id, model.device)
148
+ loss = loss_sum(model, input_ids, mask, targets)
149
+ if not math.isfinite(loss.item()):
150
+ raise RuntimeError(f"non-finite loss {loss.item()} at step {len(steps) + 1}")
151
+ scaler.scale(loss / n_targets).backward()
152
+ step_loss += loss.item()
153
+ tokens += int(mask.sum())
154
+ scaler.unscale_(optimizer)
155
+ grad_norm = float(nn.utils.clip_grad_norm_(params, MAX_GRAD_NORM))
156
+ scale = scaler.get_scale()
157
+ scaler.step(optimizer)
158
+ scaler.update()
159
+ skipped = scaler.get_scale() < scale
160
+ if not math.isfinite(grad_norm) and not skipped:
161
+ raise RuntimeError(f"non-finite gradients at step {len(steps) + 1}")
162
+ skipped_in_a_row = skipped_in_a_row + 1 if skipped else 0
163
+ if skipped_in_a_row == MAX_SKIPPED_IN_A_ROW:
164
+ raise RuntimeError(f"{MAX_SKIPPED_IN_A_ROW} steps in a row overflowed in fp16")
165
+ row = {
166
+ "step": len(steps) + 1,
167
+ "epoch": epoch,
168
+ "loss": step_loss / n_targets,
169
+ "lr": scheduler.get_last_lr()[0],
170
+ "grad_norm": grad_norm,
171
+ "skipped": skipped,
172
+ "seconds": round(time.time() - start_time, 1),
173
+ }
174
+ scheduler.step()
175
+ optimizer.zero_grad(set_to_none=True)
176
+ steps.append(row)
177
+ print(json.dumps(row), flush=True)
178
+ seconds = time.time() - start_time
179
+
180
+ out_dir = Path(args.out_dir)
181
+ model.save_pretrained(out_dir)
182
+ log = {
183
+ "config": vars(args),
184
+ "dtype": str(dtype),
185
+ "grad_scaling": scaler.is_enabled(),
186
+ "target_modules": len(modules),
187
+ "base_params": base_params,
188
+ "adapter_params": adapter_params,
189
+ "total_params": base_params + adapter_params,
190
+ "examples": len(rows),
191
+ "trained_examples": len(examples),
192
+ "dropped_too_long": too_long,
193
+ "dropped_misaligned": misaligned,
194
+ "skipped_steps": sum(row["skipped"] for row in steps),
195
+ "seconds": round(seconds, 1),
196
+ "tokens_per_s": round(tokens / seconds, 1),
197
+ "peak_memory_gb": peak_memory(),
198
+ "steps": steps,
199
+ }
200
+ (out_dir / "train_log.json").write_text(json.dumps(log, indent=1) + "\n", encoding="utf-8")
201
+ print(f"Saved the adapter to {out_dir}: final loss {steps[-1]['loss']:.4f}, {log['tokens_per_s']} tokens/s")
202
+
203
+
204
+ if __name__ == "__main__":
205
+ main()