Release final weights and inference configuration
Browse filesFiles changed (4)
- README.mdAdded+65
- model.safetensorsAdded+3
- model_config.jsonAdded+44
- tokenizer.tiktoken.jsonAdded
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465---library_name: pytorchtags:- nexttransformer- looped- causal-lm- pretrained- safetensorspipeline_tag: text-generation---
# NextTransformer Circle Loop
After the first circuit, every block becomes an exit.
This is the final Circle Loop checkpoint in the NextTransformer 49.152B-token architecture comparison. It has 927,992,523 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.
| Final evaluation | Result ||---|---:|| Validation BPB | 0.6912 || CORE-22 (×100) | 28.97 |
[Architecture](https://github.com/Interactive-Active-AI/NextTransformer/blob/7aa267a88b45e4a19a9739ccb4ba3f196d7aacc0/results/methods/circle.json) · [Run record](https://github.com/Interactive-Active-AI/NextTransformer/blob/7aa267a88b45e4a19a9739ccb4ba3f196d7aacc0/results/runs/circle.json)
## Load the weights
Install the tested NextTransformer implementation and the safetensors reader in a Python 3.10–3.13 environment.
```bashpip install "nexttransformer @ git+https://github.com/Interactive-Active-AI/NextTransformer.git@7aa267a88b45e4a19a9739ccb4ba3f196d7aacc0" safetensors```
The example encodes a prompt with the checkpoint's tokenizer and prints its most likely next token.
```pythonimport base64import jsonfrom pathlib import Path
import tiktokenimport torchfrom huggingface_hub import snapshot_downloadfrom safetensors.torch import load_filefrom nexttransformer.models import build_model, config_from_dict
root = Path(snapshot_download("NextTransformer/Circle-Loop-49B-Tokens"))config = config_from_dict(json.loads((root / "model_config.json").read_text()))model = build_model(config, device="cpu")model.load_state_dict(load_file(root / "model.safetensors"), strict=True)if hasattr(model, "set_step"): model.set_step(46875)model.eval()
spec = json.loads((root / "tokenizer.tiktoken.json").read_text())encoding = tiktoken.Encoding( name=spec["name"], pat_str=spec["pat_str"], mergeable_ranks={base64.b64decode(b): rank for b, rank in spec["mergeable_ranks"]}, special_tokens=spec["special_tokens"],)prompt = [encoding.encode_single_token("<|bos|>")] + encoding.encode_ordinary("The sky is")with torch.inference_mode(): logits = model(torch.tensor([prompt]))print(encoding.decode([int(logits[0, -1].argmax())]))```123version https://git-lfs.github.com/spec/v1oid sha256:44ad98ebd2b0c3274e09696465ba926ab5dad8da2d34bc15bd9d8c0e28121a61size 28060136441234567891011121314151617181920212223242526272829303132333435363738394041424344{ "architecture": "circle", "dense_layers": 24, "pre_layers": 3, "core_layers": 9, "post_layers": 3, "recursions": 3, "activation_checkpointing": false, "fourier_dim": 256, "loop_modulation_bound": 0.5, "loop_condition_lr_multiplier": 0.5, "loop_condition_grad_clip": 1.0, "vocab_size": 32768, "sequence_len": 2048, "width": 1536, "heads": 12, "mlp_width": 6144, "window_pattern": "SSSL", "circle_max_steps": 27, "circle_target_steps": 17.5, "circle_method": "sparse_gate", "circle_budget_mode": "mean_survival", "circle_halter": "delta_depth", "circle_halter_eps": 1e-06, "circle_exit_interval": 1, "circle_threshold": 0.5, "circle_routing_seed": 1729, "circle_budget_beta": 0.9, "circle_random_warmup": 256, "circle_route_transition": 768, "circle_depth_rho": 1.0, "circle_shape_weight": 0.1, "circle_dual_lr": 0.05, "circle_dual_limit": 2.0, "circle_halter_lr_multiplier": 0.5, "circle_halter_grad_clip": 1.0, "mor_target_survival": [ 0.64, 0.32 ], "mor_budget_strength": 1.0, "mor_dual_lr": 0.05, "mor_dual_limit": 10.0}README.mdAdded+65
model.safetensorsAdded+3
model_config.jsonAdded+44
tokenizer.tiktoken.jsonAdded