Upload README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- text-generation
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
- uz
|
| 8 |
+
- ru
|
| 9 |
+
tags:
|
| 10 |
+
- causal-lm
|
| 11 |
+
- foundational
|
| 12 |
+
- custom-architectures
|
| 13 |
+
- pytorch
|
| 14 |
+
- d5-series
|
| 15 |
+
- flash-attention
|
| 16 |
+
- multi-lingual
|
| 17 |
+
---
|
| 18 |
+
|
| 19 |
+
# LLM_D5 Model Card
|
| 20 |
+
|
| 21 |
+
## Model Description
|
| 22 |
+
|
| 23 |
+
`LLM_D5` is an experimental foundational autoregressive large language model representing the fifth generation iteration (D5) of custom architectural model training setups. Built entirely from scratch via the orchestration engines provided in the companion [firdavsus/LLM_D5 GitHub repository](https://github.com/firdavsus/LLM_D5), this framework is tailored for ultra-low latency inference, efficient localized deployment, and highly specialized bilingual or trilingual applications.
|
| 24 |
+
|
| 25 |
+
The D5 iteration introduces deeper structural optimizations over previous series runs, adapting advanced attention pooling mechanisms, robust layer dynamics, and refined vocab boundaries specifically tuned for clean multi-lingual handling across **English (`en`)**, **Uzbek (`uz`)**, and **Russian (`ru`)**.
|
| 26 |
+
|
| 27 |
+
### Model Features & Specifications
|
| 28 |
+
- **Model Series:** D5 Iteration Branch
|
| 29 |
+
- **Task:** Causal Language Modeling (`text-generation`)
|
| 30 |
+
- **Core Architecture:** Autoregressive Transformer with decoupled hidden representations, Pre-Layer RMSNorm bounding, and Rotary Position Embeddings (RoPE).
|
| 31 |
+
- **Attention Protocol:** Enhanced Multi-Head / Grouped-Query Attention with native FlashAttention-2 speedup support.
|
| 32 |
+
|
| 33 |
+
---
|
| 34 |
+
|
| 35 |
+
## Intended Uses & Limitations
|
| 36 |
+
|
| 37 |
+
### Target Applications
|
| 38 |
+
- **Multilingual Edge Computing:** Lightweight downstream text generation, text structure tokenization, or conversational tasks on isolated GPU workstations.
|
| 39 |
+
- **Architectural Scaling Research:** Benchmarking sequential state handling, context growth decay, and layer stability profiles across individual training epochs.
|
| 40 |
+
- **Cross-Lingual Adaptation:** Easily adaptable for specialized sequence classification, instruction following, or fine-tuning across Central Asian language sets.
|
| 41 |
+
|
| 42 |
+
### Limitations
|
| 43 |
+
- **Zero-Shot Complexity:** Due to the custom foundational scope, raw checkpoints may require specific chat templating or fine-tuning wrappers to cleanly execute complex multi-step reasoning or mathematical logical pathways without structural deviation.
|
| 44 |
+
- **Tokenizer Bounds:** Sequence token distribution is structurally locked to the vocabulary configuration generated in the D5 preprocessing modules.
|
| 45 |
+
|
| 46 |
+
---
|
| 47 |
+
|
| 48 |
+
## Quickstart Inference
|
| 49 |
+
|
| 50 |
+
You can initialize and extract representations directly from the D5 architecture using PyTorch components provided in the project source repository.
|
| 51 |
+
|
| 52 |
+
```python
|
| 53 |
+
import torch
|
| 54 |
+
from model import Transformer, ModelArgs # Imported from your firdavsus/LLM_D5 codebase
|
| 55 |
+
from tokenizer import Tokenizer
|
| 56 |
+
|
| 57 |
+
# 1. Initialize architectural shape configurations
|
| 58 |
+
args = ModelArgs(
|
| 59 |
+
dim=2048,
|
| 60 |
+
n_layers=32,
|
| 61 |
+
n_heads=32,
|
| 62 |
+
vocab_size=50257,
|
| 63 |
+
max_seq_len=4096
|
| 64 |
+
)
|
| 65 |
+
|
| 66 |
+
# 2. Allocate space and load internal network weights
|
| 67 |
+
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 68 |
+
model = Transformer(args).to(device)
|
| 69 |
+
|
| 70 |
+
checkpoint = torch.load("path_to_d5_checkpoint.pt", map_location=device)
|
| 71 |
+
model.load_state_dict(checkpoint["model"])
|
| 72 |
+
model.eval()
|
| 73 |
+
|
| 74 |
+
print("LLM_D5 pipeline initialized and ready for sequence generation loops.")
|