Instructions to use RusMiniLM/RusNanoLM-800M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use RusMiniLM/RusNanoLM-800M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="RusMiniLM/RusNanoLM-800M") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("RusMiniLM/RusNanoLM-800M") model = AutoModelForMultimodalLM.from_pretrained("RusMiniLM/RusNanoLM-800M", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use RusMiniLM/RusNanoLM-800M 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 RusMiniLM/RusNanoLM-800M:F16 # Run inference directly in the terminal: llama cli -hf RusMiniLM/RusNanoLM-800M:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf RusMiniLM/RusNanoLM-800M:F16 # Run inference directly in the terminal: llama cli -hf RusMiniLM/RusNanoLM-800M:F16
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf RusMiniLM/RusNanoLM-800M:F16 # Run inference directly in the terminal: ./build/bin/llama cli -hf RusMiniLM/RusNanoLM-800M:F16
Use Docker
docker model run hf.co/RusMiniLM/RusNanoLM-800M:F16
- Llama new
- LM Studio
- Jan
- vLLM
How to use RusMiniLM/RusNanoLM-800M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "RusMiniLM/RusNanoLM-800M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RusMiniLM/RusNanoLM-800M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/RusMiniLM/RusNanoLM-800M:F16
- SGLang
How to use RusMiniLM/RusNanoLM-800M 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 "RusMiniLM/RusNanoLM-800M" \ --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": "RusMiniLM/RusNanoLM-800M", "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 "RusMiniLM/RusNanoLM-800M" \ --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": "RusMiniLM/RusNanoLM-800M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use RusMiniLM/RusNanoLM-800M with Ollama:
ollama run hf.co/RusMiniLM/RusNanoLM-800M:F16
- Unsloth Desktop
- Pi
How to use RusMiniLM/RusNanoLM-800M with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf RusMiniLM/RusNanoLM-800M:F16
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "RusMiniLM/RusNanoLM-800M:F16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use RusMiniLM/RusNanoLM-800M with Docker Model Runner:
docker model run hf.co/RusMiniLM/RusNanoLM-800M:F16
- Lemonade
How to use RusMiniLM/RusNanoLM-800M with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull RusMiniLM/RusNanoLM-800M:F16
Run and chat with the model
lemonade run user.RusNanoLM-800M-F16
List all available models
lemonade list
- Hermes Agent
How to use RusMiniLM/RusNanoLM-800M with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf RusMiniLM/RusNanoLM-800M:F16
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:9931/v1 hermes config set model.default RusMiniLM/RusNanoLM-800M:F16
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use RusMiniLM/RusNanoLM-800M with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf RusMiniLM/RusNanoLM-800M:F16
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:9931/v1 \ --custom-model-id "RusMiniLM/RusNanoLM-800M:F16" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Download README.md from RusMiniLM/RusNanoLM-800M: direct link, hf CLI and curl.
- Browser
- Download file 6.87 kB
-
https://huggingface.co/RusMiniLM/RusNanoLM-800M/resolve/main/README.md
- Command line
-
hf download hf://RusMiniLM/RusNanoLM-800M/README.md
-
curl -L -o README.md https://huggingface.co/RusMiniLM/RusNanoLM-800M/resolve/main/README.md
language:
- ru
- en
license: apache-2.0
tags:
- mera
- russian
- math
- reasoning
- qwen3.5
- linear-attention
- sub-1b
- sft
pipeline_tag: text-generation
library_name: transformers
metrics:
- accuracy
RusNanoLM-800M
English Overview
RusNanoLM-800M is an open-weights 800M parameter bilingual (Russian / English) language model built on a hybrid Linear Attention architecture (Qwen3.5 with Gated Delta Rule layers). It is evaluated on MERA, the Russian language understanding benchmark suite: on RuMultiAR a 0.8B model outperforms Qwen2.5-7B and GigaChat-2-10B.
MERA Results (Pass@1, greedy, chat template)
| Benchmark | Tasks | RusNanoLM-0.8B | Qwen3.5-0.8B (baseline) | Δ |
|---|---|---|---|---|
| SimpleAR | 1000 | 83.2% | 48.3% | +34.9 |
| RuMultiAR | 1039 | 33.5% | 8.1% | +25.4 (×4.1) |
| MathLogicQA | 680 | 38.2% | 33.9% | +4.4 |
| MaMuRaMu | 285 | 46.0% | 43.6% | +2.4 |
| PARus | 500 | 53.4% | 53.6% | -0.2 |
| RWSD | 810 | 49.9% | 52.7% | -2.8 |
| Strict Constraints JSON | 12 | 58.3% | - | - |
Evaluation date: 2026-11-17. Baseline numbers — official MERA submission of Qwen3.5-0.8B (submit id 16125).
RuMultiAR vs larger models
| Model | Params | RuMultiAR |
|---|---|---|
| RuadaptQwen-32B | 32B | 43.3% |
| RusNanoLM-0.8B (ours) | 0.8B | 33.5% |
| GigaChat-2-10B | 10B | 31.5% |
| Qwen2.5-7B | 7B | 30.8% |
| Meta-Llama-3-8B | 8B | 24.8% |
| Llama-3.2-1B-Instruct | 1B | 16.2% |
| Qwen3.5-0.8B (baseline) | 0.8B | 8.1% |
Visual Leaderboards
MERA Suite Summary
Baseline Progression
SimpleAR
RuMultiAR
MathLogicQA
MaMuRaMu
Quickstart & Inference
import torch
from transformers import AutoModelForImageTextToText, AutoTokenizer
MODEL_ID = "itismax0/RusNanoLM-800M"
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
model = AutoModelForImageTextToText.from_pretrained(
MODEL_ID,
torch_dtype=torch.bfloat16,
device_map="auto"
)
model.eval()
messages = [
{"role": "user", "content": "Реши задачу: в корзине 5 яблок и 7 груш. Сколько всего фруктов?"}
]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=512,
do_sample=False,
pad_token_id=tokenizer.eos_token_id
)
response = tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True)
print(response)
Run with llama.cpp / Ollama (GGUF, full precision)
Two full-precision F16 GGUF files are included — no quantization loss. They differ only in tensor naming (llama.cpp renamed some Qwen3.5 tensors between b12257 and b12413):
| File | Use with |
|---|---|
RusNanoLM-800M-F16.gguf |
llama.cpp >= b12413 (current master) |
RusNanoLM-800M-F16-ollama.gguf |
Ollama (all current versions) and other apps bundling llama.cpp <= b12257 (LM Studio, etc.) |
# llama.cpp (fresh build)
llama-cli -hf itismax0/RusNanoLM-800M:RusNanoLM-800M-F16.gguf --temp 0 -p "Реши: 13*7"
# Ollama — direct pull
ollama run hf.co/itismax0/RusNanoLM-800M:RusNanoLM-800M-F16-ollama.gguf "Вычисли: 13*7"
Note: the model uses the Qwen3.5 hybrid linear-attention architecture. If you see
tensor 'blk.0.ssm_beta.weight' not foundin Ollama — use the-ollamaGGUF variant. If LM Studio refuses to load, update its llama.cpp runtime (Settings → Runtimes).
Обзор на русском
RusNanoLM-800M — открытая двуязычная (русский и английский) модель на 800 млн параметров, построенная на гибридной архитектуре Qwen3.5 с линейным вниманием (Gated Delta Rule): 24 слоя, каждый четвёртый — полное внимание. Оценивалась на русскоязычном бенчмарке MERA (Pass@1, жадная генерация, chat template).
Результаты MERA
| Бенчмарк | Задач | RusNanoLM-0.8B | Qwen3.5-0.8B (baseline) | Δ |
|---|---|---|---|---|
| SimpleAR | 1000 | 83.2% | 48.3% | +34.9 |
| RuMultiAR | 1039 | 33.5% | 8.1% | +25.4 (×4.1) |
| MathLogicQA | 680 | 38.2% | 33.9% | +4.4 |
| MaMuRaMu | 285 | 46.0% | 43.6% | +2.4 |
| PARus | 500 | 53.4% | 53.6% | -0.2 |
| RWSD | 810 | 49.9% | 52.7% | -2.8 |
| Strict Constraints JSON | 12 | 58.3% | - | - |
Главный результат: RuMultiAR против больших моделей
На арифметических рассуждениях (RuMultiAR) компактная модель 0.8B обгоняет модели в 8-12 раз тяжелее:
- 33.5% — RusNanoLM-0.8B (наша)
- 31.5% — GigaChat-2-10B
- 30.8% — Qwen2.5-7B
- 24.8% — Meta-Llama-3-8B
- 8.1% — базовая Qwen3.5-0.8B (рост в 4.1 раза)
Честные ограничения
- PARus (-0.2%) и RWSD (-2.8%) — на уровне или чуть ниже baseline: прирост получен за счёт арифметики и рассуждений, общее понимание текста не деградировало, но и не выросло.
- Strict Constraints JSON — всего 12 задач, выборка мала для сильных выводов.
Графики
Архитектура и параметры
- Параметры: 800 млн (0.8B)
- Внимание: гибридное линейное внимание (Gated Delta Rule), сложность памяти состояния O(1)
- Слои: 24, каждый четвёртый — полное внимание
- Требования к видеопамяти: около 1.7 ГБ в формате BF16 (запускается на GPU с 4 ГБ VRAM)
- Шаблон диалога: ChatML (встроен в tokenizer_config)
- Лицензия: Apache 2.0





