Instructions to use whcl412/LycheeAI-coder-2b-II-pro with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use whcl412/LycheeAI-coder-2b-II-pro with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("whcl412/LycheeAI-coder-2b-II-pro") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use whcl412/LycheeAI-coder-2b-II-pro with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "whcl412/LycheeAI-coder-2b-II-pro"
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "whcl412/LycheeAI-coder-2b-II-pro" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use whcl412/LycheeAI-coder-2b-II-pro with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "whcl412/LycheeAI-coder-2b-II-pro"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "whcl412/LycheeAI-coder-2b-II-pro" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "whcl412/LycheeAI-coder-2b-II-pro", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use whcl412/LycheeAI-coder-2b-II-pro with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "whcl412/LycheeAI-coder-2b-II-pro"
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 whcl412/LycheeAI-coder-2b-II-pro
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use whcl412/LycheeAI-coder-2b-II-pro with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "whcl412/LycheeAI-coder-2b-II-pro"
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 "whcl412/LycheeAI-coder-2b-II-pro" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
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 "whcl412/LycheeAI-coder-2b-II-pro" \
--custom-provider-id mlx-lm \
--custom-compatibility openai \
--custom-text-input \
--accept-risk \
--skip-healthRun OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"- LycheeAI-coder-2b-II-pro ยท MLX 4bit
- ไธญๆ
- English
LycheeAI-coder-2b-II-pro ยท MLX 4bit
v7 โโ ็จใ็ฒพ้ 1000 ๆก ร 1 epochใๆฟไปฃใๅ จ้ 5341 ๆก ร 0.22 epochใ๏ผ ้ชๆถ 26/27 ้่ฟ๏ผv6.1 ๆฏ 25/27๏ผใ
ๅบไบ MiniCPM5-2B ๅพฎ่ฐ็่ฝป้็ผ็จๅฉๆ ยท Apache 2.0 2B ๅๆฐ๏ผไธปๆๆฌๅฐๅทฅๅ ท่ฐ็จ
่ฟๆฏไธชไบบๅผๅ่ ็้กน็ฎ๏ผ2B ๅๆฐๆณจๅฎๅฎๅชๆฏไธช"ๆฌๅฐๅฐๅฉๆ"ใ ๅฎๆฏ 1B ็ๆด่ฝๅนฒ๏ผไฝ่ฏทๅซ็จ GPT / Claude / DeepSeek ็ๆ ๅ่ฆๆฑๅฎใ
ๅฎๆๅคง็็จๅคๆฏ๏ผ่ทๅจไฝ ่ชๅทฑ็ๆบๅจไธ๏ผไธ็จ่็ฝ๏ผ่ฝ่ฐๅทฅๅ ท๏ผๅๅบ้ฃๅฟซใ
ๆฌไปๅบๆฏ MLX 4bit ้ๅ็ๆฌ๏ผ1.4 GB๏ผApple Silicon ไธๅผ็ฎฑๅณ็จใ
ๅไธช็ๆฌ๏ผๆ้่ฆ้๏ผ
| ็ๆฌ | ไฝ็งฏ | ็จๅจไปไนๅบๆฏ |
|---|---|---|
| MLX 4bit๏ผๆฌไปๅบ๏ผ | 1.42 GB | Mac ไธๆฅๅธธ่ท๏ผๆ็ๅ ๅญใๆๅฟซ |
| MLX ๆ ๆ bf16 | 5.03 GB | ่ฆ่ดจ้ๅบๅ / ไบๆฌก้ๅ / ็ปง็ปญๅพฎ่ฐ |
| -f16 | 5.03 GB | ๅไธ๏ผๅไธไปฝๆ้๏ผๆนไพฟ transformers ็จๆทๆพ๏ผ |
| GGUF | 1.45 / 2.50 / 4.69 GB | Ollamaใllama.cpp |
MLX ๆ ๆ็๏ผbf16๏ผๆฏ็ป"่ฆๅจๅฎ่บซไธๅๅ ๅทฅ"็ไบบ็จ็๏ผ4bit ๆฏๆๆ็๏ผไธ่ฝไฝไธบไบๆฌก้ๅๆ็ปญ่ฎญ็ๅบ็กใ ๅฎๅ
-f16ไปๅบๆฏๅไธไปฝๆ้๏ผๅญ่็ธๅ๏ผ๏ผไธคไธชๅๅญๅชๆฏไธบไบ่ฎฉ MLX ็จๆทๅ transformers ็จๆท้ฝ่ฝๆพๅฐใ ๆ ผๅผๆฏๆ ๅ safetensors๏ผMLX ๅ transformers ้ฝ่ฝ็ดๆฅๅ ่ฝฝใ
ไธญๆ
่ฟไธ็ๅไบไปไน
ไธไธ็๏ผ1b-II๏ผๆๅคง็็ญๆฟๆฏๅทฅๅ ท่ฐ็จๅฎๅ จไธไผโโ่ฎญ็ปๆฐๆฎ้ไธๆกๅทฅๅ ทๆ ทๆฌ้ฝๆฒกๆใ่ฟไธ็ไธ้จ่กฅไธไบ่ฟๅ๏ผ
| ่ฝๅ | 1b-II | 2b-II-pro |
|---|---|---|
| ๅทฅๅ ท่ฐ็จๆ ผๅผ | โ ๅ จ้ใๅญๆฎต็ผ้ | โ ่ฃธ JSON๏ผๆ ผๅผ็จณๅฎ |
| ๅๆญฅ่ฐ็จ | โ | โ |
| ๅคๆญฅ่ฐ็จ | โ | โ |
| ๆ็ปไธ่ฏฅๅ็ไบ | โ ๏ธ ๆถๅฅฝๆถๅ | โ |
| ็ปๆ่งฃ่ฏป | โ | โ |
ๅบๅบงๆขไบ๏ผไป MiniCPM5-1B ๆขๆ MiniCPM5-2B๏ผ้ขๅฃๆบ่ฝ๏ผApache 2.0๏ผ512K ไธไธๆ๏ผใ
ๅฟซ้ๅผๅง
MLX๏ผApple Silicon๏ผๆฌไปๅบ๏ผ
pip install mlx-lm
# ็ดๆฅๅ ่ฝฝ๏ผ4bit๏ผ1.4 GB๏ผ
python -m mlx_lm.generate \
--model whcl412/LycheeAI-coder-2b-II-pro \
--prompt "ๅธฎๆๅไธชๅฟซ้ๆๅบ"
# ่ตทไธช OpenAI ๅ
ผๅฎน็ๆๅก
python -m mlx_lm.server --model whcl412/LycheeAI-coder-2b-II-pro --port 8080
่ฆๅจ MLX ไธ็จๆ ๆ็๏ผไบๆฌก้ๅใ็ปง็ปญๅพฎ่ฐใ่ฆ่ดจ้ๅบๅ๏ผ๏ผๆๆจกๅๅๆขๆ
whcl412/LycheeAI-coder-2b-II-pro-MLX-bf16ๅณๅฏ๏ผ5.03 GB๏ผMLX ็ดๆฅๅ ่ฝฝ๏ผใ ๆๅทฅๆผ prompt ๆถ่ฎฐๅพๅฅ chat template ๅนถไผenable_thinking=False๏ผๅฆๅไผๅค่ฏปไนฑ็ ใ
transformers
ๆฌไปๅบๆฏ MLX 4bit ๆ ผๅผ๏ผtransformers ไธ่ฝ็ดๆฅๅ ่ฝฝใ
้่ฆ HF safetensors ่ฏท็จๆ ๆ็ โ whcl412/LycheeAI-coder-2b-II-pro-MLX-bf16๏ผๆ็ญไปท็ -f16๏ผใ
Ollama๏ผGGUF๏ผ
ๅทฒๅๅธ โ whcl412/LycheeAI-coder-2b-II-pro-GGUF
ไธๆกฃๅฏ้๏ผq4_k_m๏ผ1.45 GiB๏ผ/ q8_0๏ผ2.50 GiB๏ผๆจ่๏ผ/ f16๏ผ4.69 GiB ๆ ๆ๏ผใ
ไปๅบ้ๅธฆ Modelfile๏ผไธ่ฝฝๅ ollama create ๅณๅฏ็จใๅฝๅ
ๅฏ็จ ModelScope ้ๅใ
โ ๏ธ ๆณจๆ๏ผOllama ็่ชๅจ tool_calls ่งฃๆๅฏน่ฟไธชๅฐๆจกๅไธๅฏ้ โโๅฎๆฏๆใ็ดๆฅ่พๅบ JSONใ่ฎญ็ป็๏ผไธๅธฆ่ฟ่กๆถๆๆ็ๅ
่ฃนๆ ็ญพใ็ไบง็ฏๅข่ฏทไป content ้่ชๅทฑ่งฃๆ JSON๏ผ่ฏฆ่ง GGUF ไปๅบ READMEใ
ๅทฅๅ ท่ฐ็จ
่พๅบๆ ผๅผ
ๅฎ่พๅบ็ๆฏ่ฃธ JSON๏ผOpenAI function calling ้ฃๆ ผ๏ผ๏ผไธๅธฆไปปไฝๅ ่ฃน๏ผ
{"name": "get_weather", "arguments": {"city": "ๅไบฌ"}}
ๆฒกๆ ```json ไปฃ็ ๅๅดๆ ใๆฒกๆ** <tool_call> ๆ ็ญพใๆฒกๆ**"ๅฅฝ็ๆๆฅ่ฐ็จๅทฅๅ
ท"่ฟ็งๆ็ฝใ
ๅๆญฅ่ฐ็จ
system: ไฝ ๆฏ LycheeAI-coder-2b-II-proใๅฏไปฅไฝฟ็จๅทฅๅ
ทๆฅๅธฎๅฉ็จๆทใ
ๅฏ็จๅทฅๅ
ท๏ผ
- get_weather(city: string): ๆฅ่ฏขๆๅฎๅๅธ็ๅคฉๆฐ
user: ๅไบฌไปๅคฉๅคฉๆฐๆไนๆ ท๏ผ
่พๅบ๏ผ
{"name": "get_weather", "arguments": {"city": "ๅไบฌ"}}
ๅคๆญฅ่ฐ็จ๏ผๆไพ่ตๆถๅช่พๅบ็ฌฌไธไธช๏ผ
้ฎ"ๅไบฌไปๅคฉ้ๅๅบ้จๅ"๏ผๅฎ้่ฆๅ ๆฅๅคฉๆฐๅๅคๆญ๏ผๆญคๆถๅช่พๅบ็ฌฌไธๆญฅ๏ผ
{"name": "get_weather", "arguments": {"city": "ๅไบฌ"}}
ไฝ ๆๅทฅๅ ท็ปๆๅๅๅป๏ผๅฎๅ็ปง็ปญใๅฎฟไธป้่ฆๅพช็ฏ้ฉฑๅจ๏ผ่งฃๆ โ ๆง่ก โ ๅๅ็ปๆ โ ๅ่งฃๆใ
ๅฎๅ จ็ฌ็ซ็่ฐ็จไผๅนถๅ่พๅบ
ๅๆถๆฅๅไบฌๅไธๆตท๏ผๅฎไผไธๆฌก็ปไธค่ก๏ผ
{"name": "get_weather", "arguments": {"city": "ๅไบฌ"}}
{"name": "get_weather", "arguments": {"city": "ไธๆตท"}}
่ฏฅๆ็ปๆถไผๆ็กฎๆ็ป
ไธๆฏๆๆ่ฏทๆฑ้ฝ่ฐๅทฅๅ ทใ่ถ ๅบ่ฝๅๆไธๅ่ง็๏ผๅฎไผ่ฏดๆๅๅ ๅนถ็ปๆฟไปฃๆนๆก๏ผไธไผ็กฌ็ผไธไธชๅทฅๅ ท่ฐ็จ็ณๅผ่ฟๅปใ
ๅฎฟไธปๆฅๅ ฅๆณจๆ
ๆ ผๅผไธๆฏ้็จ็
่ฟไธ็นๅพ้่ฆ๏ผไธๅ agent ๆกๆถ็ๅทฅๅ ท่ฐ็จๆ ผๅผไธไธๆ ทใ
| ๆกๆถ/ๆจกๅ | ๆ ผๅผ |
|---|---|
| OpenAI / ๅคงๅคๆฐๆฌๅฐๆกๆถ | ่ฃธ JSON {"name":..., "arguments":{...}} |
| Anthropic / Claude Tools | XML ๆ ็ญพ <function_calls><invoke name="..."> |
| ้จๅๅฝไบงๆจกๅ | <tool_call> ่ชๅฎไนๆ ็ญพๅ
JSON |
| MCP | ไผ ่พๅฑๅ่ฎฎ๏ผๅ ้จ้ๅธธ่ฟๆฏ JSON-RPC |
ๅฎ้ป่ฎค่พๅบ่ฃธ JSONใๅฆๆไฝ ็ๅฎฟไธป้่ฆๅซ็ๆ ผๅผ๏ผๅจ system ้ๆ็กฎๅ่ฏๅฎ๏ผๅฎไผๆไฝ ่ฏด็ๆฅใ
ไปไนๆถๅ็ปๅทฅๅ ท๏ผไปไนๆถๅๅซ็ป
ๅฎ่ฎญ็ปๆถ่ง่ฟๅ็ฑปๅบๆฏ๏ผ่กไธบๆฏๅๅผ็๏ผ
| ็ฑปๅซ | ไพๅญ | ๅฎ็่กไธบ |
|---|---|---|
| ๅทฅๅ ท่ฝ็ฎๅบ็กฎๅฎ็ปๆ | 789*123ใ1000 ็พๅ
ๆขไบบๆฐๅธ |
่ฐๅทฅๅ ท |
| ่ฝๅ/ไผฆ็ไธๅ ่ฎธ | ่ฎขๆบ็ฅจใ็ ด่งฃ WiFiใไผช้ ่ฏๆ | ๆ็กฎๆ็ป + ็ปๆฟไปฃๆนๆก |
| ๅทฅๅ ทๅธฎไธไธๅฟ | ไปไนๆฏ้ๅฝใๅไบๅๆฅๆพ | ็ดๆฅๅ็ญ |
| ๅฎฟไธปๆฒกๆๅทฅๅ ท | ็บฏ่ๅคฉ่ฝฏไปถ้็"ๅธฎๆๆไธไธ" | ่ฏดๆๆฒกๆ่ฟไธช่ฝๅ๏ผไธ็กฌ่ฐ |
ๆๅไธ่กๅพๅ ณ้ฎ๏ผๅฆๆไฝ ็ๅฎฟไธปๆฏ็บฏ่ๅคฉ๏ผๅพฎไฟกใๅฎขๆๆบๅจไบบ๏ผ๏ผไธ่ฆ็ปๅฎไปปไฝๅทฅๅ ทๅฎไน๏ผๅฎไผ่ช็ถๅฐ่ฏด"ๆ่ฟ่พนๆฒกๆ่็ฝ่ฝๅ"๏ผ่ไธๆฏๅไธๅจๅฎฟไธปๆฅไธไฝ็ JSONใ
ๅฆๆไฝ ็ปๅฎ calculate ๅดไธๅธๆๅฎ็ฎ็ฎๅๅ ๅ๏ผๅฏไปฅๅจ system ้่ฏดๆใ้ป่ฎค่กไธบๆฏ"็ฎๆฏไผๅ
็จๅทฅๅ
ท"ใ
่ฎญ็ปไฟกๆฏ
| ้กน | ๅผ |
|---|---|
| ๅบๅบง | openbmb/MiniCPM5-2B |
| ๆนๆณ | LoRA๏ผrank 8๏ผdropout 0๏ผscale 20๏ผ16 ๅฑ๏ผ |
| ๆฐๆฎ้ | 980 ๆก๏ผ็ฒพ้๏ผv7๏ผ |
| ่ฝฎๆฌก | 1 epoch๏ผ490 ๆญฅ๏ผ |
| ๅญฆไน ็ | 5e-5๏ผadam๏ผ |
| batch / seq | 2 / 2048 |
| ๆกๆถ | MLX-LM 0.31.3 |
| ๆฌ็ๆฌ้ๅ | 4bit affine๏ผgroup_size 64๏ผ4.501 bits/weight๏ผ |
ๆฐๆฎๆๆ๏ผv6 ็ณปๅ๏ผ
v6 ๆฏๅจ v5 ๅบ็กไธๅ็ๅฎๅไฟฎๅค๏ผๅ ฑๅๆน๏ผ
| ๆนๆฌก | ๆกๆฐ | ่งฃๅณไปไน |
|---|---|---|
| v5 ๅบ็ก | 4,526 | v6.1 ่ตท็น๏ผv5 + OOD ๅ็๏ผ |
| v6.1 | 4,526 | ไฟฎ v6 ็ โฅโจ ้ๆญฅ้กน๏ผOOD ่กฅๅผบ |
| v6.2 | 4,778 | ่กฅ็ฎๆฏๆณๅ๏ผK6๏ผ252 ๆก็จๅบๅ็ๆ๏ผ |
| v6.3 | 5,093 | ่กฅ่ฝๅ่พน็ + ็ปๆๆถๅฐพ๏ผK7๏ผ315 ๆก๏ผ |
| v6.4 | 5,341 | ่กฅ่ฟ็ฎ็ฑปๅๅ่กก๏ผK8๏ผ248 ๆก๏ผ |
ๅๅธ็ๆฏ v6.1๏ผไธๆฏ v6.4๏ผใๅๅ ่งไธ้ข"ๅ ณไบ่ฟญไปฃ"ใ
ไธ็ฑป่กไธบไธฅๆ ผๅบๅ
่ฟๆฏ่ฎญ็ปไธญๆๅฎนๆๆๆทท็ๅฐๆน๏ผ
| ็ฑปๅซ | ไพๅญ | ๆญฃ็กฎ่กไธบ |
|---|---|---|
| ๅทฅๅ ท่ฐ็จ | 789*123 |
่ฐ calculate |
| ็ๆ็ป๏ผ่ฝๅ/ไผฆ็ไธๅ ่ฎธ๏ผ | ่ฎขๆบ็ฅจใ็ ด่งฃ WiFi | ่ฏดไธๅ + ็ปๆฟไปฃๆนๆก |
| ๆ ้ๅทฅๅ ท | ไปไนๆฏ้ๅฝใๅไบๅๆฅๆพ | ็ดๆฅๅ็ญ๏ผไธๆๅทฅๅ ท |
ๆททไธบไธ่ฐไผๅฏผ่ดๆจกๅๆๆญฃๅธธๆ้ฎไนๅฝๆ่ฆๆ็ป็ไบโโ่ธฉ่ฟ่ฟไธชๅใ
่ฝๅ่พน็
่ฝๅ๏ผ
- ๅไปฃ็ ใ่ฐ bugใ่งฃ้ๆๆฏๆฆๅฟต
- ๅๆญฅ / ๅคๆญฅๅทฅๅ ท่ฐ็จ๏ผ่ฃธ JSON๏ผ
- ๆ็ป่ฝๅ่ๅดๅคๆไธๅ่ง็่ฏทๆฑ
- ่งฃ่ฏปๅทฅๅ ท่ฟๅ็ปๆ
- ไธญๆ / ่ฑๆ / ็ฒค่ฏญ
ไธๆ ้ฟ๏ผ
- ๅคๆๅคๆญฅๆจ็๏ผ2B ๅฎน้้ๅถ๏ผ
- ่ถ ้ฟไธไธๆ๏ผ่ฝ็ถๅบๅบงๆฏๆ 512K๏ผไฝๅฎ้ ้ฟๆ่กจ็ฐๆฒกๆต๏ผ
- ๆ ๅทฅๅ
ทๆถ็็ฎๆฏ๏ผไผ็ฎ้๏ผ่ฏท็ป
calculateโโ่งไธ้ข"ๅทฒ็ฅ้ฎ้ข"๏ผ - ่ช็งฐ่บซไปฝ็ OOD ๅบๆฏ๏ผ่งไธ้ข"ๅทฒ็ฅ้ฎ้ข"๏ผ
โ ๏ธ ๅทฒ็ฅ้ฎ้ข
1. ๆ ๅทฅๅ ทๆถไผๅฟ็ฎ๏ผ่ไธ็ฎ้
่ฟๆฏๅฝๅๆๅฎ้ ็็ญๆฟใๅฎๆต๏ผ
1234 + 5678 = 2000 (ๆญฃ็กฎ 6912)
35 ** 2 = 70 (ๆญฃ็กฎ 1225)
13.5 ร 4 = 7.8 (ๆญฃ็กฎ 54)
199 ร 257 = 40043 (ๆญฃ็กฎ 51143)
ๆ นๅ ๏ผๅ่ฟๅฏน็ งๅฎ้ช็กฎ่ฎค๏ผ๏ผๆจกๅๆฏๆ่ฟ็ฎ็ฑปๅๅณๅฎ่ฐไธ่ฐๅทฅๅ ท็๏ผ่่ฟ่ท่ฎญ็ปๆฐๆฎ้ๅ็ฑปๅ็ๆ ทๆฌ้ๅฎๅ จๅฏนๅบใ
| ่ฟ็ฎ็ฑปๅ | ่ฎญ็ปๆ ทๆฌ้ | ่กไธบ |
|---|---|---|
ไนๆณ * |
432 | โ ่ฐๅทฅๅ ท |
ๅ ๆณ + |
86 | โ ๅฟ็ฎ |
ๅน ** |
61 | โ ๅฟ็ฎ |
| ๅฐๆฐ | 61 | โ ๅฟ็ฎไธ็ฎ้ |
ๅๆณ - |
49 | โ ๅฟ็ฎ |
ไธๆฏ"ๅญ็ฌฆไธฒ่ฎฐๅฟ"๏ผ่ง่ฟ 38% vs ๆฒก่ง่ฟ 50%๏ผๅทฎไธๅค๏ผ๏ผไนไธๆฏ"้พๅบฆ"๏ผ1234+5678 ไนๅจๅฟ็ฎ๏ผใ
่ง้ฟๆนๆณ๏ผ**ๅช่ฆๆถๅ็ฎๆฏ๏ผๅฐฑๅจ system ้ๆ็กฎ่ฆๆฑ"ไปปไฝ่ฎก็ฎ้ฝๅฟ ้กป็จ calculate"**๏ผ
้่ฆไปปไฝๆฐๅผ่ฎก็ฎๆถ๏ผไธๅพ่ฐ็จ calculate๏ผไธ่ฆ่ชๅทฑๅฟ็ฎใ
่ฟๆกๆไปคๅฎๆตๆๆใv6.4 ่ฏๅพ็จๆฐๆฎไฟฎๆญฃ๏ผK8๏ผๆ่ฟ็ฎ็ฑปๅๅ่กก๏ผ๏ผไฝๅผๅ ฅไบๆดไธฅ้็ๅฏไฝ็จ๏ผๅทฅๅ ท่ฐ็จ็ไป 60%+ ๅดฉๅฐ 12%๏ผ๏ผๆไปฅๅๅธไบ v6.1 ่ๆฒกๆๅๅธ v6.4ใ
2. ่บซไปฝ้ฎ็ญๅจใๅฎฟไธปๆไพ็้็จ systemใไธไผๅบ้
ๅฆๆไฝ ็ system prompt ๆฏ่ฟๆ ท๏ผๅพๅค agent ๆกๆถ็้ป่ฎคๅๆณ๏ผ๏ผ
ไฝ ๆฏไธไธชAIๅฉๆ๏ผๅฏไปฅไฝฟ็จๅทฅๅ
ทๆฅๅธฎๅฉ็จๆทใ
ๅฏ็จๅทฅๅ
ท๏ผ
- get_weather(city: str): ๆฅ่ฏขๆๅฎๅๅธ็ๅคฉๆฐ
...
้่ฆ่ฐ็จๅทฅๅ
ทๆถ๏ผ่ฏท็ดๆฅ่พๅบ JSON๏ผ{"name": "ๅทฅๅ
ทๅ", "arguments": {...}}
้ฃไน้ฎ"ไฝ ๅซไปไนๅๅญ"ๆถ๏ผๅฎๅฏ่ฝไนฑ็ญ๏ผๅฎๆตๅบ็ฐ่ฟ"ๆๅซ Qwen"๏ผใ
ไฝๅฆๆ system ๆฏๅฎ่ฎญ็ปๆถ็ๆ ผๅผ๏ผๅฐฑๅฎๅ จๆญฃๅธธ๏ผ
ไฝ ๆฏ LycheeAI-coder-2b-II-pro๏ผ็ฑ MiniCPM5-2B ้่ฟ LoRA ๅพฎ่ฐ่ๆฅ็็ผ็จๅฉๆใ
โ ็ญ"ๆๅซ LycheeAI-coder-2b-II-pro๏ผ็ฑ MiniCPM5-2B ๅพฎ่ฐ่ๆฅ็็ผ็จๅฉๆใ"
ๅๅ ๏ผ่ฎญ็ปๆฐๆฎ็่บซไปฝๆ ทๆฌ้๏ผsystem ๅ จ้จๆฏไธ้ข็ฌฌไบ็งใๆจกๅๆฒก่ง่ฟ"้็จ system + ๅทฅๅ ทๅ่กจ + ้ฎ่บซไปฝ"่ฟไธช็ปๅ๏ผๆฒกๆ่ฎญ็ปไฟกๅทใ
่ง้ฟๆนๆณ๏ผๆฅๅ ฅๆถๆ่บซไปฝๅ่ฟ systemใๆฏๅฆ๏ผ
ไฝ ๆฏ LycheeAI-coder-2b-II-proใๅฏไปฅไฝฟ็จๅทฅๅ
ทๆฅๅธฎๅฉ็จๆทใ
ๅฏ็จๅทฅๅ
ท๏ผ
...
3. ไธค็ง system ็ปๆ็ไธ่ดๆง
่ฎญ็ปๆฐๆฎๆททไบไธค็ง็ปๆ๏ผๅทฅๅ
ทๅฎไนๆพ system / ๆพ userใๅฎๆตไธค็ง้ฝ่ฝ็จ๏ผไฝๆพ system ๆด็จณ๏ผ่ฟไนๆฏไธปๆต agent ๆกๆถ็ๅๆณ๏ผใ
4. ๅทฅๅ ท็ปๆๆไธค็ง็ปๆ๏ผๅฎฟไธป้่ฆ็ฅ้
ๆจกๅ่ง่ฟไธค็งไธไธๆ๏ผไธค็ง้ฝ่ฎค๏ผ
็ปๆ A โโ ๆๆ็กฎ็่ฐ็จ่ฝฎ๏ผไธปๆต agent ๆกๆถ็ๆ ทๅญ๏ผ๏ผ
user: 789*123 ็ญไบๅคๅฐ
assistant: {"name": "calculate", "arguments": {"expression": "789*123"}}
user: [ๅทฅๅ
ท่ฐ็จ็ปๆ] {"name": "calculate", "result": {"value": 97047}}
assistant: 789 ร 123 = **97047**ใ
็ปๆ B โโ ๅฎฟไธปๅทฒไปฃไธบๆง่ก๏ผ็ดๆฅๆ็ปๆ็ปๆจกๅ๏ผ67 ๆกๆฉๆๆ ทๆฌ็จ่ฟไธช๏ผ๏ผ
user: ่ทไธไธ่ฟๆฎตไปฃ็
[ๅทฅๅ
ท่ฐ็จ็ปๆ] {"exit_code": 0, "stdout": "45\n"}
assistant: ๆง่กๆๅ๏ผ่พๅบ `45`ใ
ๅบๅซ๏ผ็ปๆ B ็็ปๆ**ไธๅธฆ name**๏ผๅ ไธบไธไธๆ้ๆฌๆฅๅฐฑๆฒกๆ่ฐ็จ่ฝฎ๏ผๅทฅๅ
ท่บซไปฝไป system ็ๅทฅๅ
ทๅ่กจๅ้ฎ้ขๆฌ่บซๅฐฑ่ฝๆจๆญใ
ๅปบ่ฎฎ๏ผๆญฃๅธธๆฅๅ ฅ็จ็ปๆ A๏ผๅค่ฝฎๅพช็ฏ๏ผใๅชๆๅจไฝ ๅทฒ็ป็ฅ้่ฏฅ่ฐไปไนใๅชๆณ่ฎฉๆจกๅ่งฃ่ฏป็ปๆๆถ๏ผๆ็จ็ปๆ Bใ
v7 ๅไบไปไน๏ผ็จใ็ฒพ้ใไปฃๆฟใๅ จ้ใ
่ตทๅ ๏ผไธไธช 500 ๆญฅ็็กฌ็บฆๆ
ๆฐ็่ฎญ็ป่ขซ้ๅถๅจ 500 ๆญฅไปฅๅ
ใ่ ๆญฅๆฐ = ceil(ๆกๆฐ / batch_size)๏ผbatch=2 โ ๆๅค 1000 ๆกใ
ๅๆฅ็ๆฐๆฎ้ๆ 5,341 ๆก๏ผไธคๆก่ทฏ๏ผ
| ๆนๆก | ๆๆ |
|---|---|
| 5,341 ๆก ร 250 ๆญฅ | ๆฏๆกๆ ทๆฌๅช่ขซ่งๅฐ 0.22 ๆฌก๏ผ22% epoch๏ผ |
| 980 ๆก ร 490 ๆญฅ | ๆฏๆก้ฝ่ขซๅฎๆดๅญฆๅฐ 1 ๆฌก๏ผ100% epoch๏ผโ |
ไธบไปไน็ฌฌไบๆกๆดๅฅฝโโไธๅชๆฏ"ๅญฆๅพๅค"๏ผ่ๆฏ่กไธบๆฏๆงๆๆ ทๆฌๆกๆฐๅ ๆ๏ผ
ๅๆฐๆฎ้้ 51.4% ๆฏๅ่ฝฎ็บฏๆๆฌ๏ผๆฎ้่ๅคฉ๏ผ๏ผๅฎไปฌๆๆขฏๅบฆๆๅ"็บฏ่ๅคฉ"๏ผ่"ๅค่ฝฎๅฎๆด้พ่ทฏ"๏ผ่ฐ็จโๆฟ็ปๆโๆถๅฐพ๏ผๅฎฟไธป็ๅฎไบคไบๅฝขๆ๏ผๅชๅ 10.7%ใๅจ 22% epoch ไธ๏ผๆฏๆกๅค่ฝฎๆ ทๆฌๅนณๅๅช่ดก็ฎ 0.22 ๆฌกๆดๆฐโโๆ นๆฌๅญฆไธๅฐใ
้ๆฐ้ ๆฏ๏ผๆ่กไธบ้่ฆๆง๏ผ่ไธๆฏๆๅๅงๆฏไพ
| ็ฑปๅซ | ๅๆฐๆฎ้ | v7 ็ฒพ้ | ่ฏดๆ |
|---|---|---|---|
| ๅค่ฝฎ้พ่ทฏ๏ผ่ฐ็จโ็ปๆโๆถๅฐพ๏ผ | 569 | 201๏ผ20.5%๏ผ | ๆๅผ้ฑ๏ผๅฎฟไธป็ๅฎ่ทฏๅพ |
| ๅทฅๅ ทๅจ user + ่ฐ็จ | 780 | 243๏ผ24.8%๏ผ | ๅ ๅๅง 66%๏ผ็ปๆไธ่ฝไธข |
| ๆๅทฅๅ ทไฝไธ่ฐ | 819 | 216๏ผ22.0%๏ผ | ๅไฝ"ๆ็่ฐๅทฅๅ ท"็ๅ้ขๆ ทๆฌ |
| ๅทฅๅ ทๅจ system + ่ฐ็จ | 397 | 179๏ผ18.3%๏ผ | ไธป็ปๆ |
| ๅ่ฝฎ็บฏๆๆฌ | 2,746 | 130๏ผ13.3%๏ผ | ไป 51.4% ็ ๅฐ 13.3% |
็ฎๆฏ้ฎ้ข็็ๆญฃ่งฃๆณ๏ผไธคๅคดๅคน
ไนๅ็ๅๆๅทฒ็ปๆพๅฐๆ นๅ โโไนๆณ็ฌๅ 50.5% ็ๆ ทๆฌ๏ผๆไปฅๆจกๅๅญฆๅฐ็ๆฏ"ไนๆณ โ ่ฐๅทฅๅ ท"่ฟไธช็นไพ๏ผ่ไธๆฏ"็ฎๆฏ โ ่ฐๅทฅๅ ท"่ฟไธช้ๅใ
v6.4 ่ฏ่ฟๅชๅ"่กฅ"๏ผ่กฅ 248 ๆก็จ็ผบ็ฑปๅ๏ผ๏ผ็ปๆ้ ๆฏๅ่ๆดๅทฎ๏ผ่ฟๆๅทฅๅ ท่ฐ็จ็ไป 60%+ ็ ธๅฐ 12%ใ
v7 ็จไธคๅคดๅคน๏ผ
ไธๅคด่กฅ็จ็ผบ๏ผK9 ็ๆ 90 ๆก๏ผๆ็จ็ผบๅบฆๅ ๆ๏ผๅฐๆฐๅ ๆณๆ็ผบ โ ่กฅๆๅค๏ผ
ไธๅคดๅ่ฟๅฉ๏ผๅฏนๅบ็บฟ้่ถ
้็ไนๆณๆ ทๆฌไธ้ๆ ท๏ผๅ ๆ 48 ๆก
็ปๆโโไนๆณๅ ๆฏ **50.5% โ 20.0%**๏ผไธไธช่ฟ็ฎ็ฑปๅ็ๆ็ญ/ๆๅทๅทฎ่ทไป 30.5 ๅ้ๅฐ 2.4 ๅ๏ผ
| ่ฟ็ฎ็ฑปๅ | v6.1 | v7 |
|---|---|---|
| ไนๆณ | 244๏ผ50.5%๏ผ | 81๏ผ20.0%๏ผ |
| ๅน | 44๏ผ9.1%๏ผ | 66๏ผ16.3%๏ผ |
| ้คๆณ | 53๏ผ11.0%๏ผ | 62๏ผ15.3%๏ผ |
| ๅ ๆณ | 71๏ผ14.7%๏ผ | 54๏ผ13.3%๏ผ |
| ๅฐๆฐไนๆณ | 31๏ผ6.4%๏ผ | 47๏ผ11.6%๏ผ |
| ๅๆณ | 31๏ผ6.4%๏ผ | 42๏ผ10.4%๏ผ |
| ๅฐๆฐๅ ๆณ | 8๏ผ1.7%๏ผ | 35๏ผ8.6%๏ผ |
็ดๆฅๆๆ๏ผv7 ไฟฎๅฅฝไบไธคไธช้ฟๆๅญๅจ็้ชๆถๅคฑ่ดฅ้กนโโโ b ็ฌฌไบ้็ฎๆฏ้ขใโงb ๅค่ฝฎ่ฟฝ้ฎใ
ไฟฎๆไธไธชๆบๆฐๆฎ็ผบ้ท๏ผๅทฅๅ ทๅๅนป่ง
่ดจๆฃๆถๅ็ฐ 9 ๅค่ช็ธ็็พ็ๆ ทๆฌ๏ผsystem ้ๅชๅฎไนไบ calculate๏ผๆจกๅๅดๅป่ฐ read_file / get_weatherใ
ๆ นๅ ๅจๆฐๆฎ็ๆ่ๆฌ๏ผใๅค่ฝฎ่ฟฝ้ฎใ้ฃๆน่ฝจ่ฟน้ๆไบๆฏๆฅๅคฉๆฐใ่ฏปๆไปถ๏ผไฝ system ่ขซๅๆญปๅชๅฎไน calculateใ**่ฟ็ญไบๅจๆๆจกๅ"่ฐ็จๆฒกๅฎไน็ๅทฅๅ
ท"**ใ
ไฟฎๆณ๏ผๅ ๆซ่ฝจ่ฟนๅฎ้ ่ฐ็จไบๅชไบๅทฅๅ ท๏ผๅชๅฎไน้ฃไบใ
ไฝไฟฎๅฎๅ็ฐๆฐ้ฎ้ข๏ผใ่ง่ฟ โฅ3 ็งๅทฅๅ ทใ็ๆ ทๆฌไป 56 ๆกๆๅฐ 0 ๆกโโๆจกๅๅคฑๅปไบใๅจๅคไธชๅ้้ๆๅฏน็ใ่ฎญ็ปไฟกๅทใไบๆฏๅๅ ไบๅนฒๆฐๅทฅๅ ท๏ผ2/3 ็ๆ ทๆฌๆบๅ ฅ 1~3 ไธชๆ ๅ ณๅทฅๅ ท๏ผไฝไธๆบ
calculate๏ผ๏ผๆขๅคๅฐ 24 ๆกใๆ่ฎญ๏ผไฟฎไธไธช้ฎ้ขๅพๅฎนๆๅธฆๅบๅฆไธไธชใๆฏๆฌกไฟฎๆนๅๅฟ ้กป้ๆฐๅๅ จ้่ดจๆฃใ
ไธไธชๅฝฑๅๆทฑ่ฟ็ๆนๆณ่ฎบไฟฎๆญฃ๏ผ็จณๅฎ้ๆ ท
็ฌฌไธๆฌกๅฐ่ฏไฟฎ้ชๆถ โฅ ๆถ๏ผๆ่ฐ้ซไบๆ็ฑป้ ้ขใ็ ไบๅฆไธ็ฑป๏ผ็ปๆ 26/1 ๅๆ 23/4โโไฟฎไธไธชๅไธไธชใ
ๆฅๆฐๆฎๆๅ็ฐ็ๅ ๏ผๆน้ ้ขไผ่ฎฉ 40% ็ๆ ทๆฌ่ขซ้ๆด๏ผไธค็ๅชๆ 585 ๆกๅ ฑๆ๏ผใ็ญไบๆฏๅไธๆฌกๅฎ้ชๅฐฑๆขไบไธชๆฐๆฎ้๏ผไปปไฝ็ป่ฎบ้ฝไธๅฏๅฝๅ ใ่ฟๆญฃๆฏ v6 ็ณปๅ"ไฟฎไธไธชๅไธไธช"็ๆบๅถใ
ไฟฎๆณ๏ผๆ้ๆ ทๆนๆๆๅ ๅฎนๅๅธๆๅบ๏ผๆน้ ้ขๅๆ"ๅ่ฐๆฉๅฑ"โโๅๆฅ้ไธญ็ๆ ทๆฌไป็ถๅ จ้จๅจ๏ผๅชๅค่กฅๅทฎ้ขใ
้ช่ฏ๏ผๅชๆนไธ็ฑป้ ้ข๏ผ260โ220๏ผ๏ผ**้ๅ ็ 99.9%**ใ
้ชๆถ็ปๆ
| ็ๆฌ | ้ชๆถ | ่ฏดๆ |
|---|---|---|
| v6.1๏ผไธไธ็๏ผ | 25 / 2 | โ โ b ็ฌฌไบ้็ฎๆฏใโ โงb ๅค่ฝฎ่ฟฝ้ฎ |
| v7๏ผๆฌ็๏ผ | 26 / 1 | โ โ bใโงb ๅ จไฟฎๅฅฝ๏ผโ โฅ ๅทฅๅ ทๆพ user |
26/1 ๅทฒ็ป่ฟๅค็ฐ้ช่ฏ๏ผๅไธไปฝๆฐๆฎ็ฌ็ซ้่ทไธๆฌก่ฎญ็ป๏ผ็ปๆๅฎๅ จไธ่ด๏ผๅซๅคฑ่ดฅ้กน็ธๅ๏ผใ
ไธบไปไนๆฒก็ปง็ปญไฟฎ โฅ
โฅ ็่็นๆฏ"ๅทฅๅ ทๅฎไนๆพๅจ user ๆถๆฏ้"๏ผ่ไธๆฏ system๏ผใv7 ๅจ่ฟไธ้กน้ๅๆๅฟ็ฎใ
ๅ็ปญ่ฏไบไธคไธชๆนๅ๏ผ
- v7b๏ผ่ฐ้ซ user ็ปๆ้ ้ข + ็ ๅค่ฝฎๆ ทๆฌ โ 23/4๏ผไฟฎไธไธชๅไธไธช
- v7c๏ผไธๅจ้ ้ข๏ผ็บฏ่ฟฝๅ 90 ๆก่ฏฅ่็นๆ ทๆฌ โ 22/5๏ผๅทฅๅ ท่ฐ็จๅพๅ่ขซๆดไฝ็จ้
ไธๆฌกๅฐ่ฏๆๅๅไธไธช็ป่ฎบ๏ผ
ๅจ 1000 ๆก้ข็ฎๅ ๏ผไปปไฝ"ๅฎๅ่กฅๅผบ"้ฝไผๆคๆๅ ถไป่ฝๅใ26/1 ๅทฒ็ปๆฏ่ฟไธช้ข็ฎไธ็ๆไผ่งฃใ
โฅ ๅฑไบๅ ผๅฎนๆงๅบๆฏ๏ผไธๆฏๆ ธๅฟ่ฝๅใๅฆๆไฝ ็ๅฎฟไธปๆๅทฅๅ ทๅฎไนๆพๅจ user ๆถๆฏ้๏ผ่ฏทๅจ system ไธญ่กฅไธๅฅ่บซไปฝ/ๅทฅๅ ท่ฏดๆ๏ผ่งไธ้ขใๅทฒ็ฅ้ฎ้ข 3ใ๏ผ๏ผๆๆน็จๆๅทฅๅ ทๅฎไนๆพ system ็ๆ ๅๅๆณใ
ไบ่ฝฎ่ฟญไปฃ็ๅฎๆดๅค็
| ็ๆฌ | ้ชๆถ | ็ปๆ |
|---|---|---|
| v6 | 24 / 3 | โฅโจ ๅ๏ผโ b ๅฅฝ |
| v6.1 | 25 / 2 | โ ๆพๅๅธ |
| v6.2 | 24 / 3 | ไฟฎๅฅฝ โ b๏ผไฝ โงa โจg ้ๆญฅ |
| v6.3 | 25 / 2 | ไฟฎๅฅฝ โงa โจg๏ผโ b ๅ้๏ผ้้กนไธ v6.1 ็ธๅ๏ผ็ญไบ็ฝ่ท๏ผ |
| v6.4 | 25/2 + โฃๅ | ่ฐ็จ็ๅดฉๅฐ 12% |
| v7 | 26 / 1 | โ ๆฌ็ๅๅธ |
| v7b | 23 / 4 | ๅฐ่ฏไฟฎ โฅ ๅคฑ่ดฅ |
| v7c | 22 / 5 | ๅฐ่ฏไฟฎ โฅ ๅคฑ่ดฅ๏ผๅฆไธๆนๅ๏ผ |
ๆ ธๅฟๆ่ฎญ๏ผv6 ็ณปๅๆฏ่ฝฎ้ฝๆฏใๅ็ฐ้ฎ้ข โ ่กฅ 5% ๆฐๆฎ โ ๅ จ้้่ฎญใ๏ผๆๆดไธช่ฝๅๅๅธ้ๆดไธ้๏ผ็ปๆไฟฎไธไธชๅไธไธชใ่กฅไธๆฐๆฎ็ๆๅๅๅณไบๅฎๅ ๆฐๆฐๆฎ้็ๆฏไพ๏ผไธๆฏๅฎ็็ปๅฏนๆกๆฐโโv6.4 ่กฅไบ 248 ๆกๅปๅฏนๅฒ 244 ๆกไนๆณๅบ็บฟ๏ผๅ ๆฏๅชๆ 4.6%๏ผๅไธไฝๅทฒๆๆฏๆงใ
v7 ๆขไบๆนๆณ๏ผๆน้ ๆฏ๏ผไธๆนๅข้ใไธๅพๅคงๆฐๆฎ้้ๅก่กฅไธ๏ผ่ๆฏ้ๆฐ็ฒพ้ๆดไธชๆฐๆฎ้ใ
่ฎธๅฏ
Apache 2.0๏ผ่ทๅบๅบง MiniCPM5-2B ไธ่ดใ
่ฎญ็ปๆฐๆฎใ่ๆฌ้ฝๅจ้กน็ฎ้๏ผๆฌข่ฟ issue ไบคๆตใ
English
What's new
The biggest gap in the previous release (1b-II) was that it couldn't call tools at all โ the training data contained zero tool-use samples. This release is built specifically to fix that:
| Capability | 1b-II | 2b-II-pro |
|---|---|---|
| Tool-call format | โ malformed, invented fields | โ bare JSON, stable |
| Single-step calls | โ | โ |
| Multi-step calls | โ | โ |
| Refusing what it shouldn't do | โ ๏ธ inconsistent | โ |
| Interpreting tool results | โ | โ |
New base model: switched from MiniCPM5-1B to MiniCPM5-2B (OpenBMB, Apache 2.0, 512K context).
This repo is the MLX 4-bit quantized build, 1.4 GB, ready to run on Apple Silicon.
Four builds, pick by use case:
| Build | Size | Use case |
|---|---|---|
| MLX 4-bit (this repo) | 1.42 GB | Everyday use on a Mac โ fastest, smallest footprint |
| MLX lossless bf16 | 5.03 GB | Quality baseline / re-quantization / further fine-tuning |
| -f16 | 5.03 GB | Same as above (identical weights, named for transformers users) |
| GGUF | 1.45 / 2.50 / 4.69 GB | Ollama, llama.cpp |
The MLX lossless (bf16) build is for anyone who needs to build on top of this model โ 4-bit is lossy and unsuitable as a base for re-quantization or continued training. It holds byte-identical weights to the
-f16repo; the two names exist so both MLX and transformers users can find it. It's a standard safetensors checkpoint โ loadable by MLX and transformers alike.
Quick start
MLX (Apple Silicon, this repo)
pip install mlx-lm
python -m mlx_lm.generate \
--model whcl412/LycheeAI-coder-2b-II-pro \
--prompt "write a quicksort"
python -m mlx_lm.server --model whcl412/LycheeAI-coder-2b-II-pro --port 8080
transformers
This repo is in MLX 4-bit format and cannot be loaded by transformers.
Use the lossless build for HF safetensors โ whcl412/LycheeAI-coder-2b-II-pro-MLX-bf16 (or the equivalent -f16).
Ollama (GGUF)
Published โ whcl412/LycheeAI-coder-2b-II-pro-GGUF
Three variants: q4_k_m (1.45 GiB) / q8_0 (2.50 GiB, recommended) / f16 (4.69 GiB, lossless).
The repo ships a Modelfile โ download, then ollama create.
โ ๏ธ Note: Ollama's automatic tool_calls parsing is unreliable for this small model โ it was trained to emit bare JSON, without the wrapper tags runtimes expect. For production, parse the JSON from content yourself. See the GGUF repo README.
Tool calling
Output format
It emits bare JSON (OpenAI function-calling style), with no wrapper at all:
{"name": "get_weather", "arguments": {"city": "Beijing"}}
No ```json fences, **no** <tool_call> tags, no "Sure, let me call the tool" narration.
Multi-step calls (only the first step is emitted when dependent)
For "Is it a good day to go out in Beijing?", it needs to check the weather first. In that case it emits only the first step:
{"name": "get_weather", "arguments": {"city": "Beijing"}}
Feed the tool result back and it continues. Your host must drive the loop: parse โ execute โ feed result back โ parse again.
Independent calls are emitted in parallel
{"name": "get_weather", "arguments": {"city": "Beijing"}}
{"name": "get_weather", "arguments": {"city": "Shanghai"}}
It refuses clearly when it should
Not every request becomes a tool call. When something is out of scope or disallowed, it says so and offers alternatives instead of fabricating a tool call.
When to give it tools, and when not to
| Category | Example | Behavior |
|---|---|---|
| Tool gives a definite answer | 789*123, 1000 USD to CNY |
calls the tool |
| Out of scope / disallowed | booking flights, cracking WiFi | refuses + offers alternatives |
| Tool doesn't help | "what is recursion", "write binary search" | answers directly |
| Host has no tools | "search for me" in a plain chat app | says it can't, doesn't emit JSON |
The last row matters: if your host is a plain chat app, give it no tool definitions at all. It will say "I have no web access" instead of emitting JSON your host can't handle.
Training
| Item | Value |
|---|---|
| Base | openbmb/MiniCPM5-2B |
| Method | LoRA (rank 8, dropout 0, scale 20, 16 layers) |
| Data | 5,341 samples |
| Epochs | 1 (2,671 steps) |
| LR | 5e-5 (adam) |
| batch / seq | 2 / 2048 |
| Framework | MLX-LM 0.31.3 |
| Quantization | 4-bit affine (group_size 64) |
โ ๏ธ Known issues
1. It does mental arithmetic without tools โ and gets it wrong
1234 + 5678 = 2000 (should be 6912)
35 ** 2 = 70 (should be 1225)
13.5 ร 4 = 7.8 (should be 54)
199 ร 257 = 40043 (should be 51143)
Root cause (confirmed by controlled experiment): the model decides based on operation type, and this maps exactly onto per-type sample counts in the training data โ multiplication 432 samples โ calls the tool; addition 86 / power 61 / subtraction 49 โ does it in its head.
It is not string memorization (38% vs 50%, no real difference), and not difficulty (1234+5678 also gets mental math).
Workaround: state it explicitly in the system prompt:
้่ฆไปปไฝๆฐๅผ่ฎก็ฎๆถ๏ผไธๅพ่ฐ็จ calculate๏ผไธ่ฆ่ชๅทฑๅฟ็ฎใ
2. Identity questions fail under a generic system prompt
If your system prompt is the generic "You are an AI assistant with tools..." style, asking "what's your name" may produce nonsense (observed: "I'm Qwen").
Put the identity in the system prompt:
You are LycheeAI-coder-2b-II-pro. You have access to tools.
Cause: every identity sample in the training data used the specific system prompt above; the model never saw the generic-tools-plus-identity combination.
3. Tool results come in two shapes โ your host should know which it's sending
Both are understood:
Shape A โ an explicit call turn (what mainstream agent frameworks do):
user: 789*123 ็ญไบๅคๅฐ
assistant: {"name": "calculate", "arguments": {"expression": "789*123"}}
user: [ๅทฅๅ
ท่ฐ็จ็ปๆ] {"name": "calculate", "result": {"value": 97047}}
assistant: 789 ร 123 = **97047**ใ
Shape B โ the host already executed it and hands the result straight over (used by 67 early samples):
user: ่ทไธไธ่ฟๆฎตไปฃ็
[ๅทฅๅ
ท่ฐ็จ็ปๆ] {"exit_code": 0, "stdout": "45\n"}
assistant: ๆง่กๆๅ๏ผ่พๅบ `45`ใ
Difference: shape B has no name in the result, because there is no call turn in context โ the tool identity is inferable from the system tool list and the question itself.
Recommendation: use shape A for normal integration (multi-turn loop). Use shape B only when you already know which tool to run and just want the model to interpret the result.
4. Why v6.1 and not v6.4
Five iterations were trained. v6.2 fixed one item and broke two; v6.3 was item-for-item identical to v6.1; v6.4 collapsed the tool-call rate to 12%. v6.1 is the only version with a real improvement over v6 (25/2 vs 24/3 on a 27-item eval).
Lesson: each round patched ~5% of the data and retrained on everything, reshuffling the whole behavior distribution. The next version will validate on small-scale runs first.
License
Apache 2.0, same as the MiniCPM5-2B base.
LycheeAI โโ ๅฐ็๏ผไฝ่ฝๅนฒๆดปใ
LycheeAI โ small, but it gets the job done.
- Downloads last month
- 62
4-bit
Model tree for whcl412/LycheeAI-coder-2b-II-pro
Base model
openbmb/MiniCPM5-2B
Start the MLX server
# Install MLX LM: uv tool install mlx-lm# Start a local OpenAI-compatible server: mlx_lm.server --model "whcl412/LycheeAI-coder-2b-II-pro"