Instructions to use kaufkino/MiniCPM5-1B-Fable5-Thinking-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-Fable5-Thinking-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-Fable5-Thinking-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-Fable5-Thinking-T-Wix-ru") model = AutoModelForCausalLM.from_pretrained("kaufkino/MiniCPM5-1B-Fable5-Thinking-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-Fable5-Thinking-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-Fable5-Thinking-T-Wix-ru", filename="gguf/minicpm5-1b-fable5-twix-ru-f16.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-Fable5-Thinking-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-Fable5-Thinking-T-Wix-ru:F16 # Run inference directly in the terminal: llama cli -hf kaufkino/MiniCPM5-1B-Fable5-Thinking-T-Wix-ru:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf kaufkino/MiniCPM5-1B-Fable5-Thinking-T-Wix-ru:F16 # Run inference directly in the terminal: llama cli -hf kaufkino/MiniCPM5-1B-Fable5-Thinking-T-Wix-ru:F16
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-Fable5-Thinking-T-Wix-ru:F16 # Run inference directly in the terminal: ./llama-cli -hf kaufkino/MiniCPM5-1B-Fable5-Thinking-T-Wix-ru:F16
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-Fable5-Thinking-T-Wix-ru:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf kaufkino/MiniCPM5-1B-Fable5-Thinking-T-Wix-ru:F16
Use Docker
docker model run hf.co/kaufkino/MiniCPM5-1B-Fable5-Thinking-T-Wix-ru:F16
- LM Studio
- Jan
- vLLM
How to use kaufkino/MiniCPM5-1B-Fable5-Thinking-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-Fable5-Thinking-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-Fable5-Thinking-T-Wix-ru", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/kaufkino/MiniCPM5-1B-Fable5-Thinking-T-Wix-ru:F16
- SGLang
How to use kaufkino/MiniCPM5-1B-Fable5-Thinking-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-Fable5-Thinking-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-Fable5-Thinking-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-Fable5-Thinking-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-Fable5-Thinking-T-Wix-ru", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use kaufkino/MiniCPM5-1B-Fable5-Thinking-T-Wix-ru with Ollama:
ollama run hf.co/kaufkino/MiniCPM5-1B-Fable5-Thinking-T-Wix-ru:F16
- Unsloth Studio
How to use kaufkino/MiniCPM5-1B-Fable5-Thinking-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-Fable5-Thinking-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-Fable5-Thinking-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-Fable5-Thinking-T-Wix-ru to start chatting
- Pi
How to use kaufkino/MiniCPM5-1B-Fable5-Thinking-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-Fable5-Thinking-T-Wix-ru:F16
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-Fable5-Thinking-T-Wix-ru:F16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use kaufkino/MiniCPM5-1B-Fable5-Thinking-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-Fable5-Thinking-T-Wix-ru: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:8080/v1 hermes config set model.default kaufkino/MiniCPM5-1B-Fable5-Thinking-T-Wix-ru:F16
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use kaufkino/MiniCPM5-1B-Fable5-Thinking-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-Fable5-Thinking-T-Wix-ru: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:8080/v1 \ --custom-model-id "kaufkino/MiniCPM5-1B-Fable5-Thinking-T-Wix-ru: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"
- Docker Model Runner
How to use kaufkino/MiniCPM5-1B-Fable5-Thinking-T-Wix-ru with Docker Model Runner:
docker model run hf.co/kaufkino/MiniCPM5-1B-Fable5-Thinking-T-Wix-ru:F16
- Lemonade
How to use kaufkino/MiniCPM5-1B-Fable5-Thinking-T-Wix-ru with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull kaufkino/MiniCPM5-1B-Fable5-Thinking-T-Wix-ru:F16
Run and chat with the model
lemonade run user.MiniCPM5-1B-Fable5-Thinking-T-Wix-ru-F16
List all available models
lemonade list
v2: reasoning-SFT model card
Browse files|
@@ -19,33 +19,34 @@ tags:
|
|
| 19 |
|
| 20 |
# MiniCPM5-1B-Fable5-Thinking-T-Wix-ru
|
| 21 |
|
| 22 |
-
> ⚠️ **Экспериментальн
|
| 23 |
|
| 24 |
-
|
| 25 |
-
- **[GnLOLot/MiniCPM5-1B-Claude-Opus-Fable5-V2-Thinking](https://huggingface.co/GnLOLot/MiniCPM5-1B-Claude-Opus-Fable5-V2-Thinking)** — дистиллят Claude Opus/Fable5 (thinking, tool calling) на базе MiniCPM5-1B
|
| 26 |
-
- **T-Wix LoRA (r=32)** из [kaufkino/MiniCPM5-1B-T-Wix-ru](https://huggingface.co/kaufkino/MiniCPM5-1B-T-Wix-ru) — русификация на ~461k диалогов [t-tech/T-Wix](https://huggingface.co/datasets/t-tech/T-Wix)
|
| 27 |
|
| 28 |
-
|
|
|
|
| 29 |
|
| 30 |
## Наблюдаемое поведение (ручной смоук-тест, не бенчмарк)
|
| 31 |
|
| 32 |
-
**Что
|
| 33 |
-
-
|
| 34 |
-
- П
|
| 35 |
- Tool calling: корректно выбирает функцию и аргументы
|
|
|
|
| 36 |
|
| 37 |
**Известные дефекты:**
|
| 38 |
-
-
|
| 39 |
-
-
|
| 40 |
-
- Фактология на русском слабая (модель 1B + языковой перенос): для фактов используйте RAG
|
| 41 |
- Перевод EN→RU нестабилен
|
|
|
|
| 42 |
|
| 43 |
## Структура репозитория
|
| 44 |
|
| 45 |
| Путь | Содержимое |
|
| 46 |
|---|---|
|
| 47 |
-
| `/` |
|
| 48 |
| `/gguf` | GGUF: F16, Q8_0 |
|
|
|
|
| 49 |
|
| 50 |
## Запуск
|
| 51 |
|
|
@@ -59,12 +60,13 @@ tokenizer = AutoTokenizer.from_pretrained(repo)
|
|
| 59 |
messages = [{"role": "user", "content": "Реши: 17 * 23 = ?"}]
|
| 60 |
inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True,
|
| 61 |
return_tensors="pt", return_dict=True).to(model.device)
|
| 62 |
-
out = model.generate(**inputs, max_new_tokens=
|
| 63 |
-
do_sample=True, repetition_penalty=1.
|
| 64 |
print(tokenizer.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
|
| 65 |
```
|
| 66 |
|
| 67 |
-
Chat template (включая tools-формат) унаследован от дистиллята.
|
|
|
|
| 68 |
|
| 69 |
## Инфраструктура
|
| 70 |
|
|
@@ -72,4 +74,4 @@ Chat template (включая tools-формат) унаследован от д
|
|
| 72 |
|
| 73 |
---
|
| 74 |
|
| 75 |
-
**EN:**
|
|
|
|
| 19 |
|
| 20 |
# MiniCPM5-1B-Fable5-Thinking-T-Wix-ru
|
| 21 |
|
| 22 |
+
> ⚠️ **Экспериментальная модель.** Метрики не снимались (только ручной смоук-квиз). Не для продакшена.
|
| 23 |
|
| 24 |
+
Русскоязычная 1B-модель с работающим `<think>`-режимом. Получена в два этапа:
|
|
|
|
|
|
|
| 25 |
|
| 26 |
+
1. **Merge**: T-Wix LoRA (r=32, обучена на базовой `openbmb/MiniCPM5-1B` на ~461k русских диалогов [t-tech/T-Wix](https://huggingface.co/datasets/t-tech/T-Wix)) применена к дистилляту [GnLOLot/MiniCPM5-1B-Claude-Opus-Fable5-V2-Thinking](https://huggingface.co/GnLOLot/MiniCPM5-1B-Claude-Opus-Fable5-V2-Thinking) через `PeftModel` + `merge_and_unload()`.
|
| 27 |
+
2. **Reasoning-SFT (v2, текущая версия)**: merge дообучен LoRA (r=16, LR 2e-5, 1 эпоха) на reasoning-сабсете T-Wix — 31k примеров с русскими `<think>`-трейсами; управляющие суффиксы ` /think` из данных убраны, чтобы thinking стал поведением по умолчанию.
|
| 28 |
|
| 29 |
## Наблюдаемое поведение (ручной смоук-тест, не бенчмарк)
|
| 30 |
|
| 31 |
+
**Что работает:**
|
| 32 |
+
- `<think>` включается сам на задачах, где уместен (математика, рассуждения), думает на языке вопроса (RU-вопрос → русский трейс, EN → английский), закрывает блок и даёт ответ
|
| 33 |
+
- Пошаговая математика с самопроверкой внутри think
|
| 34 |
- Tool calling: корректно выбирает функцию и аргументы
|
| 35 |
+
- Беглый русский с хорошей структурой
|
| 36 |
|
| 37 |
**Известные дефекты:**
|
| 38 |
+
- На длинных выкладках think может не уложиться в маленький `max_new_tokens` — ставьте ≥1000–2000
|
| 39 |
+
- Фактология на русском слабая (модель 1B): для фактов используйте RAG
|
|
|
|
| 40 |
- Перевод EN→RU нестабилен
|
| 41 |
+
- Рекомендуется `repetition_penalty=1.1` (без него возможны циклы)
|
| 42 |
|
| 43 |
## Структура репозитория
|
| 44 |
|
| 45 |
| Путь | Содержимое |
|
| 46 |
|---|---|
|
| 47 |
+
| `/` | модель после reasoning-SFT, bf16 safetensors |
|
| 48 |
| `/gguf` | GGUF: F16, Q8_0 |
|
| 49 |
+
| `/lora` | reasoning-LoRA (r=16) отдельно — применима к merge-версии из истории коммитов |
|
| 50 |
|
| 51 |
## Запуск
|
| 52 |
|
|
|
|
| 60 |
messages = [{"role": "user", "content": "Реши: 17 * 23 = ?"}]
|
| 61 |
inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True,
|
| 62 |
return_tensors="pt", return_dict=True).to(model.device)
|
| 63 |
+
out = model.generate(**inputs, max_new_tokens=1500, temperature=0.5, top_p=0.95,
|
| 64 |
+
do_sample=True, repetition_penalty=1.1)
|
| 65 |
print(tokenizer.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
|
| 66 |
```
|
| 67 |
|
| 68 |
+
Chat template (включая tools-формат и `enable_thinking`) унаследован от дистиллята.
|
| 69 |
+
Принудительно выключить размышления: `enable_thinking=False` в `apply_chat_template`.
|
| 70 |
|
| 71 |
## Инфраструктура
|
| 72 |
|
|
|
|
| 74 |
|
| 75 |
---
|
| 76 |
|
| 77 |
+
**EN:** Russian 1B model with working think-mode: T-Wix Russian LoRA merged onto a Claude Opus/Fable5 distill, then SFT'd on the T-Wix reasoning subset (31k Russian think-traces, r=16, 1 epoch). Think auto-triggers on reasoning tasks in the question's language and closes properly; tool calling preserved. Known issues: weak Russian factual recall (use RAG), unstable EN→RU translation, use repetition_penalty=1.1 and max_new_tokens≥1000. Research artifact, no formal evals.
|