Update README.md
Browse files
README.md
CHANGED
|
@@ -8,149 +8,205 @@ pipeline_tag: text-generation
|
|
| 8 |
---
|
| 9 |
# Archaea-74M
|
| 10 |
|
| 11 |
-
Archaea-74M is a
|
| 12 |
|
| 13 |
-
|
| 14 |
|
| 15 |
---
|
| 16 |
|
| 17 |
-
# Model
|
| 18 |
-
|
| 19 |
-
| Attribute
|
| 20 |
-
|
|
| 21 |
-
| Model
|
| 22 |
-
| Parameters
|
| 23 |
-
| Architecture
|
| 24 |
-
|
|
| 25 |
-
|
|
| 26 |
-
|
|
| 27 |
-
|
|
| 28 |
-
|
|
| 29 |
-
| Framework
|
| 30 |
-
| License | Apache-2.0 |
|
| 31 |
|
| 32 |
---
|
|
|
|
| 33 |
|
| 34 |
-
|
| 35 |
|
| 36 |
-
|
|
|
|
|
|
|
| 37 |
|
| 38 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
|
| 40 |
-
|
| 41 |
-
| ----------------- | ----- |
|
| 42 |
-
| Hidden Size | 512 |
|
| 43 |
-
| Intermediate Size | 1408 |
|
| 44 |
-
| Layers | 8 |
|
| 45 |
-
| Attention Heads | 8 |
|
| 46 |
-
| KV Heads | 2 |
|
| 47 |
-
| Context Length | 1024 |
|
| 48 |
-
| Activation | SiLU |
|
| 49 |
-
| RMSNorm Epsilon | 1e-5 |
|
| 50 |
|
| 51 |
-
|
| 52 |
|
| 53 |
-
|
| 54 |
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
|
| 59 |
-
|
|
|
|
|
|
|
| 60 |
|
| 61 |
---
|
| 62 |
|
| 63 |
-
#
|
| 64 |
|
| 65 |
-
##
|
| 66 |
|
| 67 |
-
|
| 68 |
|
| 69 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 70 |
|
| 71 |
-
|
| 72 |
|
| 73 |
-
|
| 74 |
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 81 |
|
| 82 |
-
|
| 83 |
|
| 84 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 85 |
|
| 86 |
-
|
| 87 |
|
| 88 |
-
|
| 89 |
|
| 90 |
-
|
| 91 |
-
| ----------------- | ------------------------ |
|
| 92 |
-
| Optimizer | AdamW |
|
| 93 |
-
| Scheduler | OneCycleLR |
|
| 94 |
-
| Learning Rate | 6e-4 |
|
| 95 |
-
| Weight Decay | 0.1 |
|
| 96 |
-
| Gradient Clipping | 1.0 |
|
| 97 |
-
| Precision | bfloat16 Mixed Precision |
|
| 98 |
-
| Compilation | torch.compile |
|
| 99 |
|
| 100 |
-
|
| 101 |
|
| 102 |
-
|
| 103 |
-
| --------------------------- | ----- |
|
| 104 |
-
| Sequence Length | 1024 |
|
| 105 |
-
| Micro Batch Size | 16 |
|
| 106 |
-
| Gradient Accumulation Steps | 8 |
|
| 107 |
-
| Effective Batch Size | 128 |
|
| 108 |
|
| 109 |
---
|
| 110 |
|
| 111 |
-
#
|
| 112 |
|
| 113 |
-
|
| 114 |
-
| ------------------- | ------- |
|
| 115 |
-
| Total Steps Trained | 18,800 |
|
| 116 |
-
| Planned Steps | 25,000 |
|
| 117 |
-
| Initial Loss | 10.9223 |
|
| 118 |
-
| Final Loss | 2.9488 |
|
| 119 |
-
| Best Loss | 2.8071 |
|
| 120 |
-
| Final Perplexity | 19.08 |
|
| 121 |
-
| Best Perplexity | 16.56 |
|
| 122 |
|
| 123 |
-
|
| 124 |
|
| 125 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 126 |
|
| 127 |
-
#
|
| 128 |
|
| 129 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 130 |
|
| 131 |
-
|
| 132 |
|
| 133 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 134 |
|
| 135 |
-
|
|
|
|
|
|
|
| 136 |
|
| 137 |
-
|
|
|
|
| 138 |
|
| 139 |
-
|
| 140 |
|
| 141 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 142 |
|
| 143 |
---
|
| 144 |
|
| 145 |
-
# Usage
|
| 146 |
|
| 147 |
-
## Installation
|
| 148 |
|
| 149 |
```bash
|
| 150 |
pip install torch transformers
|
| 151 |
```
|
| 152 |
|
| 153 |
-
## Loading the Model
|
| 154 |
|
| 155 |
```python
|
| 156 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
|
@@ -167,7 +223,7 @@ model = AutoModelForCausalLM.from_pretrained(
|
|
| 167 |
)
|
| 168 |
```
|
| 169 |
|
| 170 |
-
## Text Generation
|
| 171 |
|
| 172 |
```python
|
| 173 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
|
@@ -176,18 +232,11 @@ import torch
|
|
| 176 |
model_id = "GODELEV/Archaea-74M"
|
| 177 |
|
| 178 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 179 |
-
|
| 180 |
-
model = AutoModelForCausalLM.from_pretrained(
|
| 181 |
-
model_id,
|
| 182 |
-
device_map="auto"
|
| 183 |
-
)
|
| 184 |
|
| 185 |
prompt = "The future of artificial intelligence"
|
| 186 |
|
| 187 |
-
inputs = tokenizer(
|
| 188 |
-
prompt,
|
| 189 |
-
return_tensors="pt"
|
| 190 |
-
).to(model.device)
|
| 191 |
|
| 192 |
with torch.no_grad():
|
| 193 |
output = model.generate(
|
|
@@ -204,9 +253,9 @@ print(tokenizer.decode(output[0], skip_special_tokens=True))
|
|
| 204 |
|
| 205 |
---
|
| 206 |
|
| 207 |
-
# Repository Structure
|
| 208 |
|
| 209 |
-
```
|
| 210 |
Archaea-74M/
|
| 211 |
├── config.json
|
| 212 |
├── generation_config.json
|
|
@@ -221,29 +270,36 @@ Archaea-74M/
|
|
| 221 |
|
| 222 |
---
|
| 223 |
|
| 224 |
-
# Limitations
|
|
|
|
|
|
|
| 225 |
|
| 226 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 227 |
|
| 228 |
-
|
| 229 |
|
| 230 |
-
|
| 231 |
-
* Limited reasoning capability compared to larger models
|
| 232 |
-
* Inconsistent factual accuracy
|
| 233 |
-
* Sensitivity to prompt wording
|
| 234 |
-
* Limited evaluation coverage
|
| 235 |
|
| 236 |
-
|
|
|
|
|
|
|
|
|
|
| 237 |
|
| 238 |
---
|
| 239 |
|
| 240 |
-
# Citation
|
| 241 |
|
| 242 |
```bibtex
|
| 243 |
@misc{archaea74m,
|
| 244 |
-
title={Archaea-74M},
|
| 245 |
-
author={Akshit Kumar},
|
| 246 |
-
year={2026},
|
| 247 |
-
publisher={Hugging Face}
|
|
|
|
| 248 |
}
|
| 249 |
```
|
|
|
|
| 8 |
---
|
| 9 |
# Archaea-74M
|
| 10 |
|
| 11 |
+
Archaea-74M is a decoder-only causal language model with approximately 74 million parameters, pretrained from scratch on [BetterDataset-2M](https://huggingface.co/datasets/GODELEV/BetterDataset-2M). The model uses a LLaMA-style architecture with Grouped Query Attention (GQA) and was trained using bfloat16 mixed precision with `torch.compile` enabled.
|
| 12 |
|
| 13 |
+
Training was stopped at 18,800 of a planned 25,000 steps to allow for architecture and data pipeline iteration in future runs.
|
| 14 |
|
| 15 |
---
|
| 16 |
|
| 17 |
+
## Model Card
|
| 18 |
+
|
| 19 |
+
| Attribute | Value |
|
| 20 |
+
|---|---|
|
| 21 |
+
| Model ID | `GODELEV/Archaea-74M` |
|
| 22 |
+
| Parameters | ~74 million |
|
| 23 |
+
| Architecture | Decoder-only Transformer (LLaMA-style) |
|
| 24 |
+
| Attention | Grouped Query Attention (GQA) |
|
| 25 |
+
| Context Length | 1024 tokens |
|
| 26 |
+
| Tokenizer | GPT-2 (~50,257 vocabulary) |
|
| 27 |
+
| Training Precision | bfloat16 Mixed Precision |
|
| 28 |
+
| License | Apache-2.0 |
|
| 29 |
+
| Framework | PyTorch + HuggingFace Transformers |
|
|
|
|
| 30 |
|
| 31 |
---
|
| 32 |
+
# Archaea-74M
|
| 33 |
|
| 34 |
+
Archaea-74M is a decoder-only causal language model with approximately 74 million parameters, pretrained from scratch on [BetterDataset-2M](https://huggingface.co/datasets/GODELEV/BetterDataset-2M). The model uses a LLaMA-style architecture with Grouped Query Attention (GQA) and was trained using bfloat16 mixed precision with `torch.compile` enabled.
|
| 35 |
|
| 36 |
+
Training was stopped at 18,800 of a planned 25,000 steps to allow for architecture and data pipeline iteration in future runs.
|
| 37 |
+
|
| 38 |
+
---
|
| 39 |
|
| 40 |
+
## Model Card
|
| 41 |
+
|
| 42 |
+
| Attribute | Value |
|
| 43 |
+
|---|---|
|
| 44 |
+
| Model ID | `GODELEV/Archaea-74M` |
|
| 45 |
+
| Parameters | ~74 million |
|
| 46 |
+
| Architecture | Decoder-only Transformer (LLaMA-style) |
|
| 47 |
+
| Attention | Grouped Query Attention (GQA) |
|
| 48 |
+
| Context Length | 1024 tokens |
|
| 49 |
+
| Tokenizer | GPT-2 (~50,257 vocabulary) |
|
| 50 |
+
| Training Precision | bfloat16 Mixed Precision |
|
| 51 |
+
| License | Apache-2.0 |
|
| 52 |
+
| Framework | PyTorch + HuggingFace Transformers |
|
| 53 |
+
|
| 54 |
+
---
|
| 55 |
|
| 56 |
+
## Architecture
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
|
| 58 |
+
Archaea-74M implements `LlamaForCausalLM` with the following configuration:
|
| 59 |
|
| 60 |
+
### Transformer Configuration
|
| 61 |
|
| 62 |
+
| Parameter | Value |
|
| 63 |
+
|---|---|
|
| 64 |
+
| Hidden Size | 512 |
|
| 65 |
+
| Intermediate Size | 1408 |
|
| 66 |
+
| Number of Layers | 8 |
|
| 67 |
+
| Attention Heads | 8 |
|
| 68 |
+
| KV Heads (GQA) | 2 |
|
| 69 |
+
| GQA Ratio | 4:1 |
|
| 70 |
+
| Activation Function | SiLU |
|
| 71 |
+
| Normalization | RMSNorm (eps = 1e-5) |
|
| 72 |
+
| Context Length | 1024 tokens |
|
| 73 |
|
| 74 |
+
### Grouped Query Attention
|
| 75 |
+
|
| 76 |
+
The model uses Grouped Query Attention with 8 query heads mapped to 2 key/value heads (a 4:1 ratio). This reduces KV cache memory footprint at inference time relative to standard multi-head attention while preserving representational capacity in the query projection.
|
| 77 |
|
| 78 |
---
|
| 79 |
|
| 80 |
+
## Training
|
| 81 |
|
| 82 |
+
### Dataset
|
| 83 |
|
| 84 |
+
Archaea-74M was trained on [BetterDataset-2M](https://huggingface.co/datasets/GODELEV/BetterDataset-2M), a multi-source corpus assembled from:
|
| 85 |
|
| 86 |
+
- General web text
|
| 87 |
+
- Conversational data
|
| 88 |
+
- Instruction-oriented samples
|
| 89 |
+
- Knowledge-focused content
|
| 90 |
+
- Technical and code-related text
|
| 91 |
|
| 92 |
+
Samples were tokenized using the GPT-2 tokenizer and packed into contiguous 1024-token sequences.
|
| 93 |
|
| 94 |
+
### Optimization
|
| 95 |
|
| 96 |
+
| Parameter | Value |
|
| 97 |
+
|---|---|
|
| 98 |
+
| Optimizer | AdamW |
|
| 99 |
+
| Learning Rate Scheduler | OneCycleLR |
|
| 100 |
+
| Peak Learning Rate | 6e-4 |
|
| 101 |
+
| Weight Decay | 0.1 |
|
| 102 |
+
| Gradient Clipping | 1.0 |
|
| 103 |
+
| Sequence Length | 1024 |
|
| 104 |
+
| Micro Batch Size | 16 |
|
| 105 |
+
| Gradient Accumulation Steps | 8 |
|
| 106 |
+
| Effective Batch Size | 128 |
|
| 107 |
+
| Compilation | `torch.compile` |
|
| 108 |
|
| 109 |
+
### Training Statistics
|
| 110 |
|
| 111 |
+
| Metric | Value |
|
| 112 |
+
|---|---|
|
| 113 |
+
| Total Steps Trained | 18,800 / 25,000 |
|
| 114 |
+
| Initial Loss | 10.9223 |
|
| 115 |
+
| Final Loss | 2.9488 |
|
| 116 |
+
| Best Loss | 2.8071 |
|
| 117 |
+
| Final Perplexity | 19.08 |
|
| 118 |
+
| Best Perplexity | 16.56 |
|
| 119 |
+
|
| 120 |
+
### Training Loss Curve
|
| 121 |
|
| 122 |
+
<img src="Archaea74M_Training_Loss_Curve.png" width="600"/>
|
| 123 |
|
| 124 |
+
The curve shows the raw per-step loss alongside a smoothed moving average. The loss decrease is consistent throughout training with no notable instability or divergence events.
|
| 125 |
|
| 126 |
+
### Learning Rate Schedule
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 127 |
|
| 128 |
+
<img src="Archaea74M_Learning_Rate_Schedule.png" width="600"/>
|
| 129 |
|
| 130 |
+
OneCycleLR applies a linear warmup phase followed by cosine annealing decay to a minimum learning rate. The warmup phase stabilizes early training before the peak learning rate is reached.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 131 |
|
| 132 |
---
|
| 133 |
|
| 134 |
+
## Evaluation
|
| 135 |
|
| 136 |
+
Archaea-74M was evaluated using [EleutherAI lm-evaluation-harness](https://github.com/EleutherAI/lm-evaluation-harness) on an NVIDIA L4 GPU (24 GB VRAM) in float16 precision. Full datasets were used with no sample limits. Evaluation was conducted on 2026-06-01.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 137 |
|
| 138 |
+
### Per-Task Results
|
| 139 |
|
| 140 |
+
| Benchmark | Few-Shot | Metric | Score | Stderr |
|
| 141 |
+
|---|---|---|---|---|
|
| 142 |
+
| HellaSwag | 10 | acc\_norm | 27.16% | ±0.44% |
|
| 143 |
+
| PIQA | 0 | acc\_norm | 58.60% | ±1.15% |
|
| 144 |
+
| WinoGrande | 5 | acc | 51.14% | ±1.41% |
|
| 145 |
+
| BoolQ | 0 | acc | 56.30% | ±0.87% |
|
| 146 |
+
| ARC-Easy | 25 | acc\_norm | 40.11% | ±1.01% |
|
| 147 |
+
| ARC-Challenge | 25 | acc\_norm | 23.04% | ±1.23% |
|
| 148 |
+
| OpenBookQA | 0 | acc\_norm | 26.00% | ±1.96% |
|
| 149 |
+
| CommonsenseQA | 7 | acc | 18.84% | ±1.12% |
|
| 150 |
+
| LAMBADA (OpenAI) | 0 | acc | 18.05% | ±0.54% |
|
| 151 |
+
| BLiMP | 0 | acc | 74.89% | ±0.14% |
|
| 152 |
+
| MMLU | 5 | acc | 25.07% | ±0.36% |
|
| 153 |
|
| 154 |
+
### Category Averages
|
| 155 |
|
| 156 |
+
| Category | Benchmarks Included | Average Score |
|
| 157 |
+
|---|---|---|
|
| 158 |
+
| Commonsense / NLI | HellaSwag, PIQA, WinoGrande, BoolQ, ARC-Easy, ARC-Challenge, OpenBookQA, CommonsenseQA | 37.65% |
|
| 159 |
+
| Language Modelling | LAMBADA (OpenAI) | 18.05% |
|
| 160 |
+
| Linguistic | BLiMP | 74.89% |
|
| 161 |
+
| Knowledge | MMLU | 25.07% |
|
| 162 |
+
| **Overall Average** | All above | **38.11%** |
|
| 163 |
|
| 164 |
+
### Benchmark Score Distribution
|
| 165 |
|
| 166 |
+
```
|
| 167 |
+
HellaSwag [=======·····················] 27.16%
|
| 168 |
+
PIQA [================············] 58.60%
|
| 169 |
+
WinoGrande [==============··············] 51.14%
|
| 170 |
+
BoolQ [===============·············] 56.30%
|
| 171 |
+
ARC-Easy [===========·················] 40.11%
|
| 172 |
+
ARC-Challenge [======······················] 23.04%
|
| 173 |
+
OpenBookQA [=======·····················] 26.00%
|
| 174 |
+
CommonsenseQA [=====·······················] 18.84%
|
| 175 |
+
LAMBADA [=====·······················] 18.05%
|
| 176 |
+
BLiMP [======================······] 74.89%
|
| 177 |
+
MMLU [=======·····················] 25.07%
|
| 178 |
+
0% 25% 50% 75% 100%
|
| 179 |
+
```
|
| 180 |
|
| 181 |
+
### Notes on Failed Tasks
|
| 182 |
+
|
| 183 |
+
Two tasks could not be evaluated due to infrastructure issues unrelated to the model:
|
| 184 |
|
| 185 |
+
- `social_iqa` — HuggingFace deprecated the `social_i_qa.py` dataset loading script. Re-evaluation pending.
|
| 186 |
+
- `arithmetic_2digit` — Task name has been renamed in the current version of lm-eval. Re-evaluation pending with the updated task identifier.
|
| 187 |
|
| 188 |
+
### Evaluation Environment
|
| 189 |
|
| 190 |
+
```
|
| 191 |
+
Framework : EleutherAI lm-evaluation-harness
|
| 192 |
+
Hardware : NVIDIA L4 (24 GB VRAM), Google Colab
|
| 193 |
+
Precision : float16
|
| 194 |
+
Batch Size : 8
|
| 195 |
+
Limit : None (full datasets)
|
| 196 |
+
Runtime : ~36 minutes
|
| 197 |
+
```
|
| 198 |
|
| 199 |
---
|
| 200 |
|
| 201 |
+
## Usage
|
| 202 |
|
| 203 |
+
### Installation
|
| 204 |
|
| 205 |
```bash
|
| 206 |
pip install torch transformers
|
| 207 |
```
|
| 208 |
|
| 209 |
+
### Loading the Model
|
| 210 |
|
| 211 |
```python
|
| 212 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
|
|
|
| 223 |
)
|
| 224 |
```
|
| 225 |
|
| 226 |
+
### Text Generation
|
| 227 |
|
| 228 |
```python
|
| 229 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
|
|
|
| 232 |
model_id = "GODELEV/Archaea-74M"
|
| 233 |
|
| 234 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 235 |
+
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto")
|
|
|
|
|
|
|
|
|
|
|
|
|
| 236 |
|
| 237 |
prompt = "The future of artificial intelligence"
|
| 238 |
|
| 239 |
+
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
|
|
|
|
|
|
|
|
|
|
| 240 |
|
| 241 |
with torch.no_grad():
|
| 242 |
output = model.generate(
|
|
|
|
| 253 |
|
| 254 |
---
|
| 255 |
|
| 256 |
+
## Repository Structure
|
| 257 |
|
| 258 |
+
```
|
| 259 |
Archaea-74M/
|
| 260 |
├── config.json
|
| 261 |
├── generation_config.json
|
|
|
|
| 270 |
|
| 271 |
---
|
| 272 |
|
| 273 |
+
## Limitations
|
| 274 |
+
|
| 275 |
+
Archaea-74M is a base pretrained model. It has not undergone instruction tuning, RLHF, preference optimization, or any alignment procedure. The following limitations apply:
|
| 276 |
|
| 277 |
+
- Outputs may contain hallucinated or factually incorrect content
|
| 278 |
+
- Reasoning capability is constrained by the model's size and training duration (18,800 steps of a planned 25,000)
|
| 279 |
+
- Factual accuracy is inconsistent, particularly on knowledge-intensive tasks (MMLU: 25.07%)
|
| 280 |
+
- The model is sensitive to prompt phrasing; small changes in input can produce substantially different outputs
|
| 281 |
+
- Context length is fixed at 1024 tokens; inputs longer than this will be truncated
|
| 282 |
+
- The model should not be used for medical, legal, financial, or safety-critical applications
|
| 283 |
|
| 284 |
+
---
|
| 285 |
|
| 286 |
+
## Future Work
|
|
|
|
|
|
|
|
|
|
|
|
|
| 287 |
|
| 288 |
+
- Instruction fine-tuning on a curated supervised dataset
|
| 289 |
+
- Re-evaluation on `social_iqa` and `arithmetic` once dataset/task compatibility is resolved
|
| 290 |
+
- Context length extension beyond 1024 tokens
|
| 291 |
+
- Evaluation on additional benchmarks relevant to the SLM category
|
| 292 |
|
| 293 |
---
|
| 294 |
|
| 295 |
+
## Citation
|
| 296 |
|
| 297 |
```bibtex
|
| 298 |
@misc{archaea74m,
|
| 299 |
+
title = {Archaea-74M},
|
| 300 |
+
author = {Akshit Kumar},
|
| 301 |
+
year = {2026},
|
| 302 |
+
publisher = {Hugging Face},
|
| 303 |
+
url = {https://huggingface.co/GODELEV/Archaea-74M}
|
| 304 |
}
|
| 305 |
```
|