Create README.md
Browse files123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241# Archaea-74M
Archaea-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 |
---
# Architecture
Archaea-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 System
The model uses Grouped Query Attention (GQA):
* Query Heads: 8* Key/Value Heads: 2* GQA Ratio: 4:1
This configuration reduces memory requirements while maintaining efficient attention computation.
---
# Dataset
## BetterDataset-2M
Dataset:
https://huggingface.co/datasets/GODELEV/BetterDataset-2M
Archaea-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 content
The 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 Curve

The figure above shows the complete training trajectory, including the raw loss values and a smoothed moving-average trend.
---
## Learning Rate Schedule

The 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, AutoModelForCausalLMimport torch
model_id = "GODELEV/Archaea-74M"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained( model_id, torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32, device_map="auto")```
## Text Generation
```pythonfrom transformers import AutoTokenizer, AutoModelForCausalLMimport torch
model_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( **inputs, max_new_tokens=200, temperature=0.8, do_sample=True, repetition_penalty=1.2, pad_token_id=tokenizer.eos_token_id )
print(tokenizer.decode(output[0], skip_special_tokens=True))```
---
# Repository Structure
```textArchaea-74M/βββ config.jsonβββ generation_config.jsonβββ model.safetensorsβββ tokenizer.jsonβββ tokenizer_config.jsonβββ special_tokens_map.jsonβββ README.mdβββ Archaea74M_Training_Loss_Curve.pngβββ Archaea74M_Learning_Rate_Schedule.png```
---
# Limitations
Archaea-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 coverage
The 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}}```README.mdAdded+241