helloadhavan commited on
Commit
77e920d
·
verified ·
1 Parent(s): 03a2dbb

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +111 -0
README.md CHANGED
@@ -1,3 +1,114 @@
1
  ---
 
 
2
  license: apache-2.0
 
 
 
 
 
 
 
 
 
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
+ - undertrained
12
+ library_name: transformers
13
+ pipeline_tag: text-generation
14
  ---
15
+
16
+ # Llara
17
+
18
+ <img src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjUwMCIgaGVpZ2h0PSIyMDAiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiAjRkZGRkZGOyI+CiAgPGRlZnM+CiAgICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgogICAgICBAaW1wb3J0IHVybCgnaHR0cHM6Ly9mb250cy5nb29nbGVhcGlzLmNvbS9jc3MyP2ZhbWlseT1JQk0rUGxleCtTYW5zOml0YWwsd2dodEAwLDEwMC4uNzAwOzEsMTAwLi43MDAnKTsKICAgICAgCiAgICAgIC5jdXN0b20tdGV4dCB7CiAgICAgICAgZm9udC1mYW1pbHk6ICdJQk0gUGxleCBTYW5zJywnUm9ib3RvJywgc2Fucy1zZXJpZjsKICAgICAgICBmb250LXNpemU6IDcwcHg7CiAgICAgICAgZmlsbDogIzAwMDAwMDsKICAgICAgICBmb250LXdlaWdodDogNjAwOyAgCiAgICAgIH0KICAgIDwvc3R5bGU+CiAgPC9kZWZzPgo8cGF0aCBkPSJNMCAwIEM2NiAwIDEzMiAwIDIwMCAwIEMyMDAgNjYgMjAwIDEzMiAyMDAgMjAwIEMxMzQgMjAwIDY4IDIwMCAwIDIwMCBDMCAxMzQgMCA2OCAwIDAgWiAiIGZpbGw9IiNGQUZBRkEiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAsMCkiLz4KPHBhdGggZD0iTTAgMCBDMzkuMjcgMCA3OC41NCAwIDExOSAwIEMxMTkgMzkuMjcgMTE5IDc4LjU0IDExOSAxMTkgQzEwNi4xMyAxMTkgOTMuMjYgMTE5IDgwIDExOSBDODAgOTIuOTMgODAgNjYuODYgODAgNDAgQzUzLjYgNDAgMjcuMiA0MCAwIDQwIEMwIDI2LjggMCAxMy42IDAgMCBaICIgZmlsbD0iIzAxMDEwMSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNDAsNDApIi8+CjxwYXRoIGQ9Ik0wIDAgQzEzLjIgMCAyNi40IDAgNDAgMCBDNDAgMTIuODcgNDAgMjUuNzQgNDAgMzkgQzI2LjggMzkgMTMuNiAzOSAwIDM5IEMwIDI2LjEzIDAgMTMuMjYgMCAwIFogIiBmaWxsPSIjMDIwMjAyIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg0MCwxMjApIi8+CiAgPHRleHQgeD0iMjAwIiB5PSIxMzUiIGNsYXNzPSJjdXN0b20tdGV4dCI+TGxhcmExLjA8L3RleHQ+Cjwvc3ZnPgo=">
19
+
20
+ ## Introduction
21
+
22
+
23
+ Llara1.1 is a 124M parameter (33M params more than llara1.0) 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.
24
+ but it does use GPT's tokenizer (sorta)
25
+
26
+ The name **Llara** is original and unrelated to LLaMA or LoRA.
27
+
28
+ **Note**: The model is stil undertrained according to `The Chinchilla Laws (2022)`
29
+
30
+ ---
31
+
32
+ ## Improvements
33
+
34
+ * Incressed context length to 512 tokens
35
+ * Better and clearner training data
36
+ * Able to form cohirent sentences even at 20 max tokens
37
+ * Better GPT config
38
+
39
+ ---
40
+
41
+ ## Model Details
42
+
43
+ | Property | Value |
44
+ |---|---|
45
+ | Architecture | GPT-2 (decoder-only transformer) |
46
+ | Parameters | ~124.0M |
47
+ | Context length | 512 tokens |
48
+ | Embedding dim | - |
49
+ | Layers | 12 |
50
+ | Attention heads | 12 |
51
+ | Vocabulary | 50,257 (GPT-2 BPE) |
52
+ | Training data | FineWeb (HuggingFaceFW/fineweb) + Custom dataset |
53
+ | Training docs | 131M tokens |
54
+ | Epochs | 1.1 |
55
+ | Precision | fp16 |
56
+
57
+ ---
58
+
59
+ ## Usage
60
+
61
+ ```python
62
+ from transformers import GPT2LMHeadModel, AutoTokenizer, pipeline
63
+
64
+ model = GPT2LMHeadModel.from_pretrained("helloadhavan/llara1.1-100M-base")
65
+ tokenizer = AutoTokenizer.from_pretrained("helloadhavan/llara1.1-100M-base")
66
+
67
+ gen = pipeline("text-generation", model=model, tokenizer=tokenizer)
68
+
69
+ output = gen(
70
+ "Once upon a time",
71
+ max_new_tokens=20,
72
+ do_sample=True,
73
+ temperature=0.8,
74
+ top_p=0.95,
75
+ repetition_penalty=1.1,
76
+ )
77
+
78
+ print(output[0]["generated_text"])
79
+ ```
80
+
81
+ ---
82
+
83
+ ## Limitations
84
+
85
+ - Llara is trained on English web text only and performs poorly on other languages.
86
+ - Like all autoregressive LMs trained on web data, it may reproduce biases, factual errors, or inappropriate content present in the training corpus.
87
+ - 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.
88
+ - At 124M parameters and 2M 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.
89
+
90
+ ---
91
+
92
+ ## Intended Use
93
+
94
+ Llara is intended for:
95
+
96
+ - Research and experimentation with small language models
97
+ - Learning how GPT-style models are trained from scratch
98
+ - A base for fine-tuning on downstream tasks
99
+
100
+ ---
101
+
102
+ ## Training Framework
103
+
104
+ Trained using [Hugging Face Transformers](https://github.com/huggingface/transformers) `Trainer` on a single GPU.
105
+
106
+ ---
107
+
108
+ ## License
109
+
110
+ Apache 2.0
111
+
112
+ <div>
113
+ <blockquote><strong>Note:</strong> i am a AI hobbyist, not an AI engineer</blockquote>
114
+ </div>