Text Generation
Transformers
Safetensors
Chinese
minicpm
tonebridge
buildsmall
chinese-correction
context-correction
hsk
finetuned
conversational
custom_code
Instructions to use Alphaplasti/ToneBridge-MiniCPM4.1-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Alphaplasti/ToneBridge-MiniCPM4.1-8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Alphaplasti/ToneBridge-MiniCPM4.1-8B", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Alphaplasti/ToneBridge-MiniCPM4.1-8B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Alphaplasti/ToneBridge-MiniCPM4.1-8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Alphaplasti/ToneBridge-MiniCPM4.1-8B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Alphaplasti/ToneBridge-MiniCPM4.1-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Alphaplasti/ToneBridge-MiniCPM4.1-8B
- SGLang
How to use Alphaplasti/ToneBridge-MiniCPM4.1-8B 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 "Alphaplasti/ToneBridge-MiniCPM4.1-8B" \ --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": "Alphaplasti/ToneBridge-MiniCPM4.1-8B", "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 "Alphaplasti/ToneBridge-MiniCPM4.1-8B" \ --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": "Alphaplasti/ToneBridge-MiniCPM4.1-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Alphaplasti/ToneBridge-MiniCPM4.1-8B with Docker Model Runner:
docker model run hf.co/Alphaplasti/ToneBridge-MiniCPM4.1-8B
File size: 1,376 Bytes
6204a10 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | # Training Data
This folder documents the task-specific datasets used to fine-tune
ToneBridge-MiniCPM4.1-8B.
The files are JSONL files in chat prompt/completion format.
## Files
| File | Rows | Purpose |
|---|---:|---|
| `hsk12_english_order_train.jsonl` | 1,800 | Training split for HSK 1/2-style sentences influenced by English word order. |
| `hsk12_english_order_valid.jsonl` | 200 | Validation split for the HSK 1/2 word-order task. |
| `context_tone_hsk3_train.jsonl` | 4,500 | Training split for HSK 1-3 context and tone adaptation. |
| `context_tone_hsk3_valid.jsonl` | 500 | Validation split for the HSK 1-3 context/tone task. |
## Dataset Format
Each row follows this structure:
```json
{
"prompt": [
{
"role": "system",
"content": "你是中文语境校对助手。只输出更合适的句子,不要解释。"
},
{
"role": "user",
"content": "上下文:...\n原句:...\n任务:请根据上下文把原句改成更合适的中文。/no_think"
}
],
"completion": [
{
"role": "assistant",
"content": "..."
}
]
}
```
## Notes
- The data is synthetic and task-specific.
- It is intended for beginner Mandarin correction and tone adaptation.
- The dataset was generated to reduce exact duplicate source/correction pairs.
- The data should not be treated as a general Chinese benchmark.
|