Instructions to use Meridian-MRM/Samarkand-253m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Meridian-MRM/Samarkand-253m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Meridian-MRM/Samarkand-253m")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Meridian-MRM/Samarkand-253m") model = AutoModelForCausalLM.from_pretrained("Meridian-MRM/Samarkand-253m", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Meridian-MRM/Samarkand-253m with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf Meridian-MRM/Samarkand-253m:Q2_K # Run inference directly in the terminal: llama cli -hf Meridian-MRM/Samarkand-253m:Q2_K
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Meridian-MRM/Samarkand-253m:Q2_K # Run inference directly in the terminal: llama cli -hf Meridian-MRM/Samarkand-253m:Q2_K
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf Meridian-MRM/Samarkand-253m:Q2_K # Run inference directly in the terminal: ./llama-cli -hf Meridian-MRM/Samarkand-253m:Q2_K
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf Meridian-MRM/Samarkand-253m:Q2_K # Run inference directly in the terminal: ./build/bin/llama-cli -hf Meridian-MRM/Samarkand-253m:Q2_K
Use Docker
docker model run hf.co/Meridian-MRM/Samarkand-253m:Q2_K
- Llama new
- LM Studio
- Jan
- vLLM
How to use Meridian-MRM/Samarkand-253m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Meridian-MRM/Samarkand-253m" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Meridian-MRM/Samarkand-253m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Meridian-MRM/Samarkand-253m:Q2_K
- SGLang
How to use Meridian-MRM/Samarkand-253m 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 "Meridian-MRM/Samarkand-253m" \ --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": "Meridian-MRM/Samarkand-253m", "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 "Meridian-MRM/Samarkand-253m" \ --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": "Meridian-MRM/Samarkand-253m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use Meridian-MRM/Samarkand-253m with Ollama:
ollama run hf.co/Meridian-MRM/Samarkand-253m:Q2_K
- Unsloth Desktop
- Docker Model Runner
How to use Meridian-MRM/Samarkand-253m with Docker Model Runner:
docker model run hf.co/Meridian-MRM/Samarkand-253m:Q2_K
- Lemonade
How to use Meridian-MRM/Samarkand-253m with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Meridian-MRM/Samarkand-253m:Q2_K
Run and chat with the model
lemonade run user.Samarkand-253m-Q2_K
List all available models
lemonade list
- Atomic Chat
Samarkand-253M
Samarkand-253M is a 253M-parameter base language model, built from scratch end to end in JAX/Flax NNX on Google's TPU architecture, with a custom 30k byte-level BPE tokenizer.
Training data: FineWeb-Edu and DCLM only. No benchmark training sets were used.
This is a base model: it is not instruction-tuned and has no chat template.
Training
- Framework: JAX / Flax NNX, trained from scratch
- Hardware: one TPU v5e (8 chips for training, less for testing)
- Batch: 131,072 tokens per step
- Optimizer: AdamW, peak LR 1e-3, warmup-stable-decay schedule
- Data: FineWeb-Edu + DCLM
Mid training strategy consisted of micro managing dclm training ratio to preserve fineweb-edu whilst giving general register.
Architecture
26 layers, d_model 896, 14 attention heads with 2 KV heads (GQA), head_dim 64, SwiGLU FFN (d_ff 2560), QK-norm, RoPE (theta 10000), tied embeddings, context length 2048, vocabulary 30,002.
It is stored in the Qwen3 layout, so it loads with Qwen3ForCausalLM in transformers and runs in llama.cpp as the qwen3 architecture.
Files
model.safetensors,config.json,tokenizer.json,tokenizer_config.json: Hugging Face formatSamarkand-253m-f16.gguf: llama.cpp (needs a recent build with Qwen3 support)
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "dragosMediv/Samarkand-253m"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo)
inputs = tok("The capital of France is", return_tensors="pt")
out = model.generate(**inputs, max_new_tokens=40)
print(tok.decode(out[0]))
llama-cli -m Samarkand-253m-f16.gguf -p "The capital of France is"
Evaluation
All zero-shot, fp32, from the Hugging Face weights in this repo, using lm-evaluation-harness (ArithMark-3.0 with its official script).
| Benchmark | Chance | acc | acc_norm |
|---|---|---|---|
| ARC-Easy | 25 | 56.94 | 50.84 |
| ARC-Challenge | 25 | 25.26 | 26.96 |
| HellaSwag | 25 | 32.68 | 38.15 |
| PIQA | 50 | 67.25 | 66.49 |
| WinoGrande | 50 | 50.43 | - |
| OpenBookQA | 25 | 19.60 | 32.80 |
| SciQ | 25 | 79.20 | 71.50 |
| BLiMP | 50 | 81.39 | - |
| ArithMark-3.0 | 25 | 35.10 | 35.50 |
WikiText-2 (test, 1024-token windows): word perplexity 29.71, byte perplexity 1.8855, bits per byte 0.9150.
Limitations
- English only
- Base model: no instruction or safety tuning
- Can produce incorrect or made-up text
- 2048-token context
- Downloads last month
- 3
Datasets used to train Meridian-MRM/Samarkand-253m
mlfoundations/dclm-baseline-1.0
Evaluation results
- Accuracy on AI2 Reasoning Challengetest set lm-eval56.940
- Normalized Accuracy on AI2 Reasoning Challengetest set lm-eval50.840
- Accuracy on AI2 Reasoning Challengetest set lm-eval25.260
- Normalized Accuracy on AI2 Reasoning Challengetest set lm-eval26.960
- Accuracy on HellaSwaglm-eval32.680
- Normalized Accuracy on HellaSwaglm-eval38.150
- Accuracy on PIQAlm-eval67.250
- Normalized Accuracy on PIQAlm-eval66.490