Instructions to use Rahspide/MNN-Pocket-0.3B-RU-Chat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Rahspide/MNN-Pocket-0.3B-RU-Chat with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Rahspide/MNN-Pocket-0.3B-RU-Chat")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Rahspide/MNN-Pocket-0.3B-RU-Chat", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Rahspide/MNN-Pocket-0.3B-RU-Chat with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Rahspide/MNN-Pocket-0.3B-RU-Chat" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Rahspide/MNN-Pocket-0.3B-RU-Chat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Rahspide/MNN-Pocket-0.3B-RU-Chat
- SGLang
How to use Rahspide/MNN-Pocket-0.3B-RU-Chat 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 "Rahspide/MNN-Pocket-0.3B-RU-Chat" \ --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": "Rahspide/MNN-Pocket-0.3B-RU-Chat", "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 "Rahspide/MNN-Pocket-0.3B-RU-Chat" \ --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": "Rahspide/MNN-Pocket-0.3B-RU-Chat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Rahspide/MNN-Pocket-0.3B-RU-Chat with Docker Model Runner:
docker model run hf.co/Rahspide/MNN-Pocket-0.3B-RU-Chat
MNN-Pocket-0.3B-RU-Chat (planned)
Status: not trained yet. This card is the plan for the second product; no weights exist. When training finishes this banner and the numbers below will be replaced.
Russian instruction-following assistant, built by SFT on top of
Rahspide/MNN-Pocket-0.3B-RU.
Two models, two jobs
This repository is the assistant. Its sister, MNN-Pocket-0.3B-RU, is the continuation model β
same base, same Russian, different job.
Sister β MNN-Pocket-0.3B-RU |
This model β MNN-Pocket-0.3B-RU-Chat |
|
|---|---|---|
| Job | continue text | follow instructions |
| Input | a prefix, often mid-sentence | a system + user message |
| Output | the plausible continuation | an answer |
| Trained with | continued pretraining on 1.2B tokens of raw text | instruction tuning on top of that model |
| Choose it for | keyboard suggestions, autocomplete, prefix completion | chat, Q&A, short rewrites |
| Do not choose it for | assistant behaviour: it will continue your question instead of answering it | autocomplete: it will answer instead of continuing |
The split exists because the two tasks reward opposite behaviour. One checkpoint trained on both is mediocre at each: a continuation model that starts answering, and an assistant that leaks into completion mode.
Why start from the Russian continuation model
The base MNN-Pocket-0.3B is bilingual zh/en and has essentially no Russian; a direct SFT of the official
instruct model would fight both problems at once (new language and new format). Starting from the continuation
model means Russian is already paid for, and SFT only has to teach the dialogue shape.
A control run on the official taobao-mnn/MNN-Pocket-0.3B with the same SFT data is planned, so that
"we lost the assistant in pretraining" can be told apart from "there was no assistant to lose".
Planned recipe
- Start point:
Rahspide/MNN-Pocket-0.3B-RU(or its final checkpoint). - Chat template: the model's own ChatML (
<|im_start|>/<|im_end|>), untouched. - Loss only on assistant tokens; system and user turns are masked context.
- Multi-turn dialogue kept as one example; packing with explicit boundaries.
- Three data volumes tried (β5k / 20k / 50k examples) with early stopping on a held-out Russian split; one epoch per checkpoint kept, best picked on the held-out split rather than on the training loss.
- 10β20% English instruction replay from
HuggingFaceH4/ultrachat_200kto keep bilingual instruction following; the exact share is tuned on an English sanity set. - Learning-rate grid 1e-4 β¦ 3e-4, full fine-tuning; LoRA is the fallback if full FT cannot fit.
Planned data
| Dataset | Role | Licence |
|---|---|---|
IlyaGusev/saiga_scored |
core Russian instructions with quality scores | see dataset card |
IlyaGusev/ru_turbo_alpaca |
volume filler | CC-BY-4.0 |
HuggingFaceH4/ultrachat_200k |
English replay, 10β20% | MIT |
Rules: deduplicate by normalised text, drop examples shorter than ~16 tokens, exclude any dataset whose licence forbids redistribution of derivatives, and check for leakage into MERA test sets.
Planned evaluation
- Blind manual review of 50β100 Russian dialogues: instruction following, naturalness, correct refusal, 2β3 turn coherence.
- Selective MERA tasks that fit a 0.3B model's format and context β not the aggregate score.
- No regression against the continuation sister on Russian bits/char, and no collapse of English answers.
Limitations (expected)
- 0.36B parameters: short answers, weak facts, no reliable multi-step reasoning.
- Russian SFT data is mostly machine-translated or model-generated; style will be flatter than human chat.
- The sibling's Russian tokenizer cost applies here too: about 3.3 tokens per Russian word.
- Not a coding model, not a tool-calling model, no long-context dialogue.
Licence and attribution
Weights: Apache-2.0, inherited through MNN-Pocket-0.3B-RU from taobao-mnn/MNN-Pocket-0.3B-Base.
Model tree for Rahspide/MNN-Pocket-0.3B-RU-Chat
Base model
taobao-mnn/MNN-Pocket-0.3B-Base