Add checkpoint: 7,150,018,560 tokens, val_loss=3.2671
Browse files
checkpoint_tokens_7150M_loss_3.2671/README.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
tags:
|
| 4 |
+
- swamla
|
| 5 |
+
- sliding-window-attention
|
| 6 |
+
- multi-head-latent-attention
|
| 7 |
+
- pytorch
|
| 8 |
+
- causal-lm
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# SWA-MLA Model Checkpoint
|
| 12 |
+
|
| 13 |
+
**Training Progress:**
|
| 14 |
+
- Total tokens processed: 7,150,018,560
|
| 15 |
+
- Validation loss: 3.2671
|
| 16 |
+
- Perplexity: 26.23
|
| 17 |
+
|
| 18 |
+
This is an automatic checkpoint uploaded during training when validation loss improved.
|
| 19 |
+
|
| 20 |
+
## Model Architecture
|
| 21 |
+
Hybrid architecture combining:
|
| 22 |
+
- **GatedDeltaNet** blocks for O(n) linear attention (local context)
|
| 23 |
+
- **Multi-head Latent Attention (MLA)** blocks for global context with KV compression
|
| 24 |
+
- **LatentMoE** for efficient mixture-of-experts in latent space
|
| 25 |
+
|
| 26 |
+
## Model Configuration
|
| 27 |
+
- Size: engram-moe-1b
|
| 28 |
+
- Block size (context length): 2048
|
| 29 |
+
- DeltaNet layers per cycle: 2
|
| 30 |
+
- MLA layers per cycle: 1
|
| 31 |
+
- MLA KV LoRA rank: 256
|
| 32 |
+
|
| 33 |
+
## Loading the Model
|
| 34 |
+
```python
|
| 35 |
+
import torch
|
| 36 |
+
from transformers import AutoTokenizer
|
| 37 |
+
|
| 38 |
+
# Load tokenizer
|
| 39 |
+
tokenizer = AutoTokenizer.from_pretrained("Orosius/conatus", subfolder="checkpoint_tokens_7150M_loss_3.2671")
|
| 40 |
+
|
| 41 |
+
# Load model checkpoint
|
| 42 |
+
checkpoint = torch.hub.load_state_dict_from_url(
|
| 43 |
+
f"https://huggingface.co/Orosius/conatus/resolve/main/checkpoint_tokens_7150M_loss_3.2671/pytorch_model.bin",
|
| 44 |
+
map_location="cpu"
|
| 45 |
+
)
|
| 46 |
+
|
| 47 |
+
# You'll need the SWA-MLA model code to instantiate the model
|
| 48 |
+
# See: https://github.com/yourusername/swamla for the model implementation
|
| 49 |
+
```
|
| 50 |
+
|
| 51 |
+
## Training Details
|
| 52 |
+
- Optimizer: muon
|
| 53 |
+
- Learning rate: 0.0001
|
| 54 |
+
- Batch size: 20
|
| 55 |
+
- Gradient accumulation: 1
|
| 56 |
+
|
| 57 |
+
---
|
| 58 |
+
Generated with [SWA-MLA](https://github.com/yourusername/swamla)
|
checkpoint_tokens_7150M_loss_3.2671/config.json
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_type": "swa_mla",
|
| 3 |
+
"total_tokens": 7150018560,
|
| 4 |
+
"val_loss": 3.2670723485946653,
|
| 5 |
+
"training_config": {
|
| 6 |
+
"size": "engram-moe-1b",
|
| 7 |
+
"batch_size": 20,
|
| 8 |
+
"block_size": 2048,
|
| 9 |
+
"dropout": 0.0,
|
| 10 |
+
"local_layers_per_cycle": 2,
|
| 11 |
+
"mla_layers_per_cycle": 1,
|
| 12 |
+
"mla_q_lora_rank": 0,
|
| 13 |
+
"mla_kv_lora_rank": 256,
|
| 14 |
+
"mla_qk_nope_head_dim": 128,
|
| 15 |
+
"mla_qk_rope_head_dim": 64,
|
| 16 |
+
"mla_v_head_dim": 128,
|
| 17 |
+
"cudnn_compatible_heads": true,
|
| 18 |
+
"use_flash_attention": false,
|
| 19 |
+
"use_triton_mla": true,
|
| 20 |
+
"use_triton_kernels": true,
|
| 21 |
+
"use_gated_deltanet": true,
|
| 22 |
+
"deltanet_latent_dim": 0,
|
| 23 |
+
"deltanet_share_qk": false,
|
| 24 |
+
"use_engram": true,
|
| 25 |
+
"engram_layers": "2,6",
|
| 26 |
+
"engram_d_mem": 512,
|
| 27 |
+
"engram_n_hash_heads": 8,
|
| 28 |
+
"engram_ngram_orders": "2,3",
|
| 29 |
+
"engram_conv_kernel": 4,
|
| 30 |
+
"engram_lr_multiplier": 5.0,
|
| 31 |
+
"use_mup": true,
|
| 32 |
+
"mup_base_width": 256,
|
| 33 |
+
"use_progressive": false,
|
| 34 |
+
"progressive_schedule": "512:500M,1024:2B,2048:inf",
|
| 35 |
+
"use_ema": true,
|
| 36 |
+
"ema_decay": 0.9999,
|
| 37 |
+
"yarn_enabled": true,
|
| 38 |
+
"yarn_scale_factor": 1.0,
|
| 39 |
+
"yarn_original_max_seq_len": 2048,
|
| 40 |
+
"yarn_beta_fast": 32.0,
|
| 41 |
+
"yarn_beta_slow": 1.0,
|
| 42 |
+
"yarn_attn_factor": null,
|
| 43 |
+
"fope_enabled": true,
|
| 44 |
+
"fope_n_harmonics": 4,
|
| 45 |
+
"fope_floor_ratio": 0.1,
|
| 46 |
+
"fope_coef_init_std": 0.3,
|
| 47 |
+
"use_residual_scalars": true,
|
| 48 |
+
"x0_lr": 0.5,
|
| 49 |
+
"resid_lr": 0.005,
|
| 50 |
+
"x0_beta1": 0.96,
|
| 51 |
+
"use_moe": true,
|
| 52 |
+
"use_latent_moe": true,
|
| 53 |
+
"n_experts": 64,
|
| 54 |
+
"n_shared_experts": 1,
|
| 55 |
+
"n_activated": 2,
|
| 56 |
+
"expert_dim": null,
|
| 57 |
+
"router_z_loss_coef": 0.001,
|
| 58 |
+
"latent_ratio": 4,
|
| 59 |
+
"latent_dim": null,
|
| 60 |
+
"latent_n_experts": null,
|
| 61 |
+
"latent_n_activated": null,
|
| 62 |
+
"latent_preserve_expert_dim": true,
|
| 63 |
+
"max_iters": 1000000,
|
| 64 |
+
"learning_rate": 0.0001,
|
| 65 |
+
"min_lr": 1e-05,
|
| 66 |
+
"weight_decay": 0.1,
|
| 67 |
+
"beta1": 0.9,
|
| 68 |
+
"beta2": 0.95,
|
| 69 |
+
"warmup_iters": 400,
|
| 70 |
+
"grad_clip": 1.0,
|
| 71 |
+
"gradient_accumulation_steps": 1,
|
| 72 |
+
"gradient_checkpointing": true,
|
| 73 |
+
"optimizer_type": "muon",
|
| 74 |
+
"cautious_wd": true,
|
| 75 |
+
"wd_schedule": true,
|
| 76 |
+
"tokenizer_name": "openai-community/gpt2",
|
| 77 |
+
"num_workers": 8,
|
| 78 |
+
"use_bestfit_crop": true,
|
| 79 |
+
"output_dir": "outputs/full",
|
| 80 |
+
"log_interval": 50,
|
| 81 |
+
"eval_tokens": "50M",
|
| 82 |
+
"save_tokens": "50M",
|
| 83 |
+
"wandb_project": "swamla",
|
| 84 |
+
"wandb_run_name": null,
|
| 85 |
+
"hf_repo_id": "Orosius/conatus",
|
| 86 |
+
"resume_from_hf": true,
|
| 87 |
+
"resume_from": null,
|
| 88 |
+
"compile": true,
|
| 89 |
+
"compile_mode": "default",
|
| 90 |
+
"fp8_backend": "auto",
|
| 91 |
+
"use_fp8": false,
|
| 92 |
+
"use_tensorboard": true,
|
| 93 |
+
"use_wedlm": false,
|
| 94 |
+
"wedlm_block_size": 32,
|
| 95 |
+
"wedlm_min_mask_ratio": 0.1,
|
| 96 |
+
"wedlm_max_mask_ratio": 1.0,
|
| 97 |
+
"wedlm_ar_loss_weight": 0.5,
|
| 98 |
+
"wedlm_mask_token_id": null,
|
| 99 |
+
"profile": false,
|
| 100 |
+
"profile_steps": 5,
|
| 101 |
+
"profile_warmup": 2
|
| 102 |
+
}
|
| 103 |
+
}
|
checkpoint_tokens_7150M_loss_3.2671/pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:24cc781405a25e6b130042e16be778e166dcf2de67fc17a559a7e77a715a1ec9
|
| 3 |
+
size 6526326371
|
checkpoint_tokens_7150M_loss_3.2671/tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
checkpoint_tokens_7150M_loss_3.2671/tokenizer_config.json
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"backend": "tokenizers",
|
| 4 |
+
"bos_token": "<|endoftext|>",
|
| 5 |
+
"eos_token": "<|endoftext|>",
|
| 6 |
+
"errors": "replace",
|
| 7 |
+
"is_local": false,
|
| 8 |
+
"model_max_length": 2048,
|
| 9 |
+
"pad_token": "<|endoftext|>",
|
| 10 |
+
"tokenizer_class": "GPT2Tokenizer",
|
| 11 |
+
"unk_token": "<|endoftext|>"
|
| 12 |
+
}
|