Instructions to use MagistrTheOne/NULLXES-SHINRA-4B-INSTRUCT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MagistrTheOne/NULLXES-SHINRA-4B-INSTRUCT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MagistrTheOne/NULLXES-SHINRA-4B-INSTRUCT", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("MagistrTheOne/NULLXES-SHINRA-4B-INSTRUCT", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use MagistrTheOne/NULLXES-SHINRA-4B-INSTRUCT with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MagistrTheOne/NULLXES-SHINRA-4B-INSTRUCT" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MagistrTheOne/NULLXES-SHINRA-4B-INSTRUCT", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/MagistrTheOne/NULLXES-SHINRA-4B-INSTRUCT
- SGLang
How to use MagistrTheOne/NULLXES-SHINRA-4B-INSTRUCT 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 "MagistrTheOne/NULLXES-SHINRA-4B-INSTRUCT" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MagistrTheOne/NULLXES-SHINRA-4B-INSTRUCT", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "MagistrTheOne/NULLXES-SHINRA-4B-INSTRUCT" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MagistrTheOne/NULLXES-SHINRA-4B-INSTRUCT", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use MagistrTheOne/NULLXES-SHINRA-4B-INSTRUCT with Docker Model Runner:
docker model run hf.co/MagistrTheOne/NULLXES-SHINRA-4B-INSTRUCT
NULLXES SHINRA-4B-INSTRUCT
Language Intelligence layer of the NULLXES Intelligence Stack.
SHINRA Our llm.
Model summary
| Field | Value |
|---|---|
| Name | NULLXES SHINRA-4B-INSTRUCT |
| Developer | NULLXES LLC |
| Parameters | 3,926,076,416 total (3.9261B); 3,523,423,232 non-embedding |
| Architecture | Decoder-only Transformer, GQA + RoPE, SwiGLU, RMSNorm pre-norm |
| Vocabulary | 131,072 (custom SentencePiece Unigram) |
| Configured training sequence length | 8,192 tokens |
| Configured maximum positions | 32,768 (RoPE ฮธ = 1,000,000) |
| Published weight dtype | FP32 (F32 in Hub safetensors metadata) |
| Configured training precision | BF16 |
| Framework | PyTorch + transformers, FSDP |
| Configured training hardware | 8ร A100 80GB |
| License | NULLXES Research License โ weights are a proprietary asset |
Release line
NULLXES SHINRA-4B-BASEโ pretrainNULLXES SHINRA-4B-INSTRUCTโ instruction tuning โ this modelNULLXES SHINRA-4B-INSTRUCT (aligned)โ DPO / preference optimization
Context configuration. GitHub configures an 8,192-token training sequence and 32,768 maximum positions. These are configuration limits, not measured context-quality results.
Architecture โ SHINRA CORE
Embedding
โ [ RMSNorm โ GQA + RoPE (+ QK-norm) โ residual
RMSNorm โ SwiGLU โ residual ] ร 32
โ RMSNorm โ LM Head (tied)
| Component | Value |
|---|---|
| Model type / class | nullxes_shinra / ShinraForCausalLM |
| Layers | 32 |
| Hidden size | 3,072 |
| Attention heads | 24 |
| KV heads | 8 (GQA, 3:1) |
| Head dim | 128 |
| SwiGLU intermediate | 9,216 |
| Positional encoding | RoPE, ฮธ = 1,000,000 |
| Normalization | RMSNorm, ฮต = 1e-6, pre-norm |
| QK-norm | enabled |
| Attention implementation | PyTorch SDPA |
| Attention / residual / embedding dropout | 0.0 / 0.0 / 0.0 |
| Initializer standard deviation | 0.02 |
| Attention / MLP bias | none |
| Z-loss | 1e-5 |
| Embeddings | input embeddings and LM head tied; counted once |
| Vocab | 131,072 |
Parameter budget
| Block | Params |
|---|---|
| Embedding (tied, counted once) | 402,653,184 |
| Attention projections per layer | 25,165,824 |
| SwiGLU MLP per layer | 84,934,656 |
| RMSNorm + QK-norm per layer | 6,400 |
| All 32 decoder layers | 3,523,420,160 |
| Final RMSNorm | 3,072 |
| Additional LM head parameters | 0 (tied) |
| Total | 3,926,076,416 (3.9261B) |
Reproduce in the GitHub repository: python -m architecture.param_count
Architecture source: configs/shinra_4b.yaml at 903a639e03bc. The total also matches the published safetensors metadata.
Full spec: architecture/design.md
Tokenizer
Custom SentencePiece Unigram, trained in-house on a web + wiki + code mix.
| Field | Value |
|---|---|
| Algorithm | SentencePiece Unigram |
| Vocab size | 131,072 |
| Normalization | NFKC |
| Byte fallback | yes |
| Fertility (tokens/word) |
Special tokens
<|system|> <|user|> <|assistant|> <|eot|> <|code|> <|language|> <|reasoning|> <|tool_call|> <|tool_response|> <|document|> <|end_of_text|>
Usage
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "MagistrTheOne/NULLXES-SHINRA-4B-INSTRUCT"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto",
trust_remote_code=True,
)
messages = [
{"role": "system", "content": "You are SHINRA, built by NULLXES."},
{"role": "user", "content": "Write RMSNorm in PyTorch."},
]
inputs = tokenizer.apply_chat_template(
messages, add_generation_prompt=True, return_tensors="pt"
).to(model.device)
out = model.generate(inputs, max_new_tokens=512, temperature=0.7, top_p=0.9, do_sample=True)
print(tokenizer.decode(out[0][inputs.shape[-1]:], skip_special_tokens=True))
trust_remote_code=True is required: SHINRA ships a custom ShinraConfig and modeling code, not a reused architecture class. The HF inference widget cannot load custom code, hence inference: false.
Chat template
<|system|>
{system}<|eot|>
<|user|>
{user}<|eot|>
<|assistant|>
{assistant}<|eot|>
Generation settings
| Use case | temp | top_p | rep. penalty |
|---|---|---|---|
| General chat | 0.7 | 0.9 | 1.05 |
| Deterministic / extraction | 0.0โ0.2 | 1.0 | 1.0 |
| Creative | 0.9 | 0.95 | 1.05 |
Training
Pretraining (SHINRA-4B-BASE)
| Field | Value |
|---|---|
| Tokens | 200B |
| Sequence length | 8,192 (packed) |
| Global batch | 2,097,152 tokens/step |
| Steps | 95,367 |
| Peak LR | 3e-4 |
| Schedule | WSD (warmupโstableโdecay) |
| Optimizer | fused AdamW |
| Parallelism | FSDP FULL_SHARD |
| Memory | gradient checkpointing |
| Attention kernel | SDPA / FlashAttention on A100 |
| Hardware | 8ร A100 80GB |
| Wall-clock | [TODO โ measured] |
Data pipeline: normalize โ quality filter โ language ID โ toxicity filter โ code-quality filter โ MinHash dedup โ pack to 8,192.
Mixture and weights: configs/data_mix.yaml ยท docs/data.md
Alignment
DPO / preference optimization โ planned, not included in this checkpoint.
Evaluation
[TODO] Fill before public release. Harness is already in-repo (
evaluation/): perplexity,lm-eval, needle-in-haystack, code and multilingual slices.
| Benchmark | Shots | SHINRA-4B-INSTRUCT | Reference 4B |
|---|---|---|---|
| Held-out PPL | โ | [TODO] | โ |
| MMLU | 5 | [TODO] | [TODO] |
| ruMMLU / MERA | 5 | [TODO] | [TODO] |
| HellaSwag | 10 | [TODO] | [TODO] |
| ARC-Challenge | 25 | [TODO] | [TODO] |
| GSM8K | 8 | [TODO] | [TODO] |
| HumanEval | 0 | [TODO] | [TODO] |
| IFEval | 0 | [TODO] | [TODO] |
| Needle @ 8K | โ | [TODO] | โ |
Harness version and exact commands: [TODO].
Inference & serving
python -m inference.generate --model $CKPT --prompt "Write RMSNorm in PyTorch."
python -m inference.server --model $CKPT --port 8000 # OpenAI-compatible HTTP
Serving backends (vLLM / SGLang / TokenSpeed): runtime/.
Intended use
In scope
- Assistant dialogue, instruction following, summarization, rewriting, extraction
- Language layer of the NULLXES Intelligence Stack
- Research on from-scratch small-model training
Out of scope
- Medical, legal, or financial advice
- Autonomous decision-making without a human in the loop
- Safety-critical or life-critical systems
- Any use relying on factual accuracy without external grounding (RAG / tools)
Limitations
- 3.93B parameters trained on 200B tokens. That is a deliberately compute-bounded run โ expect it to trail open 4B models trained on multi-trillion-token corpora on knowledge-heavy benchmarks. Use it where architecture control and data provenance matter more than raw benchmark position.
- Hallucination, multi-step arithmetic failure, and long-range inconsistency should be assumed, not tested for.
- Long-context quality above 8,192 tokens is unvalidated.
- No preference alignment in this checkpoint. Safety rests on data filtering (toxicity + quality stages) only. No red-team report.
- Knowledge cutoff: [TODO].
- Outputs may reproduce bias present in the pretraining corpus.
License
NULLXES Research License. Weights are a proprietary NULLXES asset. See LICENSE for permitted use, redistribution, and commercial terms.
Citation
@misc{nullxes2026shinra,
title = {NULLXES SHINRA-4B-INSTRUCT: A From-Scratch Decoder-Only Language Model},
author = {NULLXES LLC},
year = {2026},
url = {https://huggingface.co/MagistrTheOne/NULLXES-SHINRA-4B-INSTRUCT}
}
Contact
NULLXES LLC โ [ceo@nullxes.com] Maintainer: MagistrTheOne
- Downloads last month
- 546