Update README.md
Browse files
README.md
CHANGED
|
@@ -1,69 +1,97 @@
|
|
| 1 |
-
|
| 2 |
|
| 3 |
-
|
| 4 |
|
| 5 |
-
|
| 6 |
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
custom-model
|
| 10 |
-
|
| 11 |
-
tokenizer
|
| 12 |
-
|
| 13 |
-
self-attention
|
| 14 |
-
|
| 15 |
-
π OpenCreate Ai v1 - Edge AI Model
|
| 16 |
-
|
| 17 |
-
OpenCreate Ai v1 is a lightweight, local Edge AI model implementation written entirely in Rust. It features a custom-built architecture including a Tokenizer, Embedding Matrix, Self-Attention mechanism, and Next-Token Prediction pipeline designed for efficient text and code generation on edge devices.
|
| 18 |
-
|
| 19 |
-
π οΈ Model Architecture
|
| 20 |
|
| 21 |
The model consists of four core modular layers implemented from scratch in Rust:
|
| 22 |
|
| 23 |
-
Custom Tokenizer
|
|
|
|
|
|
|
| 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 |
|
| 59 |
-
|
|
|
|
|
|
|
| 60 |
|
| 61 |
-
|
| 62 |
|
| 63 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
|
| 65 |
-
|
| 66 |
|
| 67 |
-
|
| 68 |
|
| 69 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# π OpenCreate Ai v1 - Edge AI Model
|
| 2 |
|
| 3 |
+
**OpenCreate Ai v1** is a lightweight, local Edge AI model implementation written entirely in Rust. It features a custom-built architecture including a Tokenizer, Embedding Matrix, Self-Attention mechanism, and Next-Token Prediction pipeline designed for efficient text and code generation on edge devices.
|
| 4 |
|
| 5 |
+
---
|
| 6 |
|
| 7 |
+
## π οΈ Model Architecture
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
The model consists of four core modular layers implemented from scratch in Rust:
|
| 10 |
|
| 11 |
+
### 1. Custom Tokenizer
|
| 12 |
+
- Builds a vocabulary directly from the training corpus.
|
| 13 |
+
- Handles text encoding (string to token IDs) and decoding (token IDs back to text).
|
| 14 |
|
| 15 |
+
### 2. Embedding Layer
|
| 16 |
+
- Transforms token IDs into dense mathematical vectors (`vocab_size Γ embedding_dim`) using custom weights.
|
| 17 |
|
| 18 |
+
### 3. Self-Attention Mechanism
|
| 19 |
+
- Captures contextual relationships and dependencies between tokens for basic reasoning and comprehension.
|
| 20 |
|
| 21 |
+
### 4. Prediction Layer (Linear / Next-Token)
|
| 22 |
+
- Computes context vectors to predict and generate the next sequential token for text writing or code completion.
|
| 23 |
|
| 24 |
+
### 5. Document & Search Pipeline
|
| 25 |
+
- Local search indexing and text output processing pipeline.
|
| 26 |
|
| 27 |
+
---
|
| 28 |
|
| 29 |
+
## π» Getting Started (Local Run)
|
| 30 |
|
| 31 |
+
Ensure you have Rust & Cargo installed on your system.
|
| 32 |
|
| 33 |
+
### 1. Clone the repository / Open project folder
|
| 34 |
+
```bash
|
| 35 |
+
cd OpenCreateAI
|
| 36 |
+
```
|
| 37 |
|
| 38 |
+
### 2. Run the model via Cargo
|
| 39 |
+
```bash
|
| 40 |
+
cargo run
|
| 41 |
+
```
|
| 42 |
|
| 43 |
+
---
|
| 44 |
|
| 45 |
+
## π Sample Output
|
| 46 |
|
| 47 |
+
When executed locally, the model processes prompts and generates tokens as follows:
|
| 48 |
|
| 49 |
+
```text
|
| 50 |
+
==================================================
|
| 51 |
+
OpenCreate Ai v1 - Edge AI Model Initialized
|
| 52 |
+
==================================================
|
| 53 |
|
| 54 |
+
[1] Tokenization Process:
|
| 55 |
+
Input Prompt : OpenCreate
|
| 56 |
+
Encoded IDs : [0, 1, 2, 3, 4, 5, 2, 6, 7, 2]
|
| 57 |
|
| 58 |
+
[2] Embedding Matrix Generated successfully.
|
| 59 |
+
[3] Self-Attention Mechanism Applied (Reasoning active).
|
| 60 |
|
| 61 |
+
[4] Generation & Output Result:
|
| 62 |
+
Generated Output Text/Code : OpenCreatea
|
| 63 |
|
| 64 |
+
[5] Document & Search Pipeline:
|
| 65 |
+
Status: Local Search Indexing & Document Export Ready.
|
| 66 |
+
==================================================
|
| 67 |
+
```
|
| 68 |
|
| 69 |
+
---
|
| 70 |
+
|
| 71 |
+
## π License
|
| 72 |
|
| 73 |
+
This project is licensed under the **OpenRAIL** (Open Responsible AI License). By using, downloading, or modifying this model, you agree to comply with the terms and conditions promoting safe, responsible, and ethical AI deployment.
|
| 74 |
|
| 75 |
+
| Meta Info | Value |
|
| 76 |
+
|-----------|-------|
|
| 77 |
+
| **License** | openrail |
|
| 78 |
+
| **Language** | en |
|
| 79 |
+
| **Tags** | `rust`, `edge-ai`, `custom-model`, `tokenizer`, `self-attention` |
|
| 80 |
|
| 81 |
+
---
|
| 82 |
|
| 83 |
+
## Project Structure
|
| 84 |
|
| 85 |
+
```
|
| 86 |
+
OpenCreateAI/
|
| 87 |
+
βββ Cargo.toml
|
| 88 |
+
βββ src/
|
| 89 |
+
β βββ main.rs
|
| 90 |
+
β βββ tokenizer.rs
|
| 91 |
+
β βββ embedding.rs
|
| 92 |
+
β βββ attention.rs
|
| 93 |
+
β βββ prediction.rs
|
| 94 |
+
β βββ search.rs
|
| 95 |
+
βββ data/
|
| 96 |
+
βββ corpus.txt
|
| 97 |
+
```
|