Text Generation
Transformers
Safetensors
English
arman-nn
hybrid-architecture
attention
ssm
Mixture of Experts
causal-lm
custom_code
Instructions to use mhd-rahman/ArmanNN-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mhd-rahman/ArmanNN-Base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mhd-rahman/ArmanNN-Base", trust_remote_code=True)# Load model directly from transformers import ArmanNN model = ArmanNN.from_pretrained("mhd-rahman/ArmanNN-Base", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use mhd-rahman/ArmanNN-Base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mhd-rahman/ArmanNN-Base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mhd-rahman/ArmanNN-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/mhd-rahman/ArmanNN-Base
- SGLang
How to use mhd-rahman/ArmanNN-Base 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 "mhd-rahman/ArmanNN-Base" \ --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": "mhd-rahman/ArmanNN-Base", "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 "mhd-rahman/ArmanNN-Base" \ --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": "mhd-rahman/ArmanNN-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use mhd-rahman/ArmanNN-Base with Docker Model Runner:
docker model run hf.co/mhd-rahman/ArmanNN-Base
ArmanNN
A hybrid language model combining Causal Attention, Selective SSM (parallel scan), Sparse Mixture-of-Experts, with learned fusion gates and path routers.
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("mhd-rahman/ArmanNN-Base", trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained("mhd-rahman/ArmanNN-Base")
inputs = tokenizer("The future of AI is", return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=100)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Architecture
- Parameters: 553,942,528
- Layers: 12
- d_model: 1024
- Heads: 16
- Experts: 4 (top-2)
- Max seq length: 1024
- Trained steps: 76,000
Training Data
Mixed pretraining corpus:
- FineWeb-Edu (62.5%)
- Code - StarCoder (12.5%)
- Wikipedia (8.3%)
- OpenWebMath (16.7%)
- Downloads last month
- -