File size: 2,463 Bytes
ac5f886 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | ---
license: apache-2.0
---
# Tlama (124M) - Compact & Efficient Language Model

Tlama (124M) is a language model based on **GPT-2 (127M)** optimized by **EigenCore**. It is designed for **computational efficiency and scalability**, allowing its use on resource-limited hardware without compromising performance.
## π Key Features
- **Architecture based on GPT-2 (124M)** with efficiency improvements.
- **Trained on the edu_fineweb10B dataset**, a subset of FineWeb with 10 billion tokens.
- **Compatible with Hugging Face `transformers`**.
- **Advanced optimizations:** Flash Attention, Mixed Precision Training, Gradient Clipping, Torch.compile.
- **Trainable on consumer hardware**, such as NVIDIA RTX 4060 GPUs.
## π Using the Model on Hugging Face
You can easily load Tlama (124M) with `transformers`:
```python
from transformers import AutoModel, AutoTokenizer
model = AutoModel.from_pretrained("eigencore/tlama-124M", trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained("eigencore/tlama-124M", trust_remote_code=True)
prompt = "Once upon a time in a distant kingdom..."
input_ids = tokenizer.encode(prompt, return_tensors="pt")
output = model.generate(input_ids, max_length=50, num_return_sequences=1)
print(tokenizer.decode(output[0], skip_special_tokens=True))
```
## π Architecture and Training Data
- **Model:** Based on GPT-2 with **124M parameters**.
- **Dataset:** edu_fineweb10B, a web-crawled dataset with 10B tokens.
- **Infrastructure:** Trained on **8 NVIDIA A100 GPUs**, optimized for training on consumer hardware.
- **Optimization Techniques:**
- **Weight Tying** to reduce parameters.
- **Flash Attention** for faster inference.
- **Gradient Accumulation** to train with lower VRAM requirements.
- **Learning Rate Scheduling** with warmup and cosine decay.
## π Benchmark and Performance
Compared to GPT-2 (124M), Tlama (124M):
β
**Reduces inference time** thanks to computational optimizations.
β
**Shows competitive performance on language modeling tasks**.
β
**Enables efficient training on accessible hardware**.
## π© Contact & Contributions
This model is developed by **EigenCore**.
- π More info: [eigencore.org](https://eigencore.org)
- π§ Contact: max@eigencore.org
- π οΈ Contributions: Open to the community!
---
Explore Tlama (124M) and help us build more efficient AI models! π
|