AdminReal commited on
Commit
df57a6d
·
verified ·
1 Parent(s): f99da97

Update README to match Qwen2.5-Coder based Nexus Coder

Browse files
Files changed (1) hide show
  1. README.md +48 -104
README.md CHANGED
@@ -1,134 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <div align="center">
2
 
3
  # 🧠 Nexus Coder
4
 
5
- ### AI Code & Security Engine — CyberForge Edition
6
-
7
- **An open architecture for next‑generation code generation and security analysis**
8
-
9
- [![Python](https://img.shields.io/badge/Python-3.12.13-blue.svg)](https://www.python.org/)
10
- [![PyTorch](https://img.shields.io/badge/PyTorch-2.0+-ee4c2c.svg)](https://pytorch.org/)
11
- [![License: NAL-1.0](https://img.shields.io/badge/License-NAL--1.0-orange.svg)](LICENSE)
12
- [![Status: In Development](https://img.shields.io/badge/Status-In%20Development-yellow.svg)]()
13
- [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)]()
14
- [![GitHub stars](https://img.shields.io/github/stars/mhieuhonda/NexusCoder?style=social)](https://github.com/mhieuhonda/NexusCoder)
15
- [![GitHub forks](https://img.shields.io/github/forks/mhieuhonda/NexusCoder?style=social)](https://github.com/mhieuhonda/NexusCoder)
16
- [![GitHub last commit](https://img.shields.io/github/last-commit/mhieuhonda/NexusCoder)](https://github.com/mhieuhonda/NexusCoder)
17
 
18
- **Created by [Hieu Louis](https://github.com/mhieuhonda)** · 2026
19
 
20
  </div>
21
 
22
  ## 📖 Introduction
23
 
24
- **Nexus Coder** is an open‑source AI architecture, designed from the ground up by **Hieu Louis**, focused on two core capabilities:
25
-
26
- - **High‑quality code generation** powered by a large‑scale Mixture‑of‑Experts (MoE) Transformer.
27
- - **Deep security analysis** for source code and systems.
28
-
29
- The project is under **active development**. This repository provides:
30
 
31
- - The complete **model architecture source code** (Python/PyTorch).
32
- - A **data collection and processing pipeline** for code from multiple sources.
33
- - A **multi‑stage training framework** designed to scale.
34
- - **60+ skills** and **80+ tools** with automatic registration.
35
- - Configurations ranging from `tiny` (5M) to `423b` (423B parameters).
36
 
37
- > **Important:** The model is **not pretrained** yet. We distribute only the architecture source and training pipeline. Users need to train their own models on their own data, in compliance with the NAL‑1.0 license.
38
 
39
- ## 📊 Key Technical Specifications
40
 
41
- | Item | Value |
42
- |------|-------|
43
- | Total parameters | ~423B |
44
- | Active parameters per token | ~39B |
45
- | Context window | 3,000,000 tokens (3M) |
46
- | Architecture | MoE Transformer (GQA + RoPE/YaRN + RMSNorm + SwiGLU + FlashAttention‑2 + Sliding Window + QK‑norm + KV cache quantization + MLP‑parallel + Gradient checkpointing) |
47
- | Skills | 60+ (code, devops, ML, data, security, cloud, system, blockchain, language) |
48
- | Tools | 80+ (file, exec, web, code analysis, database, devops, crypto, math, network) |
49
- | Data sources | 8+ (GitHub curated corpus, HuggingFace, arXiv, Wikipedia, StackOverflow, The‑Stack v2, StarCoder2‑data, Python‑Alpaca) |
50
- | Python version | 3.12.13 (strict) |
51
 
52
- ## 🚀 Quick Install
 
 
53
 
54
- ```bash
55
- git clone https://github.com/mhieuhonda/NexusCoder.git
56
- cd NexusCoder
57
- python3.12.13 -m venv venv
58
- source venv/bin/activate
59
- pip install -r requirements.txt
60
- # or: pip install -e ".[all]"
61
  ```
62
 
63
- 💻 Usage
64
 
65
  ```bash
66
- # Print configuration summary
67
- python -c "from nexus.config import print_config_summary; print_config_summary()"
68
-
69
- # Tiny demo (CPU)
70
- python scripts/train.py --config tiny --steps 100
71
-
72
- # Train larger configurations (requires GPU)
73
- python scripts/train.py --config large --steps 5000 --use-amp
74
- python scripts/train.py --config 423b --steps 50000 --use-amp --deepspeed
75
  ```
76
 
77
- 📁 Project Structure
78
-
79
- ```
80
- NexusCoder/
81
- ├── nexus/ # Main package
82
- │ ├── model/ # MoE Transformer (attention, MoE, layers, ...)
83
- │ ├── tokenizer/
84
- │ ├── training/ # Trainer + Dataset
85
- │ ├── inference/
86
- │ ├── agent/ # Planner, Router, Memory, Safety
87
- │ ├── skills/ # 60+ skills (auto‑discovery)
88
- │ ├── tools/ # 80+ tools (auto‑discovery)
89
- │ ├── data/ # Collectors + Processors
90
- │ ├── optim/ # Quantize, LoRA, Distill, Prune
91
- │ ├── safety/ # Filters, Guardrails
92
- │ ├── eval/ # Benchmarks, Metrics
93
- │ ├── integrations/ # litgpt, LlamaFactory, axolotl, OpenHands, omp‑gym
94
- │ └── utils/
95
- ├── configs/ # YAML configs (tiny → 423B)
96
- ├── scripts/ # CLI scripts
97
- ├── docs/ # ARCHITECTURE, TRAINING, SKILLS, TOOLS, DATA
98
- ├── tests/
99
- ├── ATTRIBUTIONS.md
100
- ├── CHANGELOG.md
101
- ├── LICENSE # NAL‑1.0 (Attribution Required)
102
- ├── requirements.txt
103
- ├── pyproject.toml
104
- ├── setup.py
105
- └── README.md
106
- ```
107
 
108
- ⚖️ License
 
 
 
 
 
109
 
110
- Released under the NexusCoder Attribution License v1.0 (NAL‑1.0).
111
 
112
- · You may use, modify, distribute, and train models for any purpose.
113
- · Attribution is required to the original author: Hieu Louis (github.com/mhieuhonda).
114
- · No warranty. See LICENSE for details.
115
 
116
- 👤 Author
 
117
 
118
- <div align="center">
119
 
120
  Hieu Louis · 2026
121
 
122
- · GitHub: @mhieuhonda
123
- · Project: NexusCoder
124
- · License: NAL‑1.0 (Attribution Required)
125
-
126
- </div>
127
-
128
- <div align="center">
129
-
130
- Nexus Coder — CyberForge Edition
131
-
132
- Made by Hieu Louis · 2026
133
-
134
- </div>
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: Qwen/Qwen2.5-Coder-1.5B-Instruct
4
+ tags:
5
+ - qwen2
6
+ - coder
7
+ - code
8
+ - agent
9
+ - transformers
10
+ - text-generation
11
+ pipeline_tag: text-generation
12
+ library_name: transformers
13
+ ---
14
+
15
  <div align="center">
16
 
17
  # 🧠 Nexus Coder
18
 
19
+ ### AI Code & Security Engine — Qwen2.5-Coder based
 
 
 
 
 
 
 
 
 
 
 
20
 
21
+ **A deployable coding model: Qwen2.5-Coder-1.5B weights + Nexus Coder agent engine (skills & tools)**
22
 
23
  </div>
24
 
25
  ## 📖 Introduction
26
 
27
+ **Nexus Coder** is a working AI model combining:
 
 
 
 
 
28
 
29
+ - **Model weights:** [Qwen2.5-Coder-1.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-Coder-1.5B-Instruct) (Apache 2.0) — a strong 1.5B coding model.
30
+ - **Agent engine:** the Nexus Coder framework (`nexus/`) — 60+ skills and 80+ tools with automatic registration, agent planner/router/memory/safety, data pipeline, and training utilities.
 
 
 
31
 
32
+ ## 🚀 Quick Usage
33
 
34
+ The model is a standard `Qwen2ForCausalLM`. Load it with `transformers`:
35
 
36
+ ```python
37
+ from transformers import AutoModelForCausalLM, AutoTokenizer
 
 
 
 
 
 
 
 
38
 
39
+ model_id = "AdminReal/NexusCoder"
40
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
41
+ model = AutoModelForCausalLM.from_pretrained(model_id)
42
 
43
+ messages = [{"role": "system", "content": "You are Nexus Coder, a helpful coding assistant."},
44
+ {"role": "user", "content": "Write a Python function to compute fibonacci."}]
45
+ text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
46
+ inputs = tokenizer([text], return_tensors="pt")
47
+ out = model.generate(**inputs, max_new_tokens=512)
48
+ print(tokenizer.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
 
49
  ```
50
 
51
+ CLI chat demo (from source):
52
 
53
  ```bash
54
+ python scripts/chat.py --model AdminReal/NexusCoder
 
 
 
 
 
 
 
 
55
  ```
56
 
57
+ ## 📁 Repository Contents
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
 
59
+ | Part | What it is | License |
60
+ |------|-----------|---------|
61
+ | `model.safetensors`, `config.json`, `tokenizer.*` | Qwen2.5-Coder-1.5B-Instruct weights | Apache 2.0 |
62
+ | `nexus/` | Agent engine source (skills, tools, agent, data, optim) | NAL-1.0 |
63
+ | `configs/` | Experimental architecture designs (`tiny` → `423b`) — **not** the hosted model | NAL-1.0 |
64
+ | `docs/`, `scripts/`, `tests/` | Documentation, CLI scripts, tests | NAL-1.0 |
65
 
66
+ > The `configs/nexus_coder_*.yaml` files describe a from-scratch MoE research architecture and are **independent** from the Qwen2-based weights hosted in this repo.
67
 
68
+ ## ⚖️ Licenses
 
 
69
 
70
+ - **Model weights:** Apache 2.0 (from Qwen/Qwen2.5-Coder-1.5B-Instruct). See `LICENSE`.
71
+ - **Source code (nexus engine):** NexusCoder Attribution License v1.0 (NAL-1.0). Attribution required to Hieu Louis (github.com/mhieuhonda).
72
 
73
+ ## 👤 Author
74
 
75
  Hieu Louis · 2026
76
 
77
+ - GitHub: @mhieuhonda
78
+ - Project: NexusCoder