Ajaple commited on
Commit
d1d73f1
·
verified ·
1 Parent(s): 4115dce

Upload Gurmukhi decoder base_best checkpoint

Browse files
Files changed (4) hide show
  1. README.md +35 -0
  2. base_best.pt +3 -0
  3. decoder_config.json +29 -0
  4. hf_bpe24k_tokenizer.json +0 -0
README.md ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - pa
4
+ - en
5
+ license: other
6
+ tags:
7
+ - translation
8
+ - punjabi
9
+ - gurmukhi
10
+ - decoder-only
11
+ - pytorch
12
+ ---
13
+
14
+ # Gurmukhi SLM Decoder Checkpoint
15
+
16
+ This repository stores a custom PyTorch decoder-only EN <-> Punjabi Gurmukhi translation checkpoint.
17
+
18
+ ## Files
19
+
20
+ - `base_best.pt`: best PyTorch checkpoint with model, optimizer, scheduler, config, and validation loss.
21
+ - `decoder_config.json`: extracted model/training config.
22
+ - `hf_bpe24k_tokenizer.json`: Hugging Face Tokenizers BPE tokenizer.
23
+
24
+ ## Validation
25
+
26
+ Best validation loss from checkpoint: `0.8814973490578788`
27
+
28
+ ## Loading
29
+
30
+ Use the project notebook/model class `ModernDecoderOnlyTransformer` and load:
31
+
32
+ ```python
33
+ checkpoint = torch.load("base_best.pt", map_location=device)
34
+ model.load_state_dict(checkpoint["model"])
35
+ This is not yet a standard transformers model format.
base_best.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4c48ccc523565787833f21878a040a9df1d25e8a7f8ec90adb1f6d11398ec955
3
+ size 550279051
decoder_config.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "vocab_size": 24000,
3
+ "pad_id": 0,
4
+ "eos_id": 3,
5
+ "profile": "base",
6
+ "max_seq_len": 256,
7
+ "min_target_tokens": 48,
8
+ "d_model": 512,
9
+ "nhead": 8,
10
+ "num_layers": 8,
11
+ "dim_feedforward": 2048,
12
+ "dropout": 0.1,
13
+ "rope_base": 10000.0,
14
+ "gradient_checkpointing": false,
15
+ "batch_size": 192,
16
+ "epochs": 4,
17
+ "lr": 0.0003,
18
+ "min_lr_ratio": 0.05,
19
+ "warmup_steps": 2000,
20
+ "weight_decay": 0.1,
21
+ "grad_accum_steps": 2,
22
+ "clip_grad_norm": 1.0,
23
+ "label_smoothing": 0.05,
24
+ "val_rows": 10000,
25
+ "val_fraction": 0.01,
26
+ "seed": 42,
27
+ "amp": "bf16",
28
+ "style_tag": "<natural>"
29
+ }
hf_bpe24k_tokenizer.json ADDED
The diff for this file is too large to render. See raw diff