qwen2
File size: 3,654 Bytes
5e7ce6a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# ExocoreV1

A from-scratch AI system built around **ExocoreV1** β€” a powerful 751M-parameter language model, fully rebranded and independent of any third-party naming.

**HuggingFace:** https://huggingface.co/Exocore/ExocoreV1

## Project Overview

ExocoreV1 is a full-stack AI chat and training platform:

- **Chat interface** β€” Talk to ExocoreV1 with Fast, Thinking, and Deep Think modes
- **Research tools** β€” Web search (DuckDuckGo) + multi-URL reader integrated into the chat pipeline
- **Training page** β€” Train new models from text, with live Chart.js loss curve and architecture tree visualization
- **Auto-train** β€” Gemini-powered automatic data generation + training
- **Auto-load** β€” Exocore.pt loads automatically on startup (no button click needed)

## Architecture

- **Backend**: Python + Flask (`main.py`)
- **Model engine**: `exocore_model.py` β€” ExocoreLM (28-layer transformer, 751M params, GQA, RoPE, SwiGLU)
- **Training**: `trainer.py` β€” MiniGPT character-level trainer + ExocoreV1 inference
- **Gemini client**: `gemini_client.py`
- **Templates**: `templates/index.html`, `templates/train.html`

## Key Files

| File | Purpose |
|------|---------|
| `main.py` | Flask server, all API routes |
| `exocore_model.py` | ExocoreLM architecture (Qwen3-compatible, ExocoreV1 branded) |
| `trainer.py` | Training loop + MiniGPT + ExocoreV1 inference |
| `gemini_client.py` | Gemini API integration |
| `models/trained/Exocore.pt` | ExocoreV1 model weights (751M params, PROTECTED) |

## ExocoreV1 Model Architecture

| Component | Value |
|-----------|-------|
| Parameters | 751.6M |
| Layers | 28 |
| Hidden size | 1024 |
| Attention heads | 16Q / 8 KV |
| Head dim | 128 |
| FFN intermediate | 3072 (SwiGLU) |
| Vocab size | 151,936 |
| Max context | 40,960 tokens |
| RoPE theta | 1,000,000 |
| Precision | bfloat16 |

## API Endpoints

| Endpoint | Method | Description |
|----------|--------|-------------|
| `/api/models` | GET | List all available models |
| `/api/load` | POST | Load a model |
| `/api/chat` | POST | Stream chat (SSE) |
| `/api/clear` | POST | Clear chat history |
| `/api/status` | GET | Server/model status |
| `/api/autoload-status` | GET | Auto-load progress |
| `/api/model-details` | GET | Current model architecture info |
| `/api/search` | POST | DuckDuckGo web search |
| `/api/read-link` | POST | Fetch and parse URL content (multi-link) |
| `/api/train/start` | POST | Start training |
| `/api/train/status` | GET | Training status + loss history |
| `/api/train/stop` | POST | Stop training |
| `/api/train/models` | GET | List trained models |
| `/api/train/model-info/<name>` | GET | Model architecture info |
| `/api/gemini/*` | POST/GET | Gemini integration |

## Chat Modes

| Mode | Description |
|------|-------------|
| Fast | Direct answer, no thinking |
| Thinking | Single-pass reasoning before answering |
| Deep Think | Two-pass multi-step reasoning (Pass 1 + Pass 2 think blocks) |

## Research Features

- **Web search**: DuckDuckGo HTML scraping, returns title + snippet + URL
- **Read Page**: Fetches any URL, strips nav/scripts, returns clean text (up to 4000 chars)
- **Multi-link reading**: Read up to 4 URLs simultaneously and merge into research context
- **Context injection**: Research context is automatically injected into the model prompt

## User Preferences

- No system prompt exposed in UI β€” ExocoreV1 identity is baked into the model prompt automatically
- Exocore.pt is permanently protected from deletion
- No "qwen" branding anywhere in the UI or code
- Model auto-loads on startup
- No system prompt field in UI β€” identity lives inside the model