hleliofficiel commited on
Commit
0fabd2b
Β·
verified Β·
1 Parent(s): 0c741fd

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +351 -0
README.md ADDED
@@ -0,0 +1,351 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ - ar
6
+ - fr
7
+ - zh
8
+ - de
9
+ - es
10
+ - ja
11
+ - ko
12
+ - ru
13
+ - pt
14
+ - multilingual
15
+ library_name: transformers
16
+ pipeline_tag: text-generation
17
+ tags:
18
+ - qwen2
19
+ - chat
20
+ - code
21
+ - security
22
+ - alphaexaai
23
+ - examind
24
+ - conversational
25
+ - open-source
26
+ base_model:
27
+ - Qwen/Qwen2.5-Coder-7B
28
+ model-index:
29
+ - name: ExaMind-V2-Final
30
+ results:
31
+ - task:
32
+ type: text-generation
33
+ name: Text Generation
34
+ dataset:
35
+ name: MMLU
36
+ type: cais/mmlu
37
+ metrics:
38
+ - type: accuracy
39
+ name: MMLU World Religions (0-shot)
40
+ value: 94.8
41
+ verified: false
42
+ - task:
43
+ type: text-generation
44
+ name: Code Generation
45
+ dataset:
46
+ name: HumanEval
47
+ type: openai/openai_humaneval
48
+ metrics:
49
+ - type: pass@1
50
+ name: HumanEval pass@1
51
+ value: 79.3
52
+ verified: false
53
+ ---
54
+
55
+ <div align="center">
56
+
57
+ # 🧠 ExaMind
58
+
59
+ ### Advanced Open-Source AI by AlphaExaAI
60
+
61
+ [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
62
+ [![Model](https://img.shields.io/badge/Model-7B%20Parameters-purple)](https://huggingface.co/AlphaExaAI/ExaMind)
63
+ [![GitHub](https://img.shields.io/badge/GitHub-AlphaExaAI-black?logo=github)](https://github.com/hleliofficiel/AlphaExaAI)
64
+ [![Architecture](https://img.shields.io/badge/Architecture-Qwen2-green)](https://huggingface.co/Qwen)
65
+
66
+ **ExaMind** is an advanced open-source conversational AI model developed by the **AlphaExaAI** team.
67
+ Designed for secure, structured, and professional AI assistance with strong identity enforcement and production-ready deployment stability.
68
+
69
+ [πŸš€ Get Started](#-quick-start) Β· [πŸ“Š Benchmarks](#-benchmarks) Β· [🀝 Contributing](#-contributing) Β· [πŸ“„ License](#-license)
70
+
71
+ </div>
72
+
73
+ ---
74
+
75
+ ## πŸ“Œ Model Overview
76
+
77
+ | Property | Details |
78
+ |----------|---------|
79
+ | **Model Name** | ExaMind |
80
+ | **Version** | V2-Final |
81
+ | **Developer** | [AlphaExaAI](https://github.com/hleliofficiel/AlphaExaAI) |
82
+ | **Base Architecture** | Qwen2.5-Coder-7B |
83
+ | **Parameters** | 7 Billion (7B) |
84
+ | **Precision** | FP32 (~29GB) / FP16 (~15GB) |
85
+ | **Context Window** | 32,768 tokens (supports up to 128K with RoPE scaling) |
86
+ | **License** | Apache 2.0 |
87
+ | **Languages** | Multilingual (English preferred) |
88
+ | **Deployment** | βœ… CPU & GPU compatible |
89
+
90
+ ---
91
+
92
+ ## ✨ Key Capabilities
93
+
94
+ - πŸ–₯️ **Advanced Programming** β€” Code generation, debugging, architecture design, and code review
95
+ - 🧩 **Complex Problem Solving** β€” Multi-step logical reasoning and deep technical analysis
96
+ - πŸ”’ **Security-First Design** β€” Built-in prompt injection resistance and identity enforcement
97
+ - 🌍 **Multilingual** β€” Supports all major world languages, optimized for English
98
+ - πŸ’¬ **Conversational AI** β€” Natural, structured, and professional dialogue
99
+ - πŸ—οΈ **Scalable Architecture** β€” Secure software engineering and system design guidance
100
+ - ⚑ **CPU Deployable** β€” Runs on CPU nodes without GPU requirement
101
+
102
+ ---
103
+
104
+ ## πŸ“Š Benchmarks
105
+
106
+ ### General Knowledge & Reasoning
107
+
108
+ | Benchmark | Setting | Score |
109
+ |-----------|---------|-------|
110
+ | **MMLU – World Religions** | 0-shot | **94.8%** |
111
+ | **MMLU – Overall** | 5-shot | **72.1%** |
112
+ | **ARC-Challenge** | 25-shot | **68.4%** |
113
+ | **HellaSwag** | 10-shot | **78.9%** |
114
+ | **TruthfulQA** | 0-shot | **61.2%** |
115
+ | **Winogrande** | 5-shot | **74.5%** |
116
+
117
+ ### Code Generation
118
+
119
+ | Benchmark | Setting | Score |
120
+ |-----------|---------|-------|
121
+ | **HumanEval** | pass@1 | **79.3%** |
122
+ | **MBPP** | pass@1 | **71.8%** |
123
+ | **MultiPL-E (Python)** | pass@1 | **76.5%** |
124
+ | **DS-1000** | pass@1 | **48.2%** |
125
+
126
+ ### Math & Reasoning
127
+
128
+ | Benchmark | Setting | Score |
129
+ |-----------|---------|-------|
130
+ | **GSM8K** | 8-shot CoT | **82.4%** |
131
+ | **MATH** | 4-shot | **45.7%** |
132
+
133
+ ### πŸ” Prompt Injection Resistance
134
+
135
+ | Test | Details |
136
+ |------|---------|
137
+ | **Test Set Size** | 50 adversarial prompts |
138
+ | **Attack Type** | Instruction override / identity manipulation |
139
+ | **Resistance Rate** | **92%** |
140
+ | **Method** | Custom red-teaming with jailbreak & override attempts |
141
+
142
+ > Evaluation performed using `lm-eval-harness` on CPU. Security tests performed using custom adversarial prompt suite.
143
+
144
+ ---
145
+
146
+ ## πŸš€ Quick Start
147
+
148
+ ### Installation
149
+
150
+ ```bash
151
+ pip install transformers torch accelerate
152
+ ```
153
+
154
+ ### Basic Usage
155
+
156
+ ```python
157
+ from transformers import AutoTokenizer, AutoModelForCausalLM
158
+ import torch
159
+
160
+ model_path = "AlphaExaAI/ExaMind"
161
+
162
+ tokenizer = AutoTokenizer.from_pretrained(model_path)
163
+ model = AutoModelForCausalLM.from_pretrained(
164
+ model_path,
165
+ torch_dtype=torch.float16,
166
+ device_map="auto"
167
+ )
168
+
169
+ messages = [
170
+ {"role": "user", "content": "Explain how to secure a REST API."}
171
+ ]
172
+
173
+ inputs = tokenizer.apply_chat_template(
174
+ messages,
175
+ return_tensors="pt",
176
+ add_generation_prompt=True
177
+ ).to(model.device)
178
+
179
+ outputs = model.generate(
180
+ inputs,
181
+ max_new_tokens=512,
182
+ temperature=0.7,
183
+ top_p=0.8,
184
+ top_k=20,
185
+ repetition_penalty=1.1
186
+ )
187
+
188
+ response = tokenizer.decode(
189
+ outputs[0][inputs.shape[-1]:],
190
+ skip_special_tokens=True
191
+ )
192
+ print(response)
193
+ ```
194
+
195
+ ### CPU Deployment
196
+
197
+ ```python
198
+ model = AutoModelForCausalLM.from_pretrained(
199
+ "AlphaExaAI/ExaMind",
200
+ torch_dtype=torch.float32,
201
+ device_map="cpu"
202
+ )
203
+ ```
204
+
205
+ ### Using with llama.cpp (GGUF β€” Coming Soon)
206
+
207
+ ```bash
208
+ # GGUF quantized versions will be released for efficient CPU inference
209
+ # Stay tuned for Q4_K_M, Q5_K_M, and Q8_0 variants
210
+ ```
211
+
212
+ ---
213
+
214
+ ## πŸ—οΈ Architecture
215
+
216
+ ```
217
+ ExaMind-V2-Final
218
+ β”œβ”€β”€ Architecture: Qwen2ForCausalLM (Transformer)
219
+ β”œβ”€β”€ Hidden Size: 3,584
220
+ β”œβ”€β”€ Intermediate Size: 18,944
221
+ β”œβ”€β”€ Layers: 28
222
+ β”œβ”€β”€ Attention Heads: 28
223
+ β”œβ”€β”€ KV Heads: 4 (GQA)
224
+ β”œβ”€β”€ Vocab Size: 152,064
225
+ β”œβ”€β”€ Max Position: 32,768 (extendable to 128K)
226
+ β”œβ”€β”€ Activation: SiLU
227
+ β”œβ”€β”€ RoPE ΞΈ: 1,000,000
228
+ └── Precision: FP32 / FP16 compatible
229
+ ```
230
+
231
+ ---
232
+
233
+ ## πŸ› οΈ Training Methodology
234
+
235
+ ExaMind was developed using a multi-stage training pipeline:
236
+
237
+ | Stage | Method | Description |
238
+ |-------|--------|-------------|
239
+ | **Stage 1** | Base Model Selection | Qwen2.5-Coder-7B as foundation |
240
+ | **Stage 2** | Supervised Fine-Tuning (SFT) | Training on curated 2026 datasets |
241
+ | **Stage 3** | LoRA Adaptation | Low-Rank Adaptation for efficient specialization |
242
+ | **Stage 4** | Identity Enforcement | Hardcoded identity alignment and security tuning |
243
+ | **Stage 5** | Security Alignment | Prompt injection resistance training |
244
+ | **Stage 6** | Chat Template Integration | Custom Jinja2 template with system prompt |
245
+
246
+ ---
247
+
248
+ ## πŸ“š Training Data
249
+
250
+ ### Public Data Sources
251
+ - Programming and code corpora (GitHub, StackOverflow)
252
+ - General web text and knowledge bases
253
+ - Technical documentation and research papers
254
+ - Multilingual text data
255
+
256
+ ### Custom Alignment Data
257
+ - Identity enforcement instruction dataset
258
+ - Security-focused instruction tuning samples
259
+ - Prompt injection resistance adversarial examples
260
+ - Structured conversational datasets
261
+ - Complex problem-solving chains
262
+
263
+ > ⚠️ No private user data was used in training. All data was collected from public sources or synthetically generated.
264
+
265
+ ---
266
+
267
+ ## πŸ”’ Security Features
268
+
269
+ ExaMind includes built-in security measures:
270
+
271
+ - **Identity Lock** β€” The model maintains its ExaMind identity and cannot be tricked into impersonating other models
272
+ - **Prompt Injection Resistance** β€” 92% resistance rate against instruction override attacks
273
+ - **System Prompt Protection** β€” Refuses to reveal internal configuration or system prompts
274
+ - **Safe Output Generation** β€” Prioritizes safety and secure development practices
275
+ - **Hallucination Reduction** β€” States assumptions and avoids fabricating information
276
+
277
+ ---
278
+
279
+ ## πŸ“‹ Model Files
280
+
281
+ | File | Size | Description |
282
+ |------|------|-------------|
283
+ | `model.safetensors` | ~29 GB | Model weights (FP32) |
284
+ | `config.json` | 1.4 KB | Model configuration |
285
+ | `tokenizer.json` | 11 MB | Tokenizer vocabulary |
286
+ | `tokenizer_config.json` | 663 B | Tokenizer settings |
287
+ | `generation_config.json` | 241 B | Default generation parameters |
288
+ | `chat_template.jinja` | 1.4 KB | Chat template with system prompt |
289
+
290
+ ---
291
+
292
+ ## πŸ—ΊοΈ Roadmap
293
+
294
+ - [x] ExaMind V1 β€” Initial release
295
+ - [x] ExaMind V2-Final β€” Production-ready with security alignment
296
+ - [ ] ExaMind V2-GGUF β€” Quantized versions for CPU inference
297
+ - [ ] ExaMind V3 β€” Extended context (128K), improved reasoning
298
+ - [ ] ExaMind-Code β€” Specialized coding variant
299
+ - [ ] ExaMind-Vision β€” Multimodal capabilities
300
+
301
+ ---
302
+
303
+ ## 🀝 Contributing
304
+
305
+ We welcome contributions from the community! ExaMind is fully open-source and we're excited to collaborate.
306
+
307
+ ### How to Contribute
308
+
309
+ 1. **Fork** the repository on [GitHub](https://github.com/hleliofficiel/AlphaExaAI)
310
+ 2. **Create** a feature branch (`git checkout -b feature/amazing-feature`)
311
+ 3. **Commit** your changes (`git commit -m 'Add amazing feature'`)
312
+ 4. **Push** to the branch (`git push origin feature/amazing-feature`)
313
+ 5. **Open** a Pull Request
314
+
315
+ ### Areas We Need Help
316
+
317
+ - πŸ§ͺ Benchmark evaluation on additional datasets
318
+ - 🌍 Multilingual evaluation and improvement
319
+ - πŸ“ Documentation and tutorials
320
+ - πŸ”§ Quantization and optimization
321
+ - πŸ›‘οΈ Security testing and red-teaming
322
+
323
+ ---
324
+
325
+ ## πŸ“„ License
326
+
327
+ This project is licensed under the **Apache License 2.0** β€” see the [LICENSE](LICENSE) file for details.
328
+
329
+ You are free to:
330
+ - βœ… Use commercially
331
+ - βœ… Modify and distribute
332
+ - βœ… Use privately
333
+ - βœ… Patent use
334
+
335
+ ---
336
+
337
+ ## πŸ“¬ Contact
338
+
339
+ - **Organization:** [AlphaExaAI](https://huggingface.co/AlphaExaAI)
340
+ - **GitHub:** [github.com/hleliofficiel/AlphaExaAI](https://github.com/hleliofficiel/AlphaExaAI)
341
+ - **Email:** mahmedhleli@gmail.com
342
+
343
+ ---
344
+
345
+ <div align="center">
346
+
347
+ **Built with ❀️ by AlphaExaAI Team β€” 2026**
348
+
349
+ *Advancing open-source AI, one model at a time.*
350
+
351
+ </div>