prathamkode commited on
Commit
024d005
·
verified ·
1 Parent(s): 413d42a

Add particle-1.0 weights (from-scratch 100M Llama-style, MIT)

Browse files
LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2026 particle-1.0 contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
README.md ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ language:
4
+ - en
5
+ library_name: transformers
6
+ pipeline_tag: text-generation
7
+ tags:
8
+ - llama
9
+ - from-scratch
10
+ - smol
11
+ ---
12
+
13
+ # particle-1.0
14
+
15
+ ~100M-parameter Llama-style chat model trained **from scratch** (random init). Not a fine-tune of Llama, SmolLM, or any Hub base.
16
+
17
+ Weights are MIT. Training data still needs attribution (below).
18
+
19
+ ## Usage
20
+
21
+ ```python
22
+ from transformers import AutoModelForCausalLM, AutoTokenizer
23
+
24
+ repo = "prathamkode/particle-1.0"
25
+ tok = AutoTokenizer.from_pretrained(repo)
26
+ model = AutoModelForCausalLM.from_pretrained(repo)
27
+
28
+ messages = [{"role": "user", "content": "hello"}]
29
+ prompt = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
30
+ ids = tok(prompt, return_tensors="pt")
31
+ out = model.generate(**ids, max_new_tokens=64, temperature=0.7)
32
+ print(tok.decode(out[0], skip_special_tokens=False))
33
+ ```
34
+
35
+ Chat format:
36
+
37
+ ```
38
+ <|user|>
39
+ hello
40
+ <|assistant|>
41
+ ```
42
+
43
+ ## Model details
44
+
45
+ | | |
46
+ |---|---|
47
+ | Architecture | Llama-style decoder (RoPE, SwiGLU, RMSNorm, tied embeddings) |
48
+ | Parameters | ~100M (12 layers, 768 hidden, 12 heads) |
49
+ | Context | 2048 tokens |
50
+ | Tokenizer | Custom 32k byte-level BPE (not Llama / GPT-2 vocab) |
51
+ | Init | Random `N(0, 0.02)` — trained from scratch |
52
+ | Precision | BF16 training; Hub weights `bfloat16` |
53
+
54
+ ## Training
55
+
56
+ 1. **Tokenizer** trained from scratch on a FineWeb-Edu sample (~2GB text).
57
+ 2. **Pretrain** next-token prediction on [`HuggingFaceFW/fineweb_edu_100BT-shuffled`](https://huggingface.co/datasets/HuggingFaceFW/fineweb_edu_100BT-shuffled), first ~2B tokens.
58
+ 3. **SFT** on [`HuggingFaceTB/smol-smoltalk`](https://huggingface.co/datasets/HuggingFaceTB/smol-smoltalk) (first user/assistant turn + a few greeting seeds).
59
+
60
+ SFT used that dataset as **text only**. No teacher model weights were copied.
61
+
62
+ ## Intended use
63
+
64
+ Research / demo small chat model. Expect short replies, mistakes, and weak reasoning.
65
+
66
+ ## Limitations
67
+
68
+ - Very small capacity
69
+ - May hallucinate
70
+ - English-centric FineWeb-Edu subset
71
+ - No RLHF / preference tuning
72
+
73
+ ## License
74
+
75
+ - **These weights:** [MIT](LICENSE)
76
+ - **FineWeb-Edu:** ODC-By (attribute)
77
+ - **smol-smoltalk:** follow the dataset card
config.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "LlamaForCausalLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": null,
8
+ "eos_token_id": 0,
9
+ "head_dim": 64,
10
+ "hidden_act": "silu",
11
+ "hidden_size": 768,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 2048,
14
+ "max_position_embeddings": 2048,
15
+ "mlp_bias": false,
16
+ "model_type": "llama",
17
+ "num_attention_heads": 12,
18
+ "num_hidden_layers": 12,
19
+ "num_key_value_heads": 12,
20
+ "pad_token_id": 1,
21
+ "pretraining_tp": 1,
22
+ "rms_norm_eps": 1e-05,
23
+ "rope_scaling": null,
24
+ "rope_theta": 10000.0,
25
+ "tie_word_embeddings": true,
26
+ "torch_dtype": "bfloat16",
27
+ "transformers_version": "4.47.0",
28
+ "use_cache": true,
29
+ "vocab_size": 32000
30
+ }
generation_config.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "eos_token_id": 0,
4
+ "pad_token_id": 1,
5
+ "transformers_version": "4.47.0"
6
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c9673d133bae4eee60f8a539b025338299d3dca6a886474d652d1991fac40420
3
+ size 219071992
special_tokens_map.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<|user|>",
4
+ "<|assistant|>"
5
+ ],
6
+ "eos_token": "<|endoftext|>",
7
+ "pad_token": "<|padding|>",
8
+ "unk_token": "<|unk|>"
9
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "<|endoftext|>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "1": {
12
+ "content": "<|padding|>",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "<|unk|>",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "3": {
28
+ "content": "<|user|>",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "4": {
36
+ "content": "<|assistant|>",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "additional_special_tokens": [
45
+ "<|user|>",
46
+ "<|assistant|>"
47
+ ],
48
+ "bos_token": null,
49
+ "chat_template": "{% for message in messages %}{% if message['role'] == 'user' %}<|user|>\n{{ message['content'] }}\n{% elif message['role'] == 'assistant' %}<|assistant|>\n{{ message['content'] }}{% endif %}{% endfor %}{% if add_generation_prompt %}<|assistant|>\n{% endif %}",
50
+ "clean_up_tokenization_spaces": false,
51
+ "eos_token": "<|endoftext|>",
52
+ "extra_special_tokens": {},
53
+ "model_max_length": 2048,
54
+ "pad_token": "<|padding|>",
55
+ "tokenizer_class": "PreTrainedTokenizerFast",
56
+ "unk_token": "<|unk|>"
57
+ }