Update README.md
Browse files7 unmodified lines8910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515610 unmodified lines1671681691701711721732 unmodified lines17617717817918018118218318418518618718818919019119219310 unmodified lines2042052062072082092102112128 unmodified lines2212222232242252262272282292302312322332342352362372382392402412422432442452462472482497 unmodified lines---# Archaea-74MArchaea-74M is a small decoder-only transformer language model trained on BetterDataset-2M.The project focuses on efficient pretraining of a compact language model using a curated multi-source dataset and a modern transformer architecture with Grouped Query Attention (GQA).---# Model Information| Attribute | Value || ----------------- | --------------------------------- || Model Name | Archaea-74M || Parameters | ~74M || Architecture | Decoder-Only Transformer || Base Architecture | LLaMA-style || Attention | Grouped Query Attention (GQA) || Dataset | BetterDataset-2M || Context Length | 1024 || Vocabulary | GPT-2 Tokenizer (~50k vocabulary) || Framework | PyTorch + Transformers || License | Apache-2.0 |---# ArchitectureArchaea-74M uses a decoder-only transformer architecture implemented with `LlamaForCausalLM`.## Configuration| Parameter | Value || ----------------- | ----- || Hidden Size | 512 || Intermediate Size | 1408 || Layers | 8 || Attention Heads | 8 || KV Heads | 2 || Context Length | 1024 || Activation | SiLU || RMSNorm Epsilon | 1e-5 |## Attention SystemThe model uses Grouped Query Attention (GQA):* Query Heads: 8* Key/Value Heads: 2* GQA Ratio: 4:1This configuration reduces memory requirements while maintaining efficient attention computation.---# Dataset## BetterDataset-2MDataset:https://huggingface.co/datasets/GODELEV/BetterDataset-2MArchaea-74M was trained on BetterDataset-2M, a custom dataset assembled from multiple text sources into a unified corpus.The dataset contains a mixture of:* General text* Conversational data* Instruction-oriented samples* Knowledge-focused content* Technical text* Code-related contentThe training pipeline automatically identifies the text field and tokenizes samples using the GPT-2 tokenizer before packing them into contiguous 1024-token sequences.---# Training Configuration## Optimization| Parameter | Value || ----------------- | ------------------------ || Optimizer | AdamW || Scheduler | OneCycleLR || Learning Rate | 6e-4 || Weight Decay | 0.1 || Gradient Clipping | 1.0 || Precision | bfloat16 Mixed Precision || Compilation | torch.compile |## Batch Configuration| Parameter | Value || --------------------------- | ----- || Sequence Length | 1024 || Micro Batch Size | 16 || Gradient Accumulation Steps | 8 || Effective Batch Size | 128 |---# Training Statistics| Metric | Value || ------------------- | ------- || Total Steps Trained | 18,800 || Planned Steps | 25,000 || Initial Loss | 10.9223 || Final Loss | 2.9488 || Best Loss | 2.8071 || Final Perplexity | 19.08 || Best Perplexity | 16.56 |Training was stopped before the planned completion point in order to continue experimentation and improvements in future training runs.---# Training Visualizations## Training Loss CurveThe figure above shows the complete training trajectory, including the raw loss values and a smoothed moving-average trend.---## Learning Rate ScheduleThe model was trained using AdamW with a OneCycleLR scheduler featuring an initial warmup phase followed by gradual decay.---# Usage## Installation```bashpip install torch transformers```## Loading the Model```pythonfrom transformers import AutoTokenizer, AutoModelForCausalLM10 unmodified lines)```## Text Generation```pythonfrom transformers import AutoTokenizer, AutoModelForCausalLM2 unmodified linesmodel_id = "GODELEV/Archaea-74M"tokenizer = AutoTokenizer.from_pretrained(model_id)model = AutoModelForCausalLM.from_pretrained(model_id,device_map="auto")prompt = "The future of artificial intelligence"inputs = tokenizer(prompt,return_tensors="pt").to(model.device)with torch.no_grad():output = model.generate(10 unmodified lines---# Repository Structure```textArchaea-74M/├── config.json├── generation_config.json8 unmodified lines---# LimitationsArchaea-74M is a pretrained base model and has not undergone instruction tuning, preference optimization, or extensive benchmark evaluation.Known limitations include:* Hallucinations* Limited reasoning capability compared to larger models* Inconsistent factual accuracy* Sensitivity to prompt wording* Limited evaluation coverageThe model should not be used for medical, legal, financial, or safety-critical decision making.---# Citation```bibtex@misc{archaea74m,title={Archaea-74M},author={Akshit Kumar},year={2026},publisher={Hugging Face}}```7 unmodified lines8910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121210 unmodified lines2232242252262272282292 unmodified lines23223323423523623723823924024124210 unmodified lines2532542552562572582592602618 unmodified lines2702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043057 unmodified lines---# Archaea-74MArchaea-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.Training was stopped at 18,800 of a planned 25,000 steps to allow for architecture and data pipeline iteration in future runs.---## Model Card| Attribute | Value ||---|---|| Model ID | `GODELEV/Archaea-74M` || Parameters | ~74 million || Architecture | Decoder-only Transformer (LLaMA-style) || Attention | Grouped Query Attention (GQA) || Context Length | 1024 tokens || Tokenizer | GPT-2 (~50,257 vocabulary) || Training Precision | bfloat16 Mixed Precision || License | Apache-2.0 || Framework | PyTorch + HuggingFace Transformers |---# Archaea-74MArchaea-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.Training was stopped at 18,800 of a planned 25,000 steps to allow for architecture and data pipeline iteration in future runs.---## Model Card| Attribute | Value ||---|---|| Model ID | `GODELEV/Archaea-74M` || Parameters | ~74 million || Architecture | Decoder-only Transformer (LLaMA-style) || Attention | Grouped Query Attention (GQA) || Context Length | 1024 tokens || Tokenizer | GPT-2 (~50,257 vocabulary) || Training Precision | bfloat16 Mixed Precision || License | Apache-2.0 || Framework | PyTorch + HuggingFace Transformers |---## ArchitectureArchaea-74M implements `LlamaForCausalLM` with the following configuration:### Transformer Configuration| Parameter | Value ||---|---|| Hidden Size | 512 || Intermediate Size | 1408 || Number of Layers | 8 || Attention Heads | 8 || KV Heads (GQA) | 2 || GQA Ratio | 4:1 || Activation Function | SiLU || Normalization | RMSNorm (eps = 1e-5) || Context Length | 1024 tokens |### Grouped Query AttentionThe 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.---## Training### DatasetArchaea-74M was trained on [BetterDataset-2M](https://huggingface.co/datasets/GODELEV/BetterDataset-2M), a multi-source corpus assembled from:- General web text- Conversational data- Instruction-oriented samples- Knowledge-focused content- Technical and code-related textSamples were tokenized using the GPT-2 tokenizer and packed into contiguous 1024-token sequences.### Optimization| Parameter | Value ||---|---|| Optimizer | AdamW || Learning Rate Scheduler | OneCycleLR || Peak Learning Rate | 6e-4 || Weight Decay | 0.1 || Gradient Clipping | 1.0 || Sequence Length | 1024 || Micro Batch Size | 16 || Gradient Accumulation Steps | 8 || Effective Batch Size | 128 || Compilation | `torch.compile` |### Training Statistics| Metric | Value ||---|---|| Total Steps Trained | 18,800 / 25,000 || Initial Loss | 10.9223 || Final Loss | 2.9488 || Best Loss | 2.8071 || Final Perplexity | 19.08 || Best Perplexity | 16.56 |### Training Loss Curve<img src="Archaea74M_Training_Loss_Curve.png" width="600"/>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.### Learning Rate Schedule<img src="Archaea74M_Learning_Rate_Schedule.png" width="600"/>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.---## EvaluationArchaea-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.### Per-Task Results| Benchmark | Few-Shot | Metric | Score | Stderr ||---|---|---|---|---|| HellaSwag | 10 | acc\_norm | 27.16% | ±0.44% || PIQA | 0 | acc\_norm | 58.60% | ±1.15% || WinoGrande | 5 | acc | 51.14% | ±1.41% || BoolQ | 0 | acc | 56.30% | ±0.87% || ARC-Easy | 25 | acc\_norm | 40.11% | ±1.01% || ARC-Challenge | 25 | acc\_norm | 23.04% | ±1.23% || OpenBookQA | 0 | acc\_norm | 26.00% | ±1.96% || CommonsenseQA | 7 | acc | 18.84% | ±1.12% || LAMBADA (OpenAI) | 0 | acc | 18.05% | ±0.54% || BLiMP | 0 | acc | 74.89% | ±0.14% || MMLU | 5 | acc | 25.07% | ±0.36% |### Category Averages| Category | Benchmarks Included | Average Score ||---|---|---|| Commonsense / NLI | HellaSwag, PIQA, WinoGrande, BoolQ, ARC-Easy, ARC-Challenge, OpenBookQA, CommonsenseQA | 37.65% || Language Modelling | LAMBADA (OpenAI) | 18.05% || Linguistic | BLiMP | 74.89% || Knowledge | MMLU | 25.07% || **Overall Average** | All above | **38.11%** |### Benchmark Score Distribution```HellaSwag [=======·····················] 27.16%PIQA [================············] 58.60%WinoGrande [==============··············] 51.14%BoolQ [===============·············] 56.30%ARC-Easy [===========·················] 40.11%ARC-Challenge [======······················] 23.04%OpenBookQA [=======·····················] 26.00%CommonsenseQA [=====·······················] 18.84%LAMBADA [=====·······················] 18.05%BLiMP [======================······] 74.89%MMLU [=======·····················] 25.07%0% 25% 50% 75% 100%```### Notes on Failed TasksTwo tasks could not be evaluated due to infrastructure issues unrelated to the model:- `social_iqa` — HuggingFace deprecated the `social_i_qa.py` dataset loading script. Re-evaluation pending.- `arithmetic_2digit` — Task name has been renamed in the current version of lm-eval. Re-evaluation pending with the updated task identifier.### Evaluation Environment```Framework : EleutherAI lm-evaluation-harnessHardware : NVIDIA L4 (24 GB VRAM), Google ColabPrecision : float16Batch Size : 8Limit : None (full datasets)Runtime : ~36 minutes```---## Usage### Installation```bashpip install torch transformers```### Loading the Model```pythonfrom transformers import AutoTokenizer, AutoModelForCausalLM10 unmodified lines)```### Text Generation```pythonfrom transformers import AutoTokenizer, AutoModelForCausalLM2 unmodified linesmodel_id = "GODELEV/Archaea-74M"tokenizer = AutoTokenizer.from_pretrained(model_id)model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto")prompt = "The future of artificial intelligence"inputs = tokenizer(prompt, return_tensors="pt").to(model.device)with torch.no_grad():output = model.generate(10 unmodified lines---## Repository Structure```Archaea-74M/├── config.json├── generation_config.json8 unmodified lines---## LimitationsArchaea-74M is a base pretrained model. It has not undergone instruction tuning, RLHF, preference optimization, or any alignment procedure. The following limitations apply:- Outputs may contain hallucinated or factually incorrect content- Reasoning capability is constrained by the model's size and training duration (18,800 steps of a planned 25,000)- Factual accuracy is inconsistent, particularly on knowledge-intensive tasks (MMLU: 25.07%)- The model is sensitive to prompt phrasing; small changes in input can produce substantially different outputs- Context length is fixed at 1024 tokens; inputs longer than this will be truncated- The model should not be used for medical, legal, financial, or safety-critical applications---## Future Work- Instruction fine-tuning on a curated supervised dataset- Re-evaluation on `social_iqa` and `arithmetic` once dataset/task compatibility is resolved- Context length extension beyond 1024 tokens- Evaluation on additional benchmarks relevant to the SLM category---## Citation```bibtex@misc{archaea74m,title = {Archaea-74M},author = {Akshit Kumar},year = {2026},publisher = {Hugging Face},url = {https://huggingface.co/GODELEV/Archaea-74M}}```
README.md+172-116