Release verified completed 5B weights, tokenizer and inference loader
Browse files- README.md +1 -1
- model.safetensors +2 -2
- provenance.json +2 -2
- release_manifest.json +14 -6
- research_code/pretraining_suffix_min/__init__.py +1 -0
- research_code/pretraining_suffix_min/sampling.py +83 -0
- tied_weights.json +3 -1
README.md
CHANGED
|
@@ -17,7 +17,7 @@ trained from scratch on the frozen FineWeb-Edu corpus. It is an inference releas
|
|
| 17 |
the original model tensors are preserved exactly, without optimizer or RNG state.
|
| 18 |
|
| 19 |
**Visibility:** public baseline.
|
| 20 |
-
**Parameters:**
|
| 21 |
The 5B endpoint uses the original 15B-token learning-rate schedule, stopped at 5B.
|
| 22 |
See `research_config.json` for the actual architecture and training history policy.
|
| 23 |
|
|
|
|
| 17 |
the original model tensors are preserved exactly, without optimizer or RNG state.
|
| 18 |
|
| 19 |
**Visibility:** public baseline.
|
| 20 |
+
**Parameters:** 341,099,520. **Training context:** 2,048 tokens.
|
| 21 |
The 5B endpoint uses the original 15B-token learning-rate schedule, stopped at 5B.
|
| 22 |
See `research_config.json` for the actual architecture and training history policy.
|
| 23 |
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:36f524026cfb6054d8ca0226159e78a1e4062715a869241287a593de6670d251
|
| 3 |
+
size 1364420568
|
provenance.json
CHANGED
|
@@ -11,8 +11,8 @@
|
|
| 11 |
"model_id": "dense",
|
| 12 |
"native_training_context": 2048,
|
| 13 |
"new_gpu_evaluation": false,
|
| 14 |
-
"parameter_count":
|
| 15 |
-
"release_git_revision": "
|
| 16 |
"source_artifact_sha256": "36984a2c331fa28c0d730e8e8f5d887edf6b65b42f711daee079a447d20ee52f",
|
| 17 |
"source_checkpoint_sha256": "010f0d620a9ada040d0e8e35934ec846c45e9df69684759455f68a951ad030dc",
|
| 18 |
"source_repository": "https://github.com/Nicholas0228/tail_drop_attn",
|
|
|
|
| 11 |
"model_id": "dense",
|
| 12 |
"native_training_context": 2048,
|
| 13 |
"new_gpu_evaluation": false,
|
| 14 |
+
"parameter_count": 341099520,
|
| 15 |
+
"release_git_revision": "9e0034ce9a476545474af9cadc49e2fdf163ada9",
|
| 16 |
"source_artifact_sha256": "36984a2c331fa28c0d730e8e8f5d887edf6b65b42f711daee079a447d20ee52f",
|
| 17 |
"source_checkpoint_sha256": "010f0d620a9ada040d0e8e35934ec846c45e9df69684759455f68a951ad030dc",
|
| 18 |
"source_repository": "https://github.com/Nicholas0228/tail_drop_attn",
|
release_manifest.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
| 6 |
},
|
| 7 |
"README.md": {
|
| 8 |
"bytes": 2196,
|
| 9 |
-
"sha256": "
|
| 10 |
},
|
| 11 |
"THIRD_PARTY.md": {
|
| 12 |
"bytes": 1629,
|
|
@@ -21,12 +21,12 @@
|
|
| 21 |
"sha256": "e2389cabfefc5c39a630ec110cb2f27701c3d79b807454b6b4acf1d40955f7a4"
|
| 22 |
},
|
| 23 |
"model.safetensors": {
|
| 24 |
-
"bytes":
|
| 25 |
-
"sha256": "
|
| 26 |
},
|
| 27 |
"provenance.json": {
|
| 28 |
"bytes": 1100,
|
| 29 |
-
"sha256": "
|
| 30 |
},
|
| 31 |
"research_code/pretraining_5b/__init__.py": {
|
| 32 |
"bytes": 59,
|
|
@@ -80,6 +80,14 @@
|
|
| 80 |
"bytes": 2352,
|
| 81 |
"sha256": "16f5e391510f832d14ca312754b46268fff890d225d357462e37e651455a72af"
|
| 82 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 83 |
"research_config.json": {
|
| 84 |
"bytes": 206,
|
| 85 |
"sha256": "57806f0e1869206599088fa814bddddca1121d10f38c4ec4cea643cf90968a70"
|
|
@@ -93,8 +101,8 @@
|
|
| 93 |
"sha256": "c2391c2c7dbedaaad4bac2b854ececd3a668bf546cc9c8d665876bcc0796dc66"
|
| 94 |
},
|
| 95 |
"tied_weights.json": {
|
| 96 |
-
"bytes":
|
| 97 |
-
"sha256": "
|
| 98 |
},
|
| 99 |
"tokenizer.json": {
|
| 100 |
"bytes": 3505608,
|
|
|
|
| 6 |
},
|
| 7 |
"README.md": {
|
| 8 |
"bytes": 2196,
|
| 9 |
+
"sha256": "17ef029fea91e9f1ea8c02103f123a50f23c2319540bd3d2c7f30b94055e73dc"
|
| 10 |
},
|
| 11 |
"THIRD_PARTY.md": {
|
| 12 |
"bytes": 1629,
|
|
|
|
| 21 |
"sha256": "e2389cabfefc5c39a630ec110cb2f27701c3d79b807454b6b4acf1d40955f7a4"
|
| 22 |
},
|
| 23 |
"model.safetensors": {
|
| 24 |
+
"bytes": 1364420568,
|
| 25 |
+
"sha256": "36f524026cfb6054d8ca0226159e78a1e4062715a869241287a593de6670d251"
|
| 26 |
},
|
| 27 |
"provenance.json": {
|
| 28 |
"bytes": 1100,
|
| 29 |
+
"sha256": "ab12f01ef61bfa3b3e76d7279698570a037e98815515dc243a86115981d03e95"
|
| 30 |
},
|
| 31 |
"research_code/pretraining_5b/__init__.py": {
|
| 32 |
"bytes": 59,
|
|
|
|
| 80 |
"bytes": 2352,
|
| 81 |
"sha256": "16f5e391510f832d14ca312754b46268fff890d225d357462e37e651455a72af"
|
| 82 |
},
|
| 83 |
+
"research_code/pretraining_suffix_min/__init__.py": {
|
| 84 |
+
"bytes": 67,
|
| 85 |
+
"sha256": "833cc39de2615b8f92ae34dea999d46926516ce79a9e6840732f927dd17bd7ca"
|
| 86 |
+
},
|
| 87 |
+
"research_code/pretraining_suffix_min/sampling.py": {
|
| 88 |
+
"bytes": 3253,
|
| 89 |
+
"sha256": "a3aa97878a9e75429da8bc99d9806e532174d8c3c0014acca56d0479ad5b4457"
|
| 90 |
+
},
|
| 91 |
"research_config.json": {
|
| 92 |
"bytes": 206,
|
| 93 |
"sha256": "57806f0e1869206599088fa814bddddca1121d10f38c4ec4cea643cf90968a70"
|
|
|
|
| 101 |
"sha256": "c2391c2c7dbedaaad4bac2b854ececd3a668bf546cc9c8d665876bcc0796dc66"
|
| 102 |
},
|
| 103 |
"tied_weights.json": {
|
| 104 |
+
"bytes": 44,
|
| 105 |
+
"sha256": "6621f33b8064e92a055e9d6a323805631e93a884410e4a81294277f6a8b91095"
|
| 106 |
},
|
| 107 |
"tokenizer.json": {
|
| 108 |
"bytes": 3505608,
|
research_code/pretraining_suffix_min/__init__.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
cat: pretraining_suffix_min/__init__.py: No such file or directory
|
research_code/pretraining_suffix_min/sampling.py
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Minimum-window suffix budgets; pure contract helpers do not import Torch.
|
| 2 |
+
|
| 3 |
+
This changes the distribution of retained lengths, not attention visibility or
|
| 4 |
+
inference caps. A sampled K always includes the current position within K.
|
| 5 |
+
"""
|
| 6 |
+
from __future__ import annotations
|
| 7 |
+
|
| 8 |
+
import math
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
def validate_minimum(minimum):
|
| 12 |
+
if type(minimum) is not int or minimum < 1 or minimum & (minimum - 1):
|
| 13 |
+
raise ValueError('Minimum retained history must be a positive power of two')
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
def retained_candidates(available, minimum):
|
| 17 |
+
"""Unique ascending candidates, including full available history once."""
|
| 18 |
+
validate_minimum(minimum)
|
| 19 |
+
if type(available) is not int or available < 1:
|
| 20 |
+
raise ValueError('Available history must be a positive integer')
|
| 21 |
+
if available < minimum:
|
| 22 |
+
return (available,)
|
| 23 |
+
values = []
|
| 24 |
+
value = minimum
|
| 25 |
+
while value <= available:
|
| 26 |
+
values.append(value)
|
| 27 |
+
value *= 2
|
| 28 |
+
if values[-1] != available:
|
| 29 |
+
values.append(available)
|
| 30 |
+
return tuple(values)
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
def retained_from_uniform(available, minimum, uniform):
|
| 34 |
+
"""Scalar reference used to verify equal-probability sampling intervals."""
|
| 35 |
+
if not math.isfinite(uniform) or not 0 <= uniform < 1:
|
| 36 |
+
raise ValueError('Uniform variate must lie in [0, 1)')
|
| 37 |
+
choices = retained_candidates(available, minimum)
|
| 38 |
+
return choices[int(uniform * len(choices))]
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
def minimum_budget_policy(canonical_policy, minimum):
|
| 42 |
+
"""Bind the new distribution while preserving legacy min1 serialization."""
|
| 43 |
+
validate_minimum(minimum)
|
| 44 |
+
if minimum == 1:
|
| 45 |
+
return canonical_policy
|
| 46 |
+
if canonical_policy is None:
|
| 47 |
+
raise ValueError('Minimum-window training requires an explicit canonical budget policy')
|
| 48 |
+
return {
|
| 49 |
+
**canonical_policy,
|
| 50 |
+
'retained_length_distribution': {
|
| 51 |
+
'schema': 1,
|
| 52 |
+
'name': 'uniform_unique_dyadic_minimum_plus_full',
|
| 53 |
+
'minimum_history': minimum,
|
| 54 |
+
'short_history': 'dense',
|
| 55 |
+
'full_history_included_once': True,
|
| 56 |
+
'scope': 'independent_sequence_query_shared_heads_and_middle_layers',
|
| 57 |
+
},
|
| 58 |
+
}
|
| 59 |
+
|
| 60 |
+
|
| 61 |
+
def sample_suffix_lengths(batch, length, *, minimum, generator, device):
|
| 62 |
+
"""Consume one original-shaped uniform draw; dense short queries still draw.
|
| 63 |
+
|
| 64 |
+
CanonicalBudgetPlan calls this separately for each original 16x2048 draw,
|
| 65 |
+
preserving per-example quantiles and generator advancement on world2/4.
|
| 66 |
+
The original min1 trainer continues calling its unchanged sample_prefixes.
|
| 67 |
+
"""
|
| 68 |
+
import torch
|
| 69 |
+
|
| 70 |
+
validate_minimum(minimum)
|
| 71 |
+
if batch < 1 or length < 1:
|
| 72 |
+
raise ValueError('Sampler dimensions must be positive')
|
| 73 |
+
n = torch.arange(1, length + 1, device=device, dtype=torch.int64)
|
| 74 |
+
powers = torch.tensor(
|
| 75 |
+
[minimum << p for p in range(max(1, length // minimum).bit_length())],
|
| 76 |
+
device=device,
|
| 77 |
+
)
|
| 78 |
+
power_count = torch.bucketize(n, powers, right=True)
|
| 79 |
+
extra_full = ((n & (n - 1)) != 0).long()
|
| 80 |
+
count = torch.where(n < minimum, 1, power_count + extra_full)
|
| 81 |
+
choice = (torch.rand((batch, length), device=device, generator=generator) * count).long()
|
| 82 |
+
retained = torch.where(choice < power_count, minimum << choice, n)
|
| 83 |
+
return torch.where(n < minimum, n, retained)
|
tied_weights.json
CHANGED
|
@@ -1 +1,3 @@
|
|
| 1 |
-
{
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"lm_head.weight": "embeddings.weight"
|
| 3 |
+
}
|