Alienstro commited on
Commit
e97a068
·
verified ·
1 Parent(s): 4b41234

Upload folder using huggingface_hub

Browse files
README.md CHANGED
@@ -1,3 +1,80 @@
1
  ---
2
  license: apache-2.0
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
+ language:
4
+ - en
5
+ library_name: transformers
6
+ pipeline_tag: text-generation
7
+ datasets:
8
+ - HuggingFaceFW/fineweb-edu
9
+ tags:
10
+ - llama
11
+ - gguf
12
  ---
13
+
14
+ # xslm-70m
15
+
16
+ A 70,546,560 parameter Llama-style decoder, trained from scratch on one RTX 3090 in
17
+ 180 minutes. The project exists to teach the full training pipeline: the
18
+ tokenizer, the data pipeline, the modules, and the training configuration.
19
+
20
+ ## Limitations
21
+
22
+ This model does not hold world knowledge. A model of this size learns grammar, style,
23
+ and document structure. It invents facts. This is the expected result at this scale,
24
+ and it is not a defect to report.
25
+
26
+ For a model that answers questions correctly, use retrieval-augmented generation over a
27
+ document index, or a QLoRA fine-tune of an existing 1B to 8B base model.
28
+
29
+ ## Architecture
30
+
31
+ | Field | Value |
32
+ |---|---|
33
+ | Non-embedding parameters | 49,575,040 |
34
+ | Total parameters | 70,546,560 |
35
+ | `hidden_size` | 640 |
36
+ | `num_hidden_layers` | 10 |
37
+ | `num_attention_heads` | 10 |
38
+ | `intermediate_size` | 1728 |
39
+ | `vocab_size` | 32768 |
40
+ | `max_position_embeddings` | 1024 |
41
+ | Normalization | RMSNorm |
42
+ | Position encoding | RoPE, theta 10000.0 |
43
+ | Activation | SwiGLU |
44
+ | Embeddings | Tied input and output |
45
+
46
+ ## Training
47
+
48
+ | Field | Value |
49
+ |---|---|
50
+ | Corpus | `HuggingFaceFW/fineweb-edu`, `sample-10BT`, ODC-By license |
51
+ | Tokenizer | Byte-level BPE, 32768 tokens |
52
+ | Optimizer | AdamW, betas 0.9 and 0.95 |
53
+ | Peak learning rate | 0.001 |
54
+ | Schedule | 200 warmup steps, then cosine decay to 0.0001 |
55
+ | Tokens for each optimizer step | 262,144 |
56
+ | Precision | BF16 mixed |
57
+ | Hardware | One RTX 3090 |
58
+
59
+ ## Files
60
+
61
+ | File | Use |
62
+ |---|---|
63
+ | `model.safetensors` | The BF16 weights, for `transformers` |
64
+ | `gguf/xslm-70m-BF16.gguf` | The unquantized GGUF file, in the training dtype |
65
+ | `gguf/xslm-70m-F16.gguf` | The unquantized GGUF file, for the tools that read no BF16 |
66
+ | `gguf/xslm-70m-Q8_0.gguf` | **The recommended quantized file** |
67
+ | `gguf/xslm-70m-Q6_K.gguf` | Smaller, with a visible quality cost |
68
+ | `gguf/xslm-70m-Q4_K_M.gguf` | A demonstration only |
69
+
70
+ At 70M parameters there is no redundancy to absorb quantization error. Q4_K_M often
71
+ produces broken text. Use Q8_0.
72
+
73
+ ## Use
74
+
75
+ ```python
76
+ from transformers import AutoModelForCausalLM, AutoTokenizer
77
+
78
+ tokenizer = AutoTokenizer.from_pretrained("Alienstro/xslm")
79
+ model = AutoModelForCausalLM.from_pretrained("Alienstro/xslm")
80
+ ```
config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "LlamaForCausalLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 0,
8
+ "dtype": "float32",
9
+ "eos_token_id": 0,
10
+ "head_dim": 64,
11
+ "hidden_act": "silu",
12
+ "hidden_size": 640,
13
+ "initializer_range": 0.02,
14
+ "intermediate_size": 1728,
15
+ "max_position_embeddings": 1024,
16
+ "mlp_bias": false,
17
+ "model_type": "llama",
18
+ "num_attention_heads": 10,
19
+ "num_hidden_layers": 10,
20
+ "num_key_value_heads": 10,
21
+ "pad_token_id": null,
22
+ "pretraining_tp": 1,
23
+ "rms_norm_eps": 1e-05,
24
+ "rope_parameters": {
25
+ "rope_theta": 10000.0,
26
+ "rope_type": "default"
27
+ },
28
+ "tie_word_embeddings": true,
29
+ "transformers_version": "5.17.0",
30
+ "use_cache": false,
31
+ "vocab_size": 32768
32
+ }
generation_config.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 0,
4
+ "eos_token_id": 0,
5
+ "output_attentions": false,
6
+ "output_hidden_states": false,
7
+ "transformers_version": "5.17.0",
8
+ "use_cache": false
9
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f79aa08999427e441f3b2d8e843477216593b11f55b60594ced5206bd4ae4a54
3
+ size 282196440
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "backend": "tokenizers",
3
+ "is_local": true,
4
+ "local_files_only": false,
5
+ "model_max_length": 1000000000000000019884624838656,
6
+ "tokenizer_class": "TokenizersBackend"
7
+ }