---
license: apache-2.0
language:
- en
tags:
- neuralai
- mamba
- ssm
- state-space-model
- causal-lm
- mambapy
- fine-tuned
- text-generation
- local-ai
- assistant
pipeline_tag: text-generation
base_model: state-spaces/mamba-130m-hf
---
๐งฌ NeuralAI โ Mamba K1
NeuralAI's first owned base model.
A Mamba state-space language model fine-tuned for assistant-style chat, reasoning, code, and safe conversation.
---
## ๐ Quick facts
| Property | Value |
| --- | --- |
| **Architecture** | Mamba SSM โ `model_type: mamba` |
| **Class** | `MambaForCausalLM` |
| **Parameters** | ~130M (hidden size 768, 24 layers) |
| **State size** | 16 |
| **Vocabulary** | 50,280 |
| **Base model** | `state-spaces/mamba-130m-hf` |
| **Fine-tune method** | LoRA SFT, vocabulary-safe chat format |
| **LoRA config** | rank 16, alpha 32 (iterative v2/v3) |
| **Dataset** | NeuralAI seed set โ assistant conversations spanning reasoning, code, math, writing, safety, and creative prompts |
| **Training runtime** | CPU/GPU SFT loops; iterative GGUF merge + quantization |
| **Formats in this repo** | Merged `safetensors` ยท Q4_K_M GGUF ยท F16 GGUF |
| **Status** | ๐ฌ R&D / chat-format repair for future release |
| **License** | Apache 2.0 |
---
## ๐งฌ What is Mamba K1?
**Mamba K1** is the first model NeuralAI owns end-to-end. Unlike adapters on a third-party transformer, this model starts from a base Mamba SSM architecture and is trained, merged, and quantized into a self-contained artifact.
Mamba SSMs replace quadratic self-attention with a linear, state-space recurrence. That makes them fast at long context and cheap to serve โ ideal for a local-first assistant that runs on modest hardware.
### Architecture highlights
- **Linear complexity** โ \(O(n)\) sequence scaling instead of \(O(n^2)\) attention
- **Long context friendly** โ state dimension is small and recurrent; context length grows efficiently
- **Pure-Python reference kernels** โ uses `mambapy` so the model loads without custom CUDA
- **Reasonable footprint** โ 130M params fits on CPU, edge devices, and budget GPUs
### NeuralAI model family
| Model | Architecture | Parameters | Role | Status |
|-------|-------------|------------|------|--------|
| **๐งฌ Mamba K1** | Mamba SSM | 130M | NeuralAI's first owned base | ๐ฌ R&D |
| **๐ง NeuralAI Powered by SmolLM2โ360M** | Transformer + LoRA | 360M | Live chat backend | โก Active |
---
## ๐ง What K1 learned in training
The SFT curriculum taught the model to behave like an assistant across a deliberately small but diverse seed set:
- **Reasoning** โ step-by-step breakdowns of classic puzzles, logic traps, and estimations
- **Code** โ Python/JS/Go/Rust/SQL patterns plus debugging and refactoring guidance
- **Math** โ algebra, combinatorics, probability
- **Writing** โ drafts, haiku, product announcements, tone matching
- **Safety** โ refusals and redirection for harmful requests, crisis resources, and age-inappropriate prompts
- **NeuralAI identity** โ anchoring to the NeuralAI project, its creator, and local-first mission
> โ ๏ธ **Scale note:** 130M parameters is a research-capability checkpoint, not yet frontier-grade. K1 is the starting point for a fully owned NeuralAI model lineage.
---
## ๐๏ธ Training summary
| Phase | Detail |
|-------|--------|
| **Data** | Curated assistant seed set (reasoning, code, math, writing, safety, creative) |
| **Objective** | SFT on assistant-style completions |
| **Method** | LoRA SFT โ merge โ GGUF quantization |
| **Chat format** | NeuralAI "intel" format โ uses only tokens present in the GPT-NeoX tokenizer (`<|endoftext|>`) |
| **Final train loss (checkpoint)** | 11.69 (down from ~13.5) |
| **Output formats** | Merged safetensors, Q4_K_M GGUF, F16 GGUF |
Full training logs, merge scripts, and the iteration runbook live in the main [NeuralAI repository](https://github.com/Subject-Emu-5259/NeuralAI).
---
## ๐ ๏ธ Usage
### Load from Hugging Face โ merged weights
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model = AutoModelForCausalLM.from_pretrained(
"Subject-Emu-5259/NeuralAI-Mamba-K1",
torch_dtype=torch.float32,
trust_remote_code=True,
)
tokenizer = AutoTokenizer.from_pretrained(
"Subject-Emu-5259/NeuralAI-Mamba-K1",
trust_remote_code=True,
)
messages = [{"role": "user", "content": "Write a haiku about debugging."}]
inputs = tokenizer.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_tensors="pt",
)
out = model.generate(**inputs, max_new_tokens=128)
print(tokenizer.decode(out[0][inputs.shape[1]:], skip_special_tokens=True))
```
### Serve locally with llama.cpp
Use the Q4_K_M or F16 GGUF in this repo:
```bash
./llama-server \
--model neuralai-mamba-k1-v3.Q4_K_M.gguf \
--chat-format neuralai-intel \
--port 1234
```
The NeuralAI model manager can point a local llama.cpp backend at this GGUF when K1 becomes the active inference target.
---
## ๐งฐ What Is NeuralAI?
**NeuralAI** is a local-first, private generative AI engine built by **De'Andrew Preston Harris**. It is the central intelligence layer of an ecosystem that includes:
- **NeuralAI Web UI** โ chat, live terminal, file IDE, slash tools, and settings in one workspace
- **NeuralLabs** โ a standalone downloadable intelligence environment
- **NeuralDrive** โ private cloud storage and versioning
- **Agentic Orchestrator** โ goal-driven manager/worker execution
The mission is simple: *your AI, on your hardware, under your control*.
---
## ๐ค Who Created NeuralAI?
- **Founder & Lead Architect:** De'Andrew Preston Harris (D. Harris / Dre)
- **GitHub:** [@Subject-Emu-5259](https://github.com/Subject-Emu-5259)
- **LinkedIn:** [linkedin.com/in/deandrewharris94](https://linkedin.com/in/deandrewharris94/)
- **Location:** Memphis, Tennessee / West Memphis, Arkansas
- **Education:** AI Software Engineering at Maestro College
NeuralAI was built from resilience, fatherhood, and the belief that personal computing deserves personal intelligence. Every release is handcrafted, iterated, and documented in the open.
---
## ๐ข About NeuralAI (The Project)
| | |
|---|---|
| **Project / Brand** | NeuralAI |
| **Motto** | *Your AI. On your hardware. In your browser.* |
| **Values** | Privacy, ownership, local-first computing, disciplined iteration, open weights |
| **Primary Repository** | [github.com/Subject-Emu-5259/NeuralAI](https://github.com/Subject-Emu-5259/NeuralAI) |
| **Model Collection** | [huggingface.co/Subject-Emu-5259](https://huggingface.co/Subject-Emu-5259) |
| **License** | Apache 2.0 |
NeuralAI is not a closed SaaS product. It is a living open-weights research project becoming a sustainable AI software company built by one determined builder and the community around him.
---
## โ ๏ธ Limitations
- **Scale:** 130M parameters is early-stage; long-form reasoning, coding, and deep recall are limited.
- **Chat format sensitivity:** Use the NeuralAI "intel" format; other templates may produce token soup because the tokenizer lacks common chat special tokens.
- **Training maturity:** Chat coherence training is ongoing; expect looping, echoing, or drift on longer contexts.
- **No internet:** The model has no live web access unless paired with NeuralAI's tool layer.
---
## ๐ NeuralAI Powered by SmolLM2 โ the active chat model
Right now NeuralAI's live chat backend is the awareness-tuned **SmolLM2-360M** model. While K1 matures, that model handles everyday assistant tasks:
- **Repo:** [huggingface.co/Subject-Emu-5259/NeuralAI-Powered-By-SmolLM2360](https://huggingface.co/Subject-Emu-5259/NeuralAI-Powered-By-SmolLM2360)
---
## ๐ Related Resources
| Resource | Link |
|----------|------|
| Main repository | [github.com/Subject-Emu-5259/NeuralAI](https://github.com/Subject-Emu-5259/NeuralAI) |
| Active chat model | [huggingface.co/Subject-Emu-5259/NeuralAI-Powered-By-SmolLM2360](https://huggingface.co/Subject-Emu-5259/NeuralAI-Powered-By-SmolLM2360) |
| Creator LinkedIn | [linkedin.com/in/deandrewharris94](https://linkedin.com/in/deandrewharris94/) |
---
## ๐ Citation
```bibtex
@software{neuralai_mamba_k1_2026,
author = {Harris, De'Andrew Preston},
title = {NeuralAI โ Mamba K1},
year = {2026},
url = {https://huggingface.co/Subject-Emu-5259/NeuralAI-Mamba-K1},
version = {v3},
description = {NeuralAI's first owned Mamba SSM base model (130M) for local-first AI research}
}
```
---
*Built with discipline by De'Andrew Preston Harris. Maintained in the open. Updated whenever the model, dataset, or project state changes.*