-
Notifications
You must be signed in to change notification settings - Fork 3
/
doc.txt
111 lines (85 loc) · 3.84 KB
/
doc.txt
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
Here's a structured documentation outline for your project "nanograd" to share with your team:
see the codgen from tinygrad and triton repo, try to build the vision transformer, and the codellama or seomthing like this
see mistral models like mixtral etc..
---
# Nanograd: Your Ultimate Neural Net Engine
## Introduction
**Nanograd** is a neural net engine inspired by micrograd and tinygrad, built upon a PyTorch-like API. It aims to provide users with easy-to-use tools for creating and utilizing various neural network architectures, including GPT, llama, stable diffusion, RNN, CNN, and transformers. This library also offers comprehensive data processing capabilities.
## Features
1. **GPT Model with Checkpoints**
- Pre-trained GPT models available for immediate use.
- Customizable checkpoints for fine-tuning and continued training.
2. **Llama Model with Checkpoints**
- Includes pre-trained Llama models.
- Checkpoints for Llama-7B and others available for download.
3. **Stable Diffusion**
- Implements stable diffusion models.
- Based on work from Umar Jamil and the user's DDPM repository.
4. **Reinforcement Learning Techniques**
- Integration of various RL algorithms and techniques.
5. **Data Cleaning and Pipeline Operations**
- Data processing tools inspired by litdata from Lightning AI.
- End-to-end data operations from cleaning to pipeline execution.
## Team Roles
- **AI Development**: Esmail Gumaan
- Responsible for neural network, RL, and model implementations.
- **Data Engineering**: Ibraheem Sultan
- Handles data pipeline, checkpoints, and processing tasks.
- **Low-Level Programming**: Ahmed AL-Kateeb
- Focuses on CUDA, C++ optimizations, and OS-level programming.
- **Website Design**: Ibraheem Al-Hitari
- Develops the project website and manages its visual profile.
## Planned Models and Functions
- **GPT Architecture**: Derived from litGPT and biogpt from Hugging Face Transformers.
- **Llama Architecture**: Based on litLlama and Xllama.
- **Optimizers**:
- `from nanograd.optimizers import Adam`
- `from nanograd.optimizers import Sophia-G`
- **Normalization Techniques**:
- `from nanograd.norm import batch_norm`
- `from nanograd.norm import layer_norm`
## Sample Code Snippets
```python
from nanograd.llama import Llama
llama = Llama(prompt="", dataset="")
from nanograd.nn import CNN, RNN, GPT, Transformer
cnn = CNN(input_neurons=, output_neurons=)
rnn = RNN()
gpt = GPT()
transformer = Transformer()
from nanograd.sd import StableDiffusion
sd = StableDiffusion()
sd.generate()
from nanograd.nn import modules, optimizers
rnn_module = modules.RNN()
cnn_module = modules.CNN()
transformer_module = modules.Transformer()
adam_optimizer = optimizers.Adam()
adamw_optimizer = optimizers.AdamW()
from nanograd.models import llama, stable_diffusion
llama.generate()
sd.generate()
from nanograd.data import pipeline, checkpoints
from nanograd.RL import QLearning
```
## Usage of Data and Checkpoints
```python
from nanograd.data import pipeline, checkpoints
# Data processing and loading checkpoints for models
```
## Reinforcement Learning Components
```python
from nanograd.RL import QLearning, other_algorithms
```
## Web Interface and Deployment
- Exploring web UI options like Gradio or Streamlit for user interaction.
## Nanograd Computer (Nano Computer)
- Building small computers using Raspberry Pi.
- Installing Ubuntu OS and testing the nanograd library on them.
- **Logo Command**: `nanograd on nano computer`
## Project Development Plan
### Initial Steps
1. Understand the principles of building a library to integrate into Python.
2. Discuss and explain various ideas within the team to get a comprehensive understanding of the project.
---
By following this documentation outline, you can ensure your team is on the same page and has a clear understanding of the project's goals, features, and development plan.