Instructions to use kaufkino/MiniCPM5-1B-T-Wix-ru with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kaufkino/MiniCPM5-1B-T-Wix-ru with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="kaufkino/MiniCPM5-1B-T-Wix-ru") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("kaufkino/MiniCPM5-1B-T-Wix-ru") model = AutoModelForCausalLM.from_pretrained("kaufkino/MiniCPM5-1B-T-Wix-ru") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - llama-cpp-python
How to use kaufkino/MiniCPM5-1B-T-Wix-ru with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="kaufkino/MiniCPM5-1B-T-Wix-ru", filename="gguf/minicpm5-1b-t-wix-ru-bf16.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use kaufkino/MiniCPM5-1B-T-Wix-ru 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 kaufkino/MiniCPM5-1B-T-Wix-ru:BF16 # Run inference directly in the terminal: llama cli -hf kaufkino/MiniCPM5-1B-T-Wix-ru:BF16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf kaufkino/MiniCPM5-1B-T-Wix-ru:BF16 # Run inference directly in the terminal: llama cli -hf kaufkino/MiniCPM5-1B-T-Wix-ru:BF16
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 kaufkino/MiniCPM5-1B-T-Wix-ru:BF16 # Run inference directly in the terminal: ./llama-cli -hf kaufkino/MiniCPM5-1B-T-Wix-ru:BF16
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 kaufkino/MiniCPM5-1B-T-Wix-ru:BF16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf kaufkino/MiniCPM5-1B-T-Wix-ru:BF16
Use Docker
docker model run hf.co/kaufkino/MiniCPM5-1B-T-Wix-ru:BF16
- LM Studio
- Jan
- vLLM
How to use kaufkino/MiniCPM5-1B-T-Wix-ru with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "kaufkino/MiniCPM5-1B-T-Wix-ru" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kaufkino/MiniCPM5-1B-T-Wix-ru", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/kaufkino/MiniCPM5-1B-T-Wix-ru:BF16
- SGLang
How to use kaufkino/MiniCPM5-1B-T-Wix-ru 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 "kaufkino/MiniCPM5-1B-T-Wix-ru" \ --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": "kaufkino/MiniCPM5-1B-T-Wix-ru", "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 "kaufkino/MiniCPM5-1B-T-Wix-ru" \ --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": "kaufkino/MiniCPM5-1B-T-Wix-ru", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use kaufkino/MiniCPM5-1B-T-Wix-ru with Ollama:
ollama run hf.co/kaufkino/MiniCPM5-1B-T-Wix-ru:BF16
- Unsloth Studio
How to use kaufkino/MiniCPM5-1B-T-Wix-ru with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for kaufkino/MiniCPM5-1B-T-Wix-ru to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for kaufkino/MiniCPM5-1B-T-Wix-ru to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for kaufkino/MiniCPM5-1B-T-Wix-ru to start chatting
- Pi
How to use kaufkino/MiniCPM5-1B-T-Wix-ru with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf kaufkino/MiniCPM5-1B-T-Wix-ru:BF16
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "kaufkino/MiniCPM5-1B-T-Wix-ru:BF16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use kaufkino/MiniCPM5-1B-T-Wix-ru with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf kaufkino/MiniCPM5-1B-T-Wix-ru:BF16
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:8080/v1 hermes config set model.default kaufkino/MiniCPM5-1B-T-Wix-ru:BF16
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use kaufkino/MiniCPM5-1B-T-Wix-ru with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf kaufkino/MiniCPM5-1B-T-Wix-ru:BF16
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:8080/v1 \ --custom-model-id "kaufkino/MiniCPM5-1B-T-Wix-ru:BF16" \ --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"
- Docker Model Runner
How to use kaufkino/MiniCPM5-1B-T-Wix-ru with Docker Model Runner:
docker model run hf.co/kaufkino/MiniCPM5-1B-T-Wix-ru:BF16
- Lemonade
How to use kaufkino/MiniCPM5-1B-T-Wix-ru with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull kaufkino/MiniCPM5-1B-T-Wix-ru:BF16
Run and chat with the model
lemonade run user.MiniCPM5-1B-T-Wix-ru-BF16
List all available models
lemonade list
MiniCPM5-1B-T-Wix-ru
⚠️ Экспериментальная версия. Учебный/исследовательский прогон без формальной оценки качества — метрики на бенчмарках не снимались (доступен только eval loss в tensorboard-логах обучения). Не предназначена для продакшена.
Русифицированная версия openbmb/MiniCPM5-1B: LoRA SFT на русскоязычном датасете t-tech/T-Wix (~461 тыс. диалогов, сабсеты general + reasoning + long_context; english_corpus исключён). Базовая модель официально поддерживает только английский и китайский — этот тюнинг адаптирует её к русскому языку.
Структура репозитория
| Путь | Содержимое |
|---|---|
/ (корень) |
merged-модель, bf16 safetensors — для transformers / vLLM |
/lora |
LoRA-адаптер (r=32) отдельно — для подключения к базовой модели через PEFT |
/gguf |
GGUF для llama.cpp / Ollama: F16, BF16, Q8_0 |
Запуск
transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "kaufkino/MiniCPM5-1B-T-Wix-ru"
model = AutoModelForCausalLM.from_pretrained(repo, torch_dtype="bfloat16", device_map="auto")
tokenizer = AutoTokenizer.from_pretrained(repo)
messages = [{"role": "user", "content": "Расскажи о Санкт-Петербурге"}]
inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
out = model.generate(inputs, max_new_tokens=512, temperature=0.7, top_p=0.95, do_sample=True)
print(tokenizer.decode(out[0][inputs.shape[1]:], skip_special_tokens=True))
У базовой модели есть гибридный thinking-режим (<think>…</think>), переключается параметром enable_thinking в apply_chat_template. Рекомендации базовой карточки: think — temperature 0.9 / top_p 0.95, no-think — temperature 0.7 / top_p 0.95.
llama.cpp
llama-cli -m minicpm5-1b-t-wix-ru-q8_0.gguf -cnv -p "Ты полезный ассистент."
Детали обучения
| Параметр | Значение |
|---|---|
| Метод | LoRA SFT (Unsloth 2026.7.3 + TRL SFTTrainer) |
| LoRA | r=32, alpha=64, dropout=0, все linear-проекции (q/k/v/o/gate/up/down) |
| Эпохи | 2 |
| Контекст | 8192 токенов, packing |
| Батч | 4 × grad_accum 8 = 32 |
| LR | 1e-4, cosine, warmup 3% |
| Оптимизатор | adamw_8bit, weight decay 0.01 |
| Точность | bf16 |
| Данные | T-Wix без english_corpus: |
Инфраструктура
Обучение проводилось на облачном GPU-сервере Selectel (реферальная ссылка) — 1× NVIDIA RTX 4090 24 ГБ, ~24 часа на 2 эпохи.
EN: Experimental Russian-language adaptation of MiniCPM5-1B via LoRA SFT (r=32, 2 epochs, 8192 ctx, packing) on the T-Wix dataset (~461k Russian dialogues). Repo contains merged bf16 safetensors (root), the LoRA adapter (/lora), and GGUF F16/BF16/Q8_0 (/gguf). No benchmark evaluation was performed — research artifact, not for production use.
- Downloads last month
- 124
Model tree for kaufkino/MiniCPM5-1B-T-Wix-ru
Base model
openbmb/MiniCPM5-1B