xjxyys commited on
Commit
46c2d4b
·
verified ·
1 Parent(s): 6bee26e

Publish final 49.152B-token checkpoint with model card and tokenizer

Browse files
Files changed (4) hide show
  1. README.md +74 -0
  2. model.safetensors +3 -0
  3. model_config.json +40 -0
  4. tokenizer.tiktoken.json +0 -0
README.md ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: pytorch
3
+ tags:
4
+ - nexttransformer
5
+ - looped
6
+ - causal-lm
7
+ - pretrained
8
+ - safetensors
9
+ pipeline_tag: text-generation
10
+ ---
11
+
12
+ # NextTransformer DeepLoop
13
+
14
+ Stabilize shared depth through normalization and scaling.
15
+
16
+ This is the final DeepLoop checkpoint in the NextTransformer 49.152B-token architecture comparison. It has 742,392,722 parameters and a 2,048-token context. The model was pretrained on ClimbMix for 46,875 updates. The 49B in the repository name refers to training tokens.
17
+
18
+ Twelve shared blocks execute twice with DeepLoop α/β scaling. Because sharing, residual parameterization and normalization change together, paired controls are needed to distinguish their effects.
19
+
20
+ | Final evaluation | Result |
21
+ |---|---:|
22
+ | Validation BPB | 0.7145 |
23
+ | CORE-22 (×100) | 25.45 |
24
+
25
+ [Architecture](https://github.com/Interactive-Active-AI/NextTransformer/blob/b2ea46627f7d0d5c9ef57a655c43b553558417d3/results/methods/deeploop.json) · [Run record](https://github.com/Interactive-Active-AI/NextTransformer/blob/b2ea46627f7d0d5c9ef57a655c43b553558417d3/results/runs/deeploop.json)
26
+
27
+ Scaling the native Value Embeddings is an adaptation. Normalization controls should be reported separately.
28
+
29
+ The upstream run record reports completed training and the trainer's cumulative compute audit; its independent read-only audit remains pending.
30
+
31
+ ## Load the weights
32
+
33
+ Install the tested NextTransformer implementation and the safetensors reader in a Python 3.10–3.13 environment.
34
+
35
+ ```bash
36
+ pip install "nexttransformer @ git+https://github.com/Interactive-Active-AI/NextTransformer.git@b2ea46627f7d0d5c9ef57a655c43b553558417d3" safetensors
37
+ ```
38
+
39
+ The example encodes a prompt with the checkpoint's tokenizer and prints its most likely next token.
40
+
41
+ ```python
42
+ import base64
43
+ import json
44
+ import os
45
+ from pathlib import Path
46
+
47
+ os.environ["CUDA_VISIBLE_DEVICES"] = "" # This example runs on CPU.
48
+
49
+ import tiktoken
50
+ import torch
51
+ from huggingface_hub import snapshot_download
52
+ from safetensors.torch import load_file
53
+ from nexttransformer.models import build_model, config_from_dict
54
+
55
+ root = Path(snapshot_download("NextTransformer/DeepLoop-49B-Tokens"))
56
+ config = config_from_dict(json.loads((root / "model_config.json").read_text()))
57
+ model = build_model(config, device="cpu")
58
+ model.load_state_dict(load_file(root / "model.safetensors"), strict=True)
59
+ if hasattr(model, "set_step"):
60
+ model.set_step(46875)
61
+ model.eval()
62
+
63
+ spec = json.loads((root / "tokenizer.tiktoken.json").read_text())
64
+ encoding = tiktoken.Encoding(
65
+ name=spec["name"],
66
+ pat_str=spec["pat_str"],
67
+ mergeable_ranks={base64.b64decode(b): rank for b, rank in spec["mergeable_ranks"]},
68
+ special_tokens=spec["special_tokens"],
69
+ )
70
+ prompt = [encoding.encode_single_token("<|bos|>")] + encoding.encode_ordinary("The sky is")
71
+ with torch.inference_mode():
72
+ logits = model(torch.tensor([prompt]))
73
+ print(encoding.decode([int(logits[0, -1].argmax())]))
74
+ ```
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3945fcbd6afd4ae74f0494d366a1eabdbe39bf7e23ea3bd3f6911b2ddd71a3e1
3
+ size 2264937504
model_config.json ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "method": "deeploop",
3
+ "width": 1536,
4
+ "heads": 12,
5
+ "vocab_size": 32768,
6
+ "sequence_len": 2048,
7
+ "mlp_width": 6144,
8
+ "layers": 24,
9
+ "pre_layers": 0,
10
+ "core_layers": 12,
11
+ "post_layers": 0,
12
+ "loops": 2,
13
+ "window_pattern": "SSSL",
14
+ "max_loops": 3,
15
+ "act_epsilon": 0.01,
16
+ "ponder_weight": 0.01,
17
+ "huginn_mean": 3.0,
18
+ "huginn_sigma": 0.5,
19
+ "huginn_backprop_loops": 2,
20
+ "routing_seed": 1729,
21
+ "eval_loops": 3,
22
+ "ouro_entropy_weight": 0.1,
23
+ "ouro_gate_steps": 1024,
24
+ "ouro_exit_quantile": 0.5,
25
+ "sparse_topk": 256,
26
+ "block_size": 128,
27
+ "compression_size": 4,
28
+ "local_window": 512,
29
+ "index_heads": 4,
30
+ "index_dim": 128,
31
+ "index_rope_dim": 64,
32
+ "index_loss_weight": 1.0,
33
+ "burnin_steps": 512,
34
+ "slots": 64,
35
+ "gate_rank": 16,
36
+ "conv_size": 4,
37
+ "reference_chunk": 32,
38
+ "backend": "reference",
39
+ "scale": "formal"
40
+ }
tokenizer.tiktoken.json ADDED
The diff for this file is too large to render. See raw diff