ucr-max commited on
Commit
22bc47a
·
verified ·
1 Parent(s): 8e2c90b

Update README

Browse files
Files changed (1) hide show
  1. README.md +27 -14
README.md CHANGED
@@ -23,11 +23,21 @@ datasets:
23
 
24
  # Atom2.7m
25
 
26
- Atom2.7m is a small decoder-only causal language model trained with a general byte-level BPE tokenizer plus arithmetic-specific digit features. The model has 2,738,880 parameters and uses custom code for both the model and the tokenizer path.
27
 
28
- The main result is on [ArithMark 2.0](https://huggingface.co/datasets/AxiomicLabs/ArithMark-2.0), a 2,500-example integer-arithmetic continuation benchmark. Atom2.7m scores 69.24% accuracy. This places it above the nearby published range of SmolLM2-1.7B at 66.12% and Qwen2.5-0.5B at 63.04%, while using only 2.74M parameters.
29
 
30
- The result shows the leverage of domain-specific design. With arithmetic-aware tokenization and digit features, Atom2.7m reaches the same ArithMark score band as models hundreds of times larger.
 
 
 
 
 
 
 
 
 
 
31
 
32
  ## Model Details
33
 
@@ -47,9 +57,9 @@ The result shows the leverage of domain-specific design. With arithmetic-aware t
47
 
48
  ## Tokenizer
49
 
50
- Use this model with `trust_remote_code=True`. The submission includes an `AtomTokenizer` remote-code wrapper in `tokenization_atom.py` so standard Hugging Face callers can use `AutoTokenizer.from_pretrained(...)`.
51
 
52
- The tokenizer keeps byte-level BPE for ordinary text, but treats arithmetic sensitive spans specially:
53
 
54
  - digits `0`-`9` are atomic and never BPE-merged
55
  - digit spans are emitted least-significant-digit first
@@ -57,6 +67,10 @@ The tokenizer keeps byte-level BPE for ordinary text, but treats arithmetic sens
57
  - whitespace is isolated from text
58
  - arithmetic feature IDs are derived by the model from token IDs at inference time
59
 
 
 
 
 
60
  Training and custom tooling may still pass aligned `place_ids` and `role_ids`, but generic inference and evaluation only need `input_ids` and `attention_mask`.
61
 
62
  ## Usage
@@ -65,17 +79,18 @@ Training and custom tooling may still pass aligned `place_ids` and `role_ids`, b
65
  import torch
66
  from transformers import AutoModelForCausalLM, AutoTokenizer
67
 
68
- model_dir = "."
69
 
70
- model = AutoModelForCausalLM.from_pretrained(
71
- model_dir,
72
- trust_remote_code=True,
73
- ).eval()
74
  tokenizer = AutoTokenizer.from_pretrained(
75
- model_dir,
76
  trust_remote_code=True,
77
  )
78
 
 
 
 
 
 
79
  text = "12 + 34 ="
80
  inputs = tokenizer(text, return_tensors="pt", add_special_tokens=False)
81
 
@@ -142,9 +157,7 @@ multiple-choice continuations do not trip the harness assertion that a
142
  continuation must fit inside the model window. The tokenizer also advertises
143
  `model_max_length=548`, matching the longest sequence observed in this eval run.
144
  The checkpoint was trained with a 512-token context, but the RoPE
145
- implementation can score this slightly longer harness window; reduce batch size
146
- or set `max_length` to the longest sequence found if a task variant contains
147
- longer continuations.
148
 
149
  For multiple-choice or benchmark-style evaluation, no special generation cache
150
  setting is required. Log-likelihood scoring runs full `context + continuation`
 
23
 
24
  # Atom2.7m
25
 
26
+ Atom2.7m is a 2.74M-parameter causal language model for text continuation, with an arithmetic-aware tokenizer and digit-feature pathway designed to improve integer arithmetic behavior at very small scale.
27
 
28
+ The model keeps ordinary byte-level BPE behavior for general text while adding structured handling for arithmetic-sensitive spans: digits are atomic, operators are isolated, digit spans are represented least-significant-digit first, and derived place/role features are passed to the model.
29
 
30
+ On ArithMark 2.0, Atom2.7m reaches 69.24% accuracy, making it an unusually strong arithmetic-continuation model for its size. It should be understood as a compact research model for language modeling, tiny-LM experiments, arithmetic-aware tokenization, and resource-constrained inference, not as a chat assistant or broad mathematical reasoning system.
31
+
32
+ ## Key result
33
+
34
+ | Model | Parameters | ArithMark 2.0 accuracy |
35
+ |---|---:|---:|
36
+ | Atom2.7m | 2.74M | **69.24%** |
37
+ | SmolLM2-1.7B | 1.7B | 66.12% |
38
+ | Qwen2.5-0.5B | 0.5B | 63.04% |
39
+
40
+ This comparison is limited to **ArithMark 2.0**. Atom2.7m is not claimed to be generally stronger than larger models; the result highlights the value of arithmetic-aware representation for integer arithmetic continuation.
41
 
42
  ## Model Details
43
 
 
57
 
58
  ## Tokenizer
59
 
60
+ Most tokenizers represent numbers as ordinary text fragments, which can obscure digit structure. Atom2.7m keeps normal byte-level BPE for general text, but uses a structured arithmetic path for numeric expressions.
61
 
62
+ For arithmetic-sensitive spans:
63
 
64
  - digits `0`-`9` are atomic and never BPE-merged
65
  - digit spans are emitted least-significant-digit first
 
67
  - whitespace is isolated from text
68
  - arithmetic feature IDs are derived by the model from token IDs at inference time
69
 
70
+ This gives a very small causal LM an inductive bias that is better aligned with elementary integer arithmetic.
71
+
72
+ Use this model with `trust_remote_code=True`. The submission includes an `AtomTokenizer` remote-code wrapper in `tokenization_atom.py` so standard Hugging Face callers can use `AutoTokenizer.from_pretrained(...)`.
73
+
74
  Training and custom tooling may still pass aligned `place_ids` and `role_ids`, but generic inference and evaluation only need `input_ids` and `attention_mask`.
75
 
76
  ## Usage
 
79
  import torch
80
  from transformers import AutoModelForCausalLM, AutoTokenizer
81
 
82
+ model_id = "UniversalComputingResearch/Atom2.7m"
83
 
 
 
 
 
84
  tokenizer = AutoTokenizer.from_pretrained(
85
+ model_id,
86
  trust_remote_code=True,
87
  )
88
 
89
+ model = AutoModelForCausalLM.from_pretrained(
90
+ model_id,
91
+ trust_remote_code=True,
92
+ ).eval()
93
+
94
  text = "12 + 34 ="
95
  inputs = tokenizer(text, return_tensors="pt", add_special_tokens=False)
96
 
 
157
  continuation must fit inside the model window. The tokenizer also advertises
158
  `model_max_length=548`, matching the longest sequence observed in this eval run.
159
  The checkpoint was trained with a 512-token context, but the RoPE
160
+ implementation can score this slightly longer harness window.
 
 
161
 
162
  For multiple-choice or benchmark-style evaluation, no special generation cache
163
  setting is required. Log-likelihood scoring runs full `context + continuation`