Fixed-width addition transformer

Run rmb41c76 is a 1-block, bias-free causal transformer trained for 4-digit base-10 addition. Operands are zero-padded and answers use 5 digits, retaining overflow.

Results

Metric Value
Validation loss 0.014791
Validation generated-token accuracy 99.38%
Validation exact-answer accuracy 97.46%
No-carry exact-answer accuracy 95.70%
Single-carry exact-answer accuracy 99.22%
Multiple-carry exact-answer accuracy 97.27%
Carry-chain exact-answer accuracy 89.45%

Training configuration

  • Updates: 10000
  • Optimizer: muon
  • Muon peak learning rate: 0.02
  • AdamW peak learning rate: 0.0003
  • Weight decay: 0.01
  • Warmup updates: 100
  • Minimum learning-rate ratio: 0.1
  • Initialization: normal
  • Position encoding: full-head RoPE on queries and keys (theta 10000)
  • Seed: 0
  • Source commit: unavailable

The complete resolved configuration, environment, metrics, source snapshot, and checkpoints are available in training/. Machine-readable hashes and metrics are in export_manifest.json.

Loading

This repository contains custom Transformers code. For reproducible or security-sensitive use, pin the commit revision printed by the uploader.

from transformers import AutoModelForCausalLM, AutoTokenizer

revision = "PINNED_COMMIT_HASH"
tokenizer = AutoTokenizer.from_pretrained(
    "OWNER/REPO", trust_remote_code=True, revision=revision
)
model = AutoModelForCausalLM.from_pretrained(
    "OWNER/REPO", trust_remote_code=True, revision=revision
)
inputs = tokenizer("0000 + 0000 =", return_tensors="pt")
output = model.generate(**inputs, max_new_tokens=model.config.answer_digits, do_sample=False)
print(tokenizer.decode(output[0], skip_special_tokens=True))

Intended use and limitations

This model is intended for mechanistic-interpretability research on its configured fixed-width addition task. It is not a general arithmetic system: inputs outside the configured grammar or width are unsupported, and generated answers must not be treated as reliable calculations.

Downloads last month
9
Safetensors
Model size
42.6k params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support