Download README.md from AngryYoungBhaloo/ect-base-100m: direct link, hf CLI and curl.
- Browser
- Download file 5.15 kB
-
https://huggingface.co/AngryYoungBhaloo/ect-base-100m/resolve/main/README.md
- Command line
-
hf download hf://AngryYoungBhaloo/ect-base-100m/README.md
-
curl -L -o README.md https://huggingface.co/AngryYoungBhaloo/ect-base-100m/resolve/main/README.md
license: apache-2.0
language:
- en
datasets:
- HuggingFaceFW/fineweb-edu
- AngryYoungBhaloo/ect-pretraining-corpus
library_name: pytorch
tags:
- research
- language-model
- from-scratch
ect-base-100m
A small English language model (100,291,200 parameters) pre-trained from scratch on educational web text from which any text that could teach a model to imitate consciousness or its traits had been filtered out. It is the starting point of every savanna run in the accompanying paper, Emergence of Consciousness Traits in a SLM.
This is a research artefact. It continues text; it was not tuned to follow instructions or to be safe, and it should not be used in products or to make decisions about people.
Files
model.safetensors: the weights in float32. The output layer shares its weights with the input embedding, so only the embedding is stored.config.json: the shape, the fields ofDecoderConfig.tokenizer.json: the tokenizer, in the Hugging Facetokenizersformat.
Use
The code is in the paper's repository, github.com/gut-puncture/emergence-of-consciousness-traits. From its savanna/ folder:
python get_weights.py # writes base_weights.pt and tokenizer.json, the files the savanna code reads
import torch
from tokenizers import Tokenizer
from fast import load, hidden # savanna/fast.py
model = load("base_weights.pt", "cpu").eval()
tok = Tokenizer.from_file("tokenizer.json")
ids = torch.tensor([tok.encode("The river rose after the rain").ids])
logits = model.head(hidden(model, ids)) # next-token scores, [1, length, 32768]
The model is the plain PyTorch module DecoderLM of twc/pretraining/training/model.py; it is not a transformers model.
Architecture
A decoder-only transformer: 16 layers of width 640; RMSNorm before each block; 8 query heads of size 80 sharing 2 key-value heads; rotary position encoding (base 10,000); SwiGLU feed-forward of width 2,048; tied input and output embeddings; no bias and no dropout. Context 4,096 tokens.
Tokenizer
Byte-level BPE with 32,768 tokens, trained on the training split of the filtered text with the Hugging Face tokenizers library: no normalisation, byte-level pre-tokenisation without an added leading space, byte fallback, and merges kept only for pairs seen at least twice. The one special token, <|endoftext|> (id 0), never appears in the training data. Any byte string can be encoded.
Training data
The text comes from FineWeb-Edu (HuggingFaceFW/fineweb-edu, released under ODC-By 1.0). A filter removed every passage that could teach the model to imitate consciousness or its traits: writing about awareness, selves, beliefs, intentions, emotions, pain and pleasure, sleep and dreams, psychology and neuroscience, and forms of writing that show minds at work, such as fiction, dialogue, forums, advice, reviews, news and biography. What remained was 4,129,771 passages: 4,125,621 for training (2,610,181,035 next-token targets) and 4,150 held out for validation (2,614,056 targets). The text itself is published as the dataset AngryYoungBhaloo/ect-pretraining-corpus.
Each passage was tokenized on its own, with nothing added between passages. A passage longer than 4,096 targets was cut into windows of at most 4,096 targets, each predicted without seeing the window before it; attention never crosses from one passage or window to another.
Training
One pass over the training text, in a fixed order, in 9,979 optimizer steps of up to 262,144 target tokens each (twc-pretrain in the repository's pretraining/ folder, the code as run).
| Setting | Value |
|---|---|
| Optimiser | AdamW, betas (0.9, 0.95), eps 1e-8 |
| Weight decay | 0.1 on all weight matrices, including the tied embedding; none on norm weights |
| Gradient clipping | global norm 1.0 |
| Learning rate | peak 6e-4; by tokens: linear warm-up over the first 2%, constant to 90%, cosine decay to zero over the last 10% |
| Precision | float32 weights and optimizer state; bfloat16 autocast in the forward pass; TF32 matrix multiplication allowed |
| Seed | 20260608 |
| Hardware | one NVIDIA A100 80 GB, about 8 hours |
The loss on the held-out validation text at the end of training was 2.7413 nats per token (bfloat16 forward pass; 2.72 to 2.77 across its ten parts).
Limitations
The model is small and saw 2.6 billion tokens of a deliberately narrowed slice of educational English. Tested before the savanna training, it handled copying, pattern continuation and grammar, but was at or below chance on counting, following a state through events and combining two causes. The filter that shaped its data was automatic and is not perfect. Its knowledge of the topics that were removed is reduced, not necessarily absent.
Licence
The weights are released under the Apache License 2.0. The training text is derived from FineWeb-Edu, released under the Open Data Commons Attribution License (ODC-By) 1.0 and subject to Common Crawl's terms of use.