File size: 6,384 Bytes
bcff88a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2b3ad7f
89996cc
 
 
 
 
bcff88a
2b3ad7f
bcff88a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bf48f13
 
bcff88a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
---
license: mit
library_name: transformers, llama-cpp-python
tags:
- dual-model
- edge-ai
- instruction-tuned
- robotics
- quantized
- raspberry-pi
- llama
- intent-classification
- text-generation
- on-device
language:
- en
- ta
- hi
datasets:
- Apex-X/PRODIGY-LAB_SARA
---
![PRODIGY-Dual](https://img.shields.io/badge/PRODIGY--DOIECHI--SARA-Dual%20Model%20System-blue)
![Memory-Efficient](https://img.shields.io/badge/Edge--Optimized-Raspberry%20Pi%20Ready-green)
![Multi-Model](https://img.shields.io/badge/Dual--Architecture-Intelligent%20Routing-orange)
![Python](https://img.shields.io/badge/Python-3.8%2B-green)
![License](https://img.shields.io/badge/License-MIT-yellow)
![Multilingual](https://img.shields.io/badge/Multilingual-South%20Indian%20Languages-orange)

<p align="center">
  <img src="https://huggingface.co/blog/assets/171_prodigy_hf/thumbnail.png" alt="PRODIGY 1.2B Banner" width="80%">
</p>


# Model Card for PRODIGY-DOIECHI & PRODIGY-SARA

A revolutionary **dual-model AI system** optimized for **edge devices** (Raspberry Pi, Jetson Nano, etc.), combining an ultra-lightweight intent classifier (**PRODIGY-DOIECHI**) with a powerful reasoning engine (**PRODIGY-SARA**). The system intelligently routes queries to the optimal model based on complexity, enabling both **sub-100ms responses** and **deep reasoning** on low-resource hardware.

- **GitHub**: [https://github.com/Apex-X/PRODIGY-DOIECHI-SARA](https://github.com/Apex-X/PRODIGY-DOIECHI-SARA)  
- **Author**: Aadhithya (Apex-X)  
- **Contact**: [email protected]  
- **License**: MIT  

---

## Model Details

### πŸš€ PRODIGY-DOIECHI
- **Type**: Neural Network Intent Classifier  
- **Parameters**: 1.2M  
- **Format**: PyTorch (`.pth`)  
- **Size**: < 50 MB  
- **Input**: Natural language query  
- **Output**: Structured intent + confidence score  
- **Use Case**: Commands, calculations, system operations, greetings  

### 🧠 PRODIGY-SARA
- **Base Model**: Llama-7B ,QWEN-238B 
- **Quantization**: GGUF `Q4_K_M`  
- **Format**: GGUF (via `llama-cpp-python`)  
- **Size**: ~3.8 GB  
- **Context Window**: 1024 tokens  
- **Fine-tuned on**: [Apex-X/PRODIGY-LAB_SARA](https://huggingface.co/datasets/Apex-X/PRODIGY-LAB_SARA)  
- **Domains**: Robotics, Tamil Nadu culture, agriculture, medical support, ethics, general reasoning  

---

## Intended Use

This system is designed for **on-device AI assistants** in:
- Smart homes
- Educational robots
- Industrial IoT monitoring
- Rural digital kiosks (supporting Tamil, Hindi, English)

**Not intended** for high-stakes medical diagnosis, legal advice, or autonomous weapon systems.

---

## Performance (Raspberry Pi 4)

| Metric               | DOIECHI     | SARA         |
|----------------------|-------------|--------------|
| RAM Usage            | 45 MB       | 3.8 GB       |
| Avg. Latency         | 85 ms       | 2.3 sec      |
| Throughput           | 11.8 q/s    | 0.43 q/s     |
| Intent Accuracy      | 89%         | β€”            |
| Generation Speed     | β€”           | 2.3 tok/sec  |

> Combined system averages **0.8s response time** in real-world mixed workloads.

---

## Smart Routing Logic

The system uses a 4-stage pipeline:
1. **Memory** β†’ short-term context (non-persistent)
2. **Function Executor** β†’ direct system commands
3. **DOIECHI** β†’ classify intent & complexity
4. **SARA** β†’ activated only if confidence < 0.85 or query contains reasoning keywords (`explain`, `how`, `why`, etc.)

Routing decision takes **< 5ms** and learns from usage patterns.

---

## How to Use

### Python (Combined System)
```python
from prodigy_system import ProdigyDualSystem
system = ProdigyDualSystem()
print(system.process("What's 128 / 4?"))           # β†’ DOIECHI
print(system.process("Explain photosynthesis."))  # β†’ SARA
```
---

## 🧠 Hardware Requirements

**Minimum**
- Raspberry Pi Zero 2 W (64-bit OS)
- OS: Linux (64-bit)
- Python: 3.8+
- RAM: 2–4 GB
- Dependencies:  
  `torch`, `llama-cpp-python`, `nltk`, `psutil`

**Recommended**
- Raspberry Pi 4 (4GB+ RAM) or NVIDIA Jetson Nano
- OS: Ubuntu 20.04+ / Raspberry Pi OS 64-bit
- Python: 3.10+
- Dependencies:  
  `torch` (CUDA build), `llama-cpp-python`, `nltk`, `psutil`, `huggingface_hub`

**Optional**
- Use Hugging Face Spaces or local FastAPI app for deployment  
- GPU acceleration supported (NVIDIA RTX 20xx or higher)  
- Convert model to GGUF or quantized formats for faster inference

---

## βš–οΈ Ethical Considerations

- **No Persistent Data Storage**  
  The system does not store personal data or user history beyond the current session.

- **User Privacy First**  
  Every interaction is processed locally or in-memory. No external tracking or telemetry.

- **Multilingual Accessibility**  
  Built with South Indian language inclusivity in mind, ensuring wider digital access.

- **Bias Awareness**  
  Model responses are generated from training data that may contain inherent biases.  
  Always review critical outputs with human oversight.

- **Responsible Usage**  
  This model is for research, educational, and robotics-related applications only.  
  Avoid use in contexts that generate harmful, discriminatory, or deceptive content.

---

*Developed as part of the **PRODIGY 1.2B** open research initiative on Hugging Face.*  
*Optimized for lightweight AI deployment on edge devices like Raspberry Pi and Jetson Nano.*

Citation
@software{prodigy_dual_2025,
  author = {Aadhithya Ravi},
  title = {PRODIGY-DOIECHI \& PRODIGY-SARA: A Dual-Model Edge AI System},
  year = {2025},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/Apex-X/PRODIGY-DOIECHI-SARA}}
}
---

## 🏁 Acknowledgements

- Built on **llama.cpp** and **PyTorch**  
- Inspired by **Alpaca**, **Self-Instruct**, and **TinyLLM** research  
- Special thanks to the **Raspberry Pi** and **open-source AI** communities for enabling lightweight, accessible edge AI innovation  

Β© 2025 **Aadhithya (Apex-X)**. Released under the **MIT License**.

---

This format follows Hugging Face’s **standard model card structure**, includes all metadata in the YAML frontmatter, and is ready to be used as the `README.md` in a Hugging Face **model repository** (e.g., `Apex-X/PRODIGY-DOIECHI-SARA`).

Let me know if you'd like separate cards for each model or a version optimized for the **Hugging Face Spaces** demo!