helloadhavan commited on
Commit
2cdbecd
·
verified ·
1 Parent(s): ee32672

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +115 -1
README.md CHANGED
@@ -1,3 +1,117 @@
1
  ---
2
- license: mit
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+ - en
4
+ license: apache-2.0
5
+ tags:
6
+ - gpt2
7
+ - causal-lm
8
+ - text-generation
9
+ - from-scratch
10
+ - fineweb
11
+ library_name: transformers
12
+ pipeline_tag: text-generation
13
  ---
14
+
15
+ # Llara
16
+
17
+ Llara is a 117M parameter autoregressive language model trained from scratch on English web text. It follows the GPT-2 Small architecture and is trained entirely from random initialisation — no pretrained weights, no distillation, no fine-tuning of an existing model.
18
+
19
+ The name **Llara** is original and unrelated to LLaMA or LoRA.
20
+
21
+ ---
22
+
23
+ ## Model Details
24
+
25
+ | Property | Value |
26
+ |---|---|
27
+ | Architecture | GPT-2 (decoder-only transformer) |
28
+ | Parameters | ~90-100M |
29
+ | Context length | 256 tokens |
30
+ | Embedding dim | 768 |
31
+ | Layers | 12 |
32
+ | Attention heads | 12 |
33
+ | Vocabulary | 50,257 (GPT-2 BPE) |
34
+ | Training data | FineWeb (HuggingFaceFW/fineweb), Custom dataset |
35
+ | Training docs | 1,000,000 documents |
36
+ | Epochs | 1 |
37
+ | Precision | fp16 |
38
+
39
+ ---
40
+
41
+ ## Training
42
+
43
+ Llara was trained on 1 million documents sampled from [FineWeb](https://huggingface.co/datasets/HuggingFaceFW/fineweb), a large-scale curated English web dataset. Documents were tokenised with the GPT-2 BPE tokeniser and packed into non-overlapping 1024-token blocks.
44
+
45
+ **Training configuration:**
46
+
47
+ | Hyperparameter | Value |
48
+ |---|---|
49
+ | Optimiser | AdamW |
50
+ | Learning rate | 3e-4 |
51
+ | LR schedule | Cosine decay |
52
+ | Warmup steps | 2,000 |
53
+ | Weight decay | 0.1 |
54
+ | Effective batch size | 32 |
55
+ | Gradient accumulation | 8 steps |
56
+ | Dropout | 0.1 (residual, embedding, attention) |
57
+
58
+ Gradient checkpointing was enabled throughout training to reduce memory usage.
59
+
60
+ ---
61
+
62
+ ## Usage
63
+
64
+ ```python
65
+ from transformers import GPT2LMHeadModel, AutoTokenizer, pipeline
66
+
67
+ model = GPT2LMHeadModel.from_pretrained("helloadhavan/llara1.0-100M-base")
68
+ tokenizer = AutoTokenizer.from_pretrained("helloadhavan/llara1.0-100M-base")
69
+
70
+ gen = pipeline("text-generation", model=model, tokenizer=tokenizer)
71
+
72
+ output = gen(
73
+ "The history of artificial intelligence",
74
+ max_new_tokens=200,
75
+ do_sample=True,
76
+ temperature=0.8,
77
+ top_p=0.95,
78
+ repetition_penalty=1.1,
79
+ )
80
+
81
+ print(output[0]["generated_text"])
82
+ ```
83
+
84
+ ---
85
+
86
+ ## Limitations
87
+
88
+ - Llara is trained on English web text only and performs poorly on other languages.
89
+ - Like all autoregressive LMs trained on web data, it may reproduce biases, factual errors, or inappropriate content present in the training corpus.
90
+ - It is a research model trained from scratch and is not instruction-tuned or aligned — it should not be used in production or user-facing applications without further fine-tuning and safety work.
91
+ - At 95M parameters and 256k training documents, it is significantly smaller and less trained than models like GPT-2 (which saw 40GB of text). Outputs may be incoherent on complex prompts.
92
+
93
+ ---
94
+
95
+ ## Intended Use
96
+
97
+ Llara is intended for:
98
+
99
+ - Research and experimentation with small language models
100
+ - Learning how GPT-style models are trained from scratch
101
+ - A base for fine-tuning on downstream tasks
102
+
103
+ ---
104
+
105
+ ## Training Framework
106
+
107
+ Trained using [Hugging Face Transformers](https://github.com/huggingface/transformers) `Trainer` on a single GPU.
108
+
109
+ ---
110
+
111
+ ## License
112
+
113
+ Apache 2.0
114
+
115
+ <div>
116
+ <blockquote><strong>Note:</strong> i am a AI hobbyist, not an AI engineer</blockquote>
117
+ </div>