File size: 4,004 Bytes
d0a8e50
ba92922
 
 
 
d0a8e50
954b49f
d0a8e50
 
 
 
 
ba92922
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
title: Architech - AI Model Architect
emoji: πŸ—οΈ
colorFrom: blue
colorTo: purple
sdk: gradio
sdk_version: 6.4.0
app_file: app.py
pinned: false
license: mit
---

# πŸ—οΈ Architech - Your Personal AI Model Architect

**Create custom AI models without the headache!** Just describe what you want, and Architech handles the rest.

## ✨ Features

### πŸ“Š Synthetic Data Generation
- Generate high-quality training data from simple descriptions
- Support for multiple domains: Technology, Healthcare, Finance, Education
- Multiple format types: Conversational, Instruction-following
- 50-500 examples per dataset

### πŸš€ Model Training
- Fine-tune state-of-the-art models (GPT-2, DialoGPT)
- Automatic optimization and parameter tuning
- Direct deployment to HuggingFace Hub
- GPU-accelerated training with efficient memory usage

### πŸ§ͺ Model Testing
- Load and test your trained models instantly
- Interactive inference with adjustable parameters
- Real-time generation with temperature and length controls

### πŸ”’ Security & Limits
- **Rate Limiting**: Fair usage for all users
  - Dataset Generation: 10/hour
  - Model Training: 3/hour
  - Model Inference: 50/hour
- **Token Authentication**: Secure HuggingFace integration
- **Error Handling**: Comprehensive error messages and recovery

## πŸš€ Quick Start

### 1. Generate Training Data
1. Go to the **"Generate Dataset"** tab
2. Describe your task (e.g., "Customer support chatbot for tech products")
3. Select domain and size
4. Click **"Generate Dataset"**

### 2. Train Your Model
1. Go to the **"Train Model"** tab
2. Enter your model name and HuggingFace token
3. Choose to use synthetic data or provide your own
4. Click **"Train Model"**
5. Wait for training to complete (5-15 minutes)

### 3. Test Your Model
1. Go to the **"Test Model"** tab
2. Enter your model name and token
3. Click **"Load Model"**
4. Enter a test prompt and generate!

## πŸ“‹ Requirements

- HuggingFace account with **write** token
- For training: GPU recommended (CPU works but slower)
- Patience during training (coffee break recommended β˜•)

## 🎯 Use Cases

- **Customer Support Bots**: Train chatbots for specific products/services
- **Content Generation**: Create domain-specific text generators
- **Educational Tools**: Build tutoring and explanation systems
- **Creative Writing**: Fine-tune for specific writing styles
- **Technical Documentation**: Generate code explanations and docs

## βš™οΈ Technical Details

### Supported Base Models
- `distilgpt2` (fastest, smallest)
- `gpt2` (balanced)
- `microsoft/DialoGPT-small` (conversational)

### Training Features
- Gradient accumulation for memory efficiency
- Mixed precision training (FP16)
- Automatic learning rate optimization
- Smart tokenization and padding

### Synthetic Data Quality
- Domain-specific vocabulary
- Natural language variations
- Contextually relevant examples
- Edge case handling

## πŸ› οΈ Troubleshooting

### "GPU Memory Overflow"
- Reduce batch size to 1
- Use smaller base model (distilgpt2)
- Reduce dataset size

### "Permission Denied"
- Check your HuggingFace token has **WRITE** access
- Generate new token at: https://huggingface.co/settings/tokens

### "Rate Limit Exceeded"
- Wait for the cooldown period
- Check remaining requests in error message

## πŸ“š Best Practices

1. **Start Small**: Begin with 100 examples and 3 epochs
2. **Be Specific**: Detailed task descriptions yield better results
3. **Test First**: Use the Test tab before deploying
4. **Iterate**: Train multiple versions with different parameters
5. **Monitor**: Watch training logs for issues

## 🀝 Contributing

Found a bug? Have a feature request? Open an issue!

## πŸ“œ License

MIT License - feel free to use and modify!

## πŸ™ Acknowledgments

Built with:
- [Gradio](https://gradio.app/) - Interface
- [Transformers](https://huggingface.co/transformers/) - Models
- [HuggingFace](https://huggingface.co/) - Infrastructure

---

*No PhD required. Just ideas.* ✨