Instructions to use Rizor1x/Meron-Nano-5.41M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Rizor1x/Meron-Nano-5.41M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Rizor1x/Meron-Nano-5.41M", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Rizor1x/Meron-Nano-5.41M", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Rizor1x/Meron-Nano-5.41M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Rizor1x/Meron-Nano-5.41M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Rizor1x/Meron-Nano-5.41M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Rizor1x/Meron-Nano-5.41M
- SGLang
How to use Rizor1x/Meron-Nano-5.41M 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 "Rizor1x/Meron-Nano-5.41M" \ --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": "Rizor1x/Meron-Nano-5.41M", "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 "Rizor1x/Meron-Nano-5.41M" \ --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": "Rizor1x/Meron-Nano-5.41M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Rizor1x/Meron-Nano-5.41M with Docker Model Runner:
docker model run hf.co/Rizor1x/Meron-Nano-5.41M
Meron Nano 5.41M
Meron Nano 5.41M is an English base model for text completion. A router chooses one path per prompt: arithmetic, physical commonsense, or a blend of two language components. This release includes FP32 Safetensors weights, the tokenizer, and a Transformers implementation.
Model overview
| Specification | |
|---|---|
| Model type | Autoregressive base language model |
| Total parameters | 5,412,387 |
| Context length | 1,024 tokens |
| Vocabulary | 4,096 tokens |
| Transformer blocks | 2 per component, reused across 2 passes |
| Hidden size / attention heads | 96 / 3 |
The router reads up to 32 prompt tokens and keeps the selected path for the full continuation. The arithmetic path uses a dense SwiGLU network. The physical commonsense path uses four experts. The language path blends logits from a four-expert component and the six-expert foundation component with weights 0.4 and 0.6. Within each expert block, all experts are evaluated and their activations are weighted by softmax.
During decoding, the arithmetic, physical commonsense, and language paths use 0.91M, 1.35M, and 3.15M parameters respectively. These counts exclude the one-time prompt routing step.
Evaluation
The released FP32 checkpoint was evaluated in Transformers. The five zero-shot scores below give an index of 15.65 using the Open SLM Intelligence Index formula.
| Benchmark | Evaluation set | Accuracy |
|---|---|---|
| ArithMark-3.0 | 1,000 examples | 60.30% |
| PIQA | 1,838 validation examples | 59.96% |
| ARC-Easy | First 570 test examples | 32.63% |
| ARC-Challenge | First 299 test examples | 25.75% |
| HellaSwag | Full validation set (10,042 examples) | 25.78% |
Scoring. Each answer choice is ranked by its mean continuation-token log probability. ArithMark and PIQA use their respective specialists. ARC and HellaSwag blend the language and foundation log probabilities with weights of 0.4/0.6 and 0.5/0.5, respectively. The evaluation selects components by benchmark.
The additional benchmarks use the default prompt router in zero-shot evaluation. MMLU continuation and OpenBookQA report acc_norm on the full test splits (14,042 and 500 questions). WinoGrande XL reports acc on the full validation split (1,267 questions).
Evaluation sets can differ by model. Meron Nano 2.26M, TinyBrainBot 3M v2 Base, Ethoric 10M
Training and limitations
The foundation component's training recipe targets roughly 5 billion processed tokens across general text, science, arithmetic, and commonsense data streams. This count includes repeated exposure to training data. The other specialists come from separate checkpoints.
Meron is intended for short English completions and experiments with compact language models. Free-form generation can repeat phrases and produce incorrect answers, including on simple arithmetic. Overlap between training and evaluation data has not been comprehensively audited.
Inference
The example uses Transformers 5.17.0. It loads the model implementation included in this repository via trust_remote_code=True.
pip install torch "transformers==5.17.0" safetensors
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "Rizor1x/Meron-Nano-5.41M" # A path to the release folder also works.
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_id,
trust_remote_code=True,
dtype=torch.float32,
).eval()
inputs = tokenizer("The lamp on the desk", return_tensors="pt").to(model.device)
with torch.inference_mode():
output = model.generate(**inputs, max_new_tokens=16, do_sample=False)
continuation = output[0, inputs.input_ids.shape[1]:]
print(tokenizer.decode(continuation, skip_special_tokens=True))
Keep the prompt and continuation within 1,024 tokens combined. For batches, use left padding and pass the tokenizer's attention mask. The implementation recomputes the prefix at each generation step.
License
The release uses the Apache 2.0 license.
- Downloads last month
- 36