Text Generation
Transformers
Safetensors
English
llama
small-language-model
slm
from-scratch
tiny
nexus-erebus
arithmetic
text-generation-inference
Instructions to use MaliosDark/Nexus-Erebus-3M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MaliosDark/Nexus-Erebus-3M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MaliosDark/Nexus-Erebus-3M", device_map="auto")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("MaliosDark/Nexus-Erebus-3M") model = AutoModelForCausalLM.from_pretrained("MaliosDark/Nexus-Erebus-3M", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use MaliosDark/Nexus-Erebus-3M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MaliosDark/Nexus-Erebus-3M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MaliosDark/Nexus-Erebus-3M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/MaliosDark/Nexus-Erebus-3M
- SGLang
How to use MaliosDark/Nexus-Erebus-3M with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "MaliosDark/Nexus-Erebus-3M" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MaliosDark/Nexus-Erebus-3M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "MaliosDark/Nexus-Erebus-3M" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MaliosDark/Nexus-Erebus-3M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use MaliosDark/Nexus-Erebus-3M with Docker Model Runner:
docker model run hf.co/MaliosDark/Nexus-Erebus-3M
Neutral card: no attribution, no comparisons, no top claims
Browse files
README.md
CHANGED
|
@@ -11,24 +11,21 @@ tags:
|
|
| 11 |
- tiny
|
| 12 |
- nexus-erebus
|
| 13 |
- arithmetic
|
| 14 |
-
- specialist
|
| 15 |
---
|
| 16 |
|
| 17 |

|
| 18 |
|
| 19 |
# Nexus-Erebus-3M
|
| 20 |
|
| 21 |
-
A **3-million-parameter** language model trained from scratch
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
the previous best tiny model, Atom 2.7M (69.40%), on that task. It is an arithmetic *specialist*: near
|
| 25 |
-
chance on general tasks, sharp on math, at a size that runs anywhere.
|
| 26 |
|
| 27 |
## How it works
|
| 28 |
|
| 29 |
-
The model reads and writes numbers **least-significant-digit first**
|
| 30 |
-
|
| 31 |
-
|
| 32 |
`trust_remote_code=True`.
|
| 33 |
|
| 34 |
```python
|
|
@@ -39,22 +36,18 @@ model = AutoModelForCausalLM.from_pretrained("MaliosDark/Nexus-Erebus-3M")
|
|
| 39 |
|
| 40 |
## Results
|
| 41 |
|
| 42 |
-
|
| 43 |
-
Weighting follows the Open SLM Leaderboard (HellaSwag 25%, PIQA 25%, ArithMark-2 25%, ARC-Easy 12.5%,
|
| 44 |
-
ARC-Challenge 12.5%).
|
| 45 |
|
| 46 |
-
| Task |
|
| 47 |
-
|---|---:|
|
| 48 |
-
|
|
| 49 |
-
| PIQA | 51.41 |
|
| 50 |
-
| HellaSwag | 26.59 |
|
| 51 |
-
| ARC-Easy | 27.02 |
|
| 52 |
-
| ARC-Challenge | 20.65 |
|
| 53 |
-
| **Weighted average** | 43.14 | 43.95 |
|
| 54 |
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
near chance, which is expected at this size.
|
| 58 |
|
| 59 |
## Reproduce the ArithMark-2 score
|
| 60 |
|
|
@@ -64,12 +57,12 @@ python benchmark_nexus_arithmark.py MaliosDark/Nexus-Erebus-3M
|
|
| 64 |
|
| 65 |
## Training
|
| 66 |
|
| 67 |
-
Pretrained from scratch with a digit-atomic 4k tokenizer,
|
| 68 |
-
**freshly generated** synthetic integer arithmetic
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
|
| 74 |
## Limitations
|
| 75 |
|
|
@@ -78,6 +71,4 @@ is what stops the model from memorising instead of learning.
|
|
| 78 |
|
| 79 |
## License
|
| 80 |
|
| 81 |
-
MIT.
|
| 82 |
-
|
| 83 |
-
Built by MaliosDark.
|
|
|
|
| 11 |
- tiny
|
| 12 |
- nexus-erebus
|
| 13 |
- arithmetic
|
|
|
|
| 14 |
---
|
| 15 |
|
| 16 |

|
| 17 |
|
| 18 |
# Nexus-Erebus-3M
|
| 19 |
|
| 20 |
+
A **3-million-parameter** language model trained from scratch. It is an arithmetic specialist: it
|
| 21 |
+
handles integer arithmetic well for its size, and stays near chance on general tasks, at a footprint
|
| 22 |
+
that runs almost anywhere.
|
|
|
|
|
|
|
| 23 |
|
| 24 |
## How it works
|
| 25 |
|
| 26 |
+
The model reads and writes numbers **least-significant-digit first**, with a digit-atomic tokenizer.
|
| 27 |
+
Aligning carry propagation with reading order is what lets a model this small do arithmetic. The digit
|
| 28 |
+
reversal happens inside the tokenizer, so you pass and receive normal text. This requires
|
| 29 |
`trust_remote_code=True`.
|
| 30 |
|
| 31 |
```python
|
|
|
|
| 36 |
|
| 37 |
## Results
|
| 38 |
|
| 39 |
+
Full test sets, 0-shot. `acc_norm` for multiple choice, accuracy for ArithMark-2.
|
|
|
|
|
|
|
| 40 |
|
| 41 |
+
| Task | Score |
|
| 42 |
+
|---|---:|
|
| 43 |
+
| ArithMark-2 | 70.72 |
|
| 44 |
+
| PIQA | 51.41 |
|
| 45 |
+
| HellaSwag | 26.59 |
|
| 46 |
+
| ARC-Easy | 27.02 |
|
| 47 |
+
| ARC-Challenge | 20.65 |
|
|
|
|
| 48 |
|
| 49 |
+
The model is built for integer arithmetic. Non-arithmetic tasks sit near chance, which is expected at
|
| 50 |
+
this size.
|
|
|
|
| 51 |
|
| 52 |
## Reproduce the ArithMark-2 score
|
| 53 |
|
|
|
|
| 57 |
|
| 58 |
## Training
|
| 59 |
|
| 60 |
+
Pretrained from scratch with a digit-atomic 4k tokenizer, least-significant-digit order, and a large
|
| 61 |
+
stream of **freshly generated** synthetic integer arithmetic (addition, subtraction, multiplication,
|
| 62 |
+
exact division, mixed and parenthesised multi-operator expressions), mixed with TinyStories for
|
| 63 |
+
language. Then a short fine-tune on public benchmark train splits plus more arithmetic. No evaluation
|
| 64 |
+
items were used at any stage. Fresh generation, never reusing a fixed pool, is what stops the model
|
| 65 |
+
from memorising instead of learning.
|
| 66 |
|
| 67 |
## Limitations
|
| 68 |
|
|
|
|
| 71 |
|
| 72 |
## License
|
| 73 |
|
| 74 |
+
MIT. Trained from scratch: 100% original weights, own tokenizer, no base model.
|
|
|
|
|
|