Subject-Emu-5259 commited on
Commit
67c0b9e
·
verified ·
1 Parent(s): 1b5005b

Sync model card (README.md)

Browse files
Files changed (1) hide show
  1. README.md +79 -256
README.md CHANGED
@@ -1,273 +1,96 @@
1
  ---
2
- language:
3
- - en
4
  library_name: peft
 
 
5
  license: apache-2.0
 
 
6
  tags:
7
- - lora
8
- - conversational
9
- - text-generation
10
- - peft
11
- - smollm2
12
- - dpo
13
- - fine-tuned
14
- model_id: Subject-Emu-5259/NeuralAI
15
- base_model: HuggingFaceTB/SmolLM2-360M-Instruct
16
- inference: false
17
- ---
18
-
19
- # 🧠 NeuralAI: The Generative AI Engine
20
-
21
- <img src="neuralai_banner.svg" alt="NeuralAI - Your AI. On your hardware. In your browser." />
22
-
23
- ## 📊 Repository Composition
24
-
25
- | Language | Percentage |
26
- | --- | --- |
27
- | Python | 71.1% |
28
- | HTML | 13.0% |
29
- | JavaScript | 12.4% |
30
- | CSS | 2.6% |
31
- | Shell | 0.4% |
32
- | Jupyter Notebook | 0.3% |
33
- | Jinja | 0.2% |
34
-
35
- **The High-Velocity Model for Your Entire Vibe Stack**
36
-
37
- NeuralAI is the central intelligence engine developed by **De'Andrew Preston Harris**. Conceived and engineered by **De'Andrew Preston Harris** (Founder), it is a highly tuned, DPO-aligned multimodal AI ec\[...\]
38
-
39
- ---
40
-
41
- ## 🌟 Vision & Manifesto
42
-
43
- NeuralAI doesn't just predict text; it *operates the work*. The core mission is to create a multimodal generative system that bridges the gap between raw idea and execution. By fusing autoregressi\[...\]
44
-
45
- Born from resilience and ambition in Memphis, Tennessee and West Memphis, Arkansas, NeuralAI represents a forward-thinking approach to personal, private AI computing.
46
-
47
  ---
48
 
49
- ## 🛠️ Tech Stack & Architecture (v7.2)
50
 
51
- NeuralAI is built on a high-performance architecture that decouples the inference engine from the web interface, enabling lightweight cloud hosting with powerful local inference.
52
 
53
- ### Core Stack
54
 
55
- - **Core Model**: `SmolLM2-360M-Instruct` (DPO v15.0 Aligned for logic, math, multi-step reasoning, and debugging)
56
- - **Inference Engine**: [llmster](https://lmstudio.ai/docs/cli) (LM Studio headless) OpenAI-compatible API with continuous batching, running via llama.cpp
57
- - **Vocal Identity**: Andrew (Warm/Multilingual) — Optimized for Live Speech-to-Speech (S2S)
58
- - **Backend Framework**: Python / Flask (Core Service)routes to llmster or local PyTorch
59
- - **Storage & Database**: SQLite3 (Metadata) + Nextcloud Hub via NeuralCloud WebDAV Client (NeuralDrive)
60
- - **Frontend UI**: Vanilla JS, HTML5, CSS3 with an advanced Dark Mode layout
61
-
62
- ### Pluggable LLM Backend
63
-
64
- NeuralAI supports multiple inference backends via the `LLM_BACKEND` environment variable:
65
-
66
- | Backend | `LLM_BACKEND` | API Endpoint | Use Case |
67
- | --- | --- | --- | --- |
68
- | **llmster** (recommended) | `lmstudio` | `http://localhost:1234/v1` | Headless GPU/CPU inference |
69
- | **Ollama** | `ollama` | `http://localhost:11434/v1` | Local Ollama server |
70
- | **OpenAI-compatible** | `openai_compatible` | Any OpenAI API URL | Remote/cloud inference |
71
- | **Local PyTorch** | `local` | Built-in transformers | Legacy/development mode |
72
-
73
- ```bash
74
- # Example: start NeuralAI with llmster backend
75
- LLM_BACKEND=lmstudio LLM_API_URL=http://localhost:1234/v1 LLM_MODEL=smollm2 \
76
- python3 services/neural_core_service.py
77
- ```
78
 
79
- ### Core Architectural Pillars
80
-
81
- 1. **NeuralAI Core**: Handles chat state, direct model inference, terminal session proxying, and tool orchestration.
82
- 2. **NeuralDrive (Cloud Storage)**: The intelligent data layer for all projects, featuring isolated user storage, automatic versioning, and semantic mapping.
83
- 3. **Diffusion Engine**: An integrated generative diffusion layer for producing visual branding assets, UI mockups, and visual logic maps.
84
- 4. **Agentic Orchestrator**: A high-autonomy layer enabling NeuralAI to plan, reason, and execute multi-step workflows across the OS and web, moving beyond simple chat to active goal achievement.
85
-
86
- ---
87
- ### 🆕 What's New (v7.3.0)
88
-
89
- - **Auto Release Notes ("What's New")**: A new top-bar panel surfaces the latest features and fixes automatically. Open it anytime via the ✨ **What's New** button.
90
- - **Generated images render in chat**: Image-generation responses are parsed as Markdown and displayed inline.
91
- - **No more self-talk**: Chat now uses the ChatML prompt template (`apply_chat_template`), matching the model's training format.
92
- - **NeuralDrive upload reliability**: The file list correctly handles API response shapes after an upload.
93
- - **Dark theme by default**: UI restores your saved theme and defaults to dark mode (fixes white file-cards in light mode).
94
- - **Phase 8 in progress**: Knowledge Graph & Agentic Autonomy — long-term cross-project memory ("Supermemory") and fully autonomous task execution.
95
- - **The NeuralLabs Shift**: NeuralAI is evolving into a standalone, downloadable intelligence environment (NeuralLabs v1 Client → v2 Edge → v3 Eco).
96
- ## ✨ Key Features & Capabilities
97
-
98
- ### 💬 Multimodal Chat & Agentic Intelligence
99
-
100
- - **High-Velocity Text Inference**: Fast, local inference with deep context awareness.
101
- - **Deep Reasoning Mode**: Integration of test-time compute and chain-of-thought reasoning for complex problem decomposition and error-free logic.
102
- - **Autonomous Agentic Workflows**: Ability to operate as an agent—interacting with the browser, terminal, and third-party apps to complete end-to-end tasks with minimal supervision.
103
- - **Live S2S (Speech-to-Speech)**: Real-time voice interaction with an integrated microphone interface and fluid vocal responses.
104
- - **Identity Vault & Memory**: Persistent user memory and rule constraints, ensuring NeuralAI remembers preferences, behavioral rules, and historical context.
105
-
106
- ### 💻 Developer & Engineering Tools
107
-
108
- - **Integrated Web Terminal**: A fully functional, WebSocket-driven terminal embedded directly in the web UI for immediate environment control.
109
- - **File Workspace**: An in-browser IDE experience allowing users to browse directories, read, and write code seamlessly.
110
- - **Code Execution & Sandbox**: Secure environment for the model to execute and test code on the fly.
111
-
112
- ### 🔐 Authentication & Access Tiers
113
-
114
- - **Founder Mode**: Ultimate root-level access and system control.
115
- - **Maestro Student Portal**: Tiered access for educational and collaborative development.
116
- - **Guest Preview**: Frictionless instant access for testing the system without an account.
117
-
118
- ---
119
-
120
- ## 🏋️ Model Training & Fine-Tuning (DPO)
121
-
122
- NeuralAI is continuously learning and improving through rigorous **Direct Preference Optimization (DPO)**.
123
-
124
- ### Training Pipeline
125
 
126
  ```python
127
- # Example of the DPO alignment configuration used in NeuralAI
128
- dpo_config = DPOConfig(
129
- beta=0.1,
130
- learning_rate=5e-5,
131
- per_device_train_batch_size=4,
132
- gradient_accumulation_steps=4,
133
- max_length=1024,
134
- max_prompt_length=512,
135
- )
136
- ```
137
 
138
- - **Dataset Expansions**: The dataset is aggressively expanded to include advanced reasoning, complex mathematics, logical deduction, creative writing, and system debugging.
139
- - **Behavioral Alignment**: NeuralAI is aligned using Gemini-style behavioral principles—prioritizing safety, structured reasoning, helpful conversational flow, and transparent step-by-step explanations. Training enforces clear Markdown formatting, code-first responses, and rejection of boilerplate or overly verbose outputs.
140
- - **Model Drift Monitoring**: Continuous evaluation against previous checkpoints to ensure response quality and consistency never regress.
141
-
142
- ### Latest Alignment Run: v15.0
143
-
144
- - **Training samples**: 597 (expanded DPO preference pairs)
145
- - **Epochs**: 3
146
- - **Steps**: 450
147
- - **Final training loss**: `0.305`
148
- - **Reward margin**: improved from `~0.5` → `~3.5` (model strongly prefers chosen responses)
149
- - **Hardware**: Apple Silicon MPS (MacBook Air M4)
150
- - **Run duration**: `730.5s` (~12m 11s)
151
- - **Completed**: `2026-07-11 20:00 UTC`
152
- - **Adapter**: live on Hugging Face at [`Subject-Emu-5259/NeuralAI`](https://huggingface.co/Subject-Emu-5259/NeuralAI)
153
-
154
- > The v15 dataset (`data/train_dpo_v15.jsonl`) was generated by expanding the template pools in `training/build_dataset_v15.py` from 302 → 597 unique preference pairs covering code correctness, logic, reasoning, debugging, and multi-step tasks.
155
-
156
- ---
157
 
158
- ## 📸 Brand & UI Gallery
159
-
160
- *(UI screenshots showcase the beautiful dark mode interface, the terminal integration, and the NeuralDrive file explorer.)*
161
-
162
- ```html
163
- <!-- Example Frontend UI Component Structure -->
164
- <div class="neural-chat-container">
165
- <div class="message-bubble ai-response">
166
- NeuralAI: System optimal. Ready for execution.
167
- </div>
168
- </div>
169
  ```
170
 
171
- ---
172
-
173
- ## 🗺️ Implementation Roadmap
174
-
175
- - **Phase 1: Alignment** - DPO training for Founder context and optimal engineering tone.
176
- - **Phase 2: NeuralDrive** - Deployment of the Cloud Storage File Server.
177
- - **Phase 3: Terminal UI** - Integrated command-line access within the browser.
178
- - **Phase 4: Live S2S** - High-velocity Live Speech-to-Speech conversations.
179
- - **Phase 5: "Founder Mode"** - Enhancements to vocal profile and streamlined UI.
180
- - **Phase 6: Frontend Polish** - Dark themes, real-time code execution display, UI stability.
181
- - **Phase 7: Diffusion Integration** - Implementation of Text2Img & Img2Img capabilities.
182
- - 🚀 **Phase 8: Knowledge Graph & Agentic Autonomy** - Advanced long-term memory for cross-project context, "Supermemory" features, and fully autonomous task execution.
183
-
184
- ---
185
-
186
- ## 🎯 Future Vision: The Software Transition
187
-
188
- NeuralAI is evolving from a workspace-bound assistant into a standalone, downloadable intelligence environment.
189
-
190
- **Project Code Name**: `NeuralLabs` (Working Title)
191
- **Vision**: A local-first, AI-native operating environment that integrates the Agentic Orchestrator, World-Brain, and NeuralDrive into a seamless desktop experience—similar to the "Codex" model but expanded into a full cognitive workspace.
192
-
193
- ### 🚀 Roadmap Addition: The NeuralLabs Shift
194
-
195
- - **NeuralLabs v1 (Client)**: Development of a cross-platform wrapper (Electron/Tauri) for the NeuralAI interface.
196
- - **NeuralLabs v2 (Edge)**: Local model execution (Llama/Mistral) as a fallback for the cloud-based NeuralAI core.
197
- - **NeuralLabs v3 (Eco)**: Plugin architecture allowing third-party "Neural-Skills" to be installed as standalone apps.
198
-
199
- ---
200
-
201
- ## 👨‍💻 The Developer & Architect
202
-
203
- **De'Andrew Preston Harris** (D. Harris / Dre)
204
- *Founder & Architect of NeuralAI*
205
-
206
- A dedicated software engineer, thinker, and builder from West Memphis, AR. De'Andrew is currently pursuing an AAS in AI Software Engineering at Maestro College. NeuralAI is the culmination of his\[...\]
207
-
208
- - **Location:** Memphis, TN / West Memphis, AR
209
- - **Vision:** Building the future of private, high-performance generative AI.
210
- - [LinkedIn](https://www.linkedin.com/in/deandrewharris94/) | [GitHub](https://github.com/Subject-Emu-5259)
211
-
212
- ---
213
-
214
- *Built with precision and discipline by De'Andrew Preston Harris.*
215
-
216
- ### CURRENT VERSION: v7.3.0 (The Pluggable Engine)
217
-
218
- - **Model Alignment**: DPO v15.0 Aligned (597 pairs, Logic, Debugging, Reasoning)
219
- - **Inference**: llmster (LM Studio headless) — 258MB RAM vs 5GB PyTorch
220
- - **Last Maintenance**: July 13, 2026
221
-
222
- Your tone is technical, concise, and professional. You prioritize system stability and cleanliness above all else.
223
-
224
- ---
225
-
226
- ## 🚀 Deployment
227
-
228
- NeuralAI ships with a pluggable backend that separates the web UI from the inference engine.
229
-
230
- ### Quick Start (llmster — recommended)
231
-
232
- ```bash
233
- # 1. Install llmster (one-time)
234
- curl -fsSL https://lmstudio.ai/install.sh | bash
235
- export PATH="$HOME/.lmstudio/bin:$PATH"
236
-
237
- # 2. Download model
238
- lms import /path/to/SmolLM2-360M-Instruct-Q4_K_M.gguf --user-repo "bartowski/SmolLM2-360M-Instruct-GGUF" -y
239
- lms load smollm2-360m-instruct -y --identifier smollm2
240
-
241
- # 3. Start inference server
242
- lms server start --port 1234
243
-
244
- # 4. Start NeuralAI
245
- cd NeuralAI
246
- LLM_BACKEND=lmstudio LLM_API_URL=http://localhost:1234/v1 LLM_MODEL=smollm2 \
247
- python3 services/neural_core_service.py
248
  ```
249
-
250
- ### Containerized Deployments
251
-
252
- | Deployment | Dockerfile | Stack | Status |
253
- | --- | --- | --- | --- |
254
- | **Gradio Demo** | `gradio_space/Dockerfile` | Gradio 6.x chat UI | ✅ Built & deployed |
255
- | **Flask Web Chat** | `webui_space/Dockerfile` | Flask + `neural_core_service.py` | 🚀 Ready for Railway |
256
-
257
- - **Adapter source**: [`Subject-Emu-5259/NeuralAI`](https://huggingface.co/Subject-Emu-5259/NeuralAI) — auto-pulled on startup via `snapshot_download`.
258
- - **GitHub → HF sync**: `.github/workflows/sync_to_huggingface.yml` uploads only the LoRA adapter on every push to `master`.
259
-
260
- ---
261
-
262
- # 🌌 NeuralAI Project Manifest
263
-
264
- NeuralAI is the intelligence core that powers the ecosystem.
265
-
266
- ## 🔗 Ecosystem Integration
267
- The standalone software implementation of this core is **NeuralLabs**:
268
- 👉 [https://github.com/Subject-Emu-5259/NeuralLabs](https://github.com/Subject-Emu-5259/NeuralLabs)
269
-
270
- **Software Downloads**:
271
- The latest beta builds (v0.1-Beta) of NeuralLabs are available at:
272
- 👉 **[https://zo.pub/deandrewharris/neurallabs-beta](https://zo.pub/deandrewharris/neurallabs-beta)**
273
- # NeuralAI → Hugging Face sync is live
 
1
  ---
2
+ base_model: HuggingFaceTB/SmolLM2-360M-Instruct
 
3
  library_name: peft
4
+ model_name: NeuralAI
5
+ model_type: adapter
6
  license: apache-2.0
7
+ language:
8
+ - en
9
  tags:
10
+ - text-generation
11
+ - dpo
12
+ - lora
13
+ - peft
14
+ - smollm2
15
+ - reasoning
16
+ - code-generation
17
+ - debugging
18
+ - multi-step-reasoning
19
+ - edge-ai
20
+ pipeline_tag: text-generation
21
+ inference:
22
+ parameters:
23
+ max_new_tokens: 512
24
+ temperature: 0.7
25
+ top_p: 0.95
26
+ repetition_penalty: 1.1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  ---
28
 
29
+ # NeuralAI v15.0 DPO-Aligned LoRA Adapter
30
 
31
+ NeuralAI is a DPO-aligned LoRA adapter for [SmolLM2-360M-Instruct](https://huggingface.co/HuggingFaceTB/SmolLM2-360M-Instruct), fine-tuned for expert-level reasoning, code generation, debugging, and multi-step logic tasks.
32
 
33
+ ## Highlights
34
 
35
+ - **597 DPO preference pairs** covering code correctness, logic, reasoning, debugging, and multi-step tasks
36
+ - **Reward margin**: improved from ~0.5 to ~3.5 (model strongly prefers chosen responses)
37
+ - **Final training loss**: 0.305
38
+ - **Edge-optimized**: Runs on CPU with 4GB RAM no GPU required
39
+ - **Gemini-style alignment**: Helpful, structured, conversational tone with step-by-step explanations
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
 
41
+ ## Quick start
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
 
43
  ```python
44
+ from transformers import AutoModelForCausalLM, AutoTokenizer
45
+ from peft import PeftModel
 
 
 
 
 
 
 
 
46
 
47
+ base_model = AutoModelForCausalLM.from_pretrained("HuggingFaceTB/SmolLM2-360M-Instruct")
48
+ tokenizer = AutoTokenizer.from_pretrained("HuggingFaceTB/SmolLM2-360M-Instruct")
49
+ model = PeftModel.from_pretrained(base_model, "Subject-Emu-5259/NeuralAI")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
 
51
+ messages = [{"role": "user", "content": "Write a Python function to check API health."}]
52
+ inputs = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt")
53
+ output = model.generate(inputs, max_new_tokens=256, temperature=0.7, top_p=0.95)
54
+ print(tokenizer.decode(output[0][inputs.shape[-1]:], skip_special_tokens=True))
 
 
 
 
 
 
 
55
  ```
56
 
57
+ ## Training details
58
+
59
+ | Parameter | Value |
60
+ |---|---|
61
+ | Base model | HuggingFaceTB/SmolLM2-360M-Instruct |
62
+ | Method | DPO (Direct Preference Optimization) |
63
+ | Dataset | 597 preference pairs (v15 expanded) |
64
+ | Epochs | 3 |
65
+ | Steps | 450 |
66
+ | Final loss | 0.305 |
67
+ | Reward margin | ~3.5 |
68
+ | LoRA rank | 16 |
69
+ | Hardware | Apple Silicon MPS (MacBook Air M4) |
70
+ | Duration | ~12 minutes |
71
+ | Completed | 2026-07-11 |
72
+
73
+ ## Framework versions
74
+
75
+ - PEFT: 0.17.1
76
+ - TRL: 0.24.0
77
+ - Transformers: 4.57.6
78
+ - PyTorch: 2.8.0
79
+
80
+ ## Use cases
81
+
82
+ - **Code generation and debugging**: Multi-step reasoning for code correctness
83
+ - **Logic and math**: Complex problem decomposition
84
+ - **Edge deployment**: CPU-optimized for local/private AI
85
+ - **Agentic workflows**: Tool-use and multi-step task execution
86
+
87
+ ## Citation
88
+
89
+ ```bibtex
90
+ @inproceedings{rafailov2023direct,
91
+ title = {{Direct Preference Optimization: Your Language Model is Secretly a Reward Model}},
92
+ author = {Rafael Rafailov and Archit Sharma and Eric Mitchell and Christopher D. Manning and Stefano Ermon and Chelsea Finn},
93
+ year = 2023,
94
+ booktitle = {NeurIPS 2023},
95
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
  ```