xjxyys commited on
Commit
23a2de6
·
verified ·
1 Parent(s): 5ea57c3

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

Browse files
Files changed (4) hide show
  1. README.md +73 -0
  2. model.safetensors +3 -0
  3. model_config.json +40 -0
  4. tokenizer.tiktoken.json +0 -0
README.md ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 UT-ACT
13
+
14
+ Let each token accumulate enough computation to halt.
15
+
16
+ This is the final Universal Transformer · ACT checkpoint in the NextTransformer 49.152B-token architecture comparison. It has 742,394,259 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
+ A causal nanochat adaptation of Universal Transformer with Adaptive Computation Time. Halting mass accumulates across recursions, intermediate states are combined, and a ponder cost regularizes computation depth.
19
+
20
+ | Final evaluation | Result |
21
+ |---|---:|
22
+ | Validation BPB | 0.6866 |
23
+ | CORE-22 (×100) | 30.07 |
24
+
25
+ [Architecture](https://github.com/Interactive-Active-AI/NextTransformer/blob/4977f447d9aeb510ecb2cf8a9e8a6812d78b5c69/results/methods/ut_act.json) · [Run record](https://github.com/Interactive-Active-AI/NextTransformer/blob/4977f447d9aeb510ecb2cf8a9e8a6812d78b5c69/results/runs/ut_act.json)
26
+
27
+ The reference path computes every candidate recursion. Average exit depth does not imply lower training compute.
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@4977f447d9aeb510ecb2cf8a9e8a6812d78b5c69" 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/UT-ACT-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
+ model.set_step(46875)
60
+ model.eval()
61
+
62
+ spec = json.loads((root / "tokenizer.tiktoken.json").read_text())
63
+ encoding = tiktoken.Encoding(
64
+ name=spec["name"],
65
+ pat_str=spec["pat_str"],
66
+ mergeable_ranks={base64.b64decode(b): rank for b, rank in spec["mergeable_ranks"]},
67
+ special_tokens=spec["special_tokens"],
68
+ )
69
+ prompt = [encoding.encode_single_token("<|bos|>")] + encoding.encode_ordinary("The sky is")
70
+ with torch.inference_mode():
71
+ logits = model(torch.tensor([prompt]))
72
+ print(encoding.decode([int(logits[0, -1].argmax())]))
73
+ ```
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:77b7befd42e5ea4fb6e38baa4b22e3d91cfd1208e974e9ae6439809ce284257d
3
+ size 2264943820
model_config.json ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "method": "ut_act",
3
+ "width": 1536,
4
+ "heads": 12,
5
+ "vocab_size": 32768,
6
+ "sequence_len": 2048,
7
+ "mlp_width": 6144,
8
+ "layers": 24,
9
+ "pre_layers": 3,
10
+ "core_layers": 6,
11
+ "post_layers": 3,
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