MihaiPopa-1 commited on
Commit
5b7279b
·
verified ·
1 Parent(s): 12f3e22

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +66 -0
README.md ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ datasets:
4
+ - HuggingFaceFW/fineweb
5
+ language:
6
+ - en
7
+ pipeline_tag: text-generation
8
+ tags:
9
+ - tiny-model
10
+ - cinnabarlm
11
+ - tiny-llm
12
+ - tiny-lm
13
+ - tinylm
14
+ - tinyllm
15
+ ---
16
+
17
+ # CinnabarLM 1.4M
18
+ What happens if you take the CinnabarLM idea and push it a little more further? You'll get this!
19
+
20
+ CinnabarLM 1.4M is a tiny, 1.4M-parameter LLM trained for ~26.75 minutes on a T4 GPU (on Colab)! It's only 6 MB in size and now it's Llama-based!
21
+
22
+ # Why?
23
+ Because it's a good idea to make tiny LLMs. Some people already did with [MicroLM](https://huggingface.co/CromIA/MicroLM-1M), [Spark 4 5M](https://huggingface.co/LH-Tech-AI/Spark-5M-Base-v4) and [Tenete 8M](https://huggingface.co/Harley-ml/Tenete-8M), but not myself!
24
+
25
+ # Model Configurations
26
+ | Parameter | Value |
27
+ |---|---|
28
+ | Tokenizer | Llama 3's tokenizer (Tiktoken / BPE) |
29
+ | Vocabulary Size | 4096 tokens |
30
+ | Batch Size | 4 x 8 = 32 |
31
+ | Context Window | Maybe 2048 tokens |
32
+ | `hidden_size` | 128 |
33
+ | `intermediate_size` | 128 |
34
+ | `num_hidden_layers` | 4 |
35
+ | `num_attention_heads` | 4 |
36
+ | `max_position_embeddings` | 2048 |
37
+ | `rms_norm_eps` | `1e-5` |
38
+ | `initializer_range` | 0.02 |
39
+ | `use_cache` | True
40
+ | `tie_word_embeddings` | False
41
+ | `rope_theta` | 10000.0
42
+
43
+ # Training Configurations
44
+ | Hyperparameter | Value |
45
+ |---|---|
46
+ | `output_dir` | "./cinnabarlm-v2" |
47
+ | `max_steps` | 10000 |
48
+ | `per_device_train_batch_size` | 8 |
49
+ | `gradient_accumulation_steps` | 4 |
50
+ | `learning_rate` | 6e-4 |
51
+ | `weight_decay` | 0.01 |
52
+ | `warmup_steps` | 500 |
53
+ | `lr_scheduler_type` | "cosine" |
54
+ | `logging_steps` | 100 |
55
+ | `save_steps` | 2000 |
56
+ | `fp16` | True |
57
+ | `save_total_limit` | 2 |
58
+ | `prediction_loss_only` | True |
59
+ | `logging_first_step` | True |
60
+
61
+ # Limitations
62
+ * **Not Instruction-Tuned:** It's only a base model, so it only completes text.
63
+ * **English-Only:** It's trained on English data (FineWeb), it's NOT multilingual.
64
+ # Some other details
65
+ * It's trained on 50 million tokens of [FineWeb](https://huggingface.co/datasets/HuggingFaceFW/fineweb) (CC-MAIN-2025-26 snapshot), and the knowledge cutoff is June 2025.
66
+ * The name "CinnabarLM" that I picked was made by combining "Cinnabar" (the new block from the Chaos Cubed drop in Minecraft) + "LM" (Language Model)