Text Generation
MLX
Safetensors
llama
code
minicpm
chinese
conversational
tool-calling
quantization
4-bit precision
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:8080/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"
README: 补充 GGUF / Ollama 发布链接与工具调用注意事项
Browse files
README.md
CHANGED
|
@@ -28,7 +28,8 @@ library_name: mlx
|
|
| 28 |
它最大的用处是:**跑在你自己的机器上,不用联网,能调工具,响应飞快。**
|
| 29 |
|
| 30 |
**本仓库是 MLX 4bit 量化版本**,1.4 GB,Apple Silicon 上开箱即用。
|
| 31 |
-
需要全精度(
|
|
|
|
| 32 |
|
| 33 |
---
|
| 34 |
|
|
@@ -73,7 +74,12 @@ python -m mlx_lm.server --model whcl412/LycheeAI-coder-2b-II-pro --port 8080
|
|
| 73 |
|
| 74 |
### Ollama(GGUF)
|
| 75 |
|
| 76 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |
|
| 78 |
---
|
| 79 |
|
|
@@ -464,7 +470,8 @@ The biggest gap in the previous release (1b-II) was that it **couldn't call tool
|
|
| 464 |
**New base model**: switched from MiniCPM5-1B to MiniCPM5-2B (OpenBMB, Apache 2.0, 512K context).
|
| 465 |
|
| 466 |
**This repo is the MLX 4-bit quantized build**, 1.4 GB, ready to run on Apple Silicon.
|
| 467 |
-
For full precision (
|
|
|
|
| 468 |
|
| 469 |
---
|
| 470 |
|
|
@@ -489,7 +496,12 @@ Use the f16 repo for HF safetensors → [`whcl412/LycheeAI-coder-2b-II-pro-f16`]
|
|
| 489 |
|
| 490 |
### Ollama (GGUF)
|
| 491 |
|
| 492 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 493 |
|
| 494 |
---
|
| 495 |
|
|
|
|
| 28 |
它最大的用处是:**跑在你自己的机器上,不用联网,能调工具,响应飞快。**
|
| 29 |
|
| 30 |
**本仓库是 MLX 4bit 量化版本**,1.4 GB,Apple Silicon 上开箱即用。
|
| 31 |
+
需要全精度(二次量化、继续微调)→ [`whcl412/LycheeAI-coder-2b-II-pro-f16`](https://huggingface.co/whcl412/LycheeAI-coder-2b-II-pro-f16)(bfloat16,5.03 GB)。
|
| 32 |
+
**要用 Ollama / llama.cpp** → [`whcl412/LycheeAI-coder-2b-II-pro-GGUF`](https://huggingface.co/whcl412/LycheeAI-coder-2b-II-pro-GGUF)(q4_k_m / q8_0 / f16 三档)。
|
| 33 |
|
| 34 |
---
|
| 35 |
|
|
|
|
| 74 |
|
| 75 |
### Ollama(GGUF)
|
| 76 |
|
| 77 |
+
已发布 → [`whcl412/LycheeAI-coder-2b-II-pro-GGUF`](https://huggingface.co/whcl412/LycheeAI-coder-2b-II-pro-GGUF)
|
| 78 |
+
|
| 79 |
+
三档可选:`q4_k_m`(1.45 GiB)/ `q8_0`(2.50 GiB,推荐)/ `f16`(4.69 GiB 无损)。
|
| 80 |
+
仓库里带 `Modelfile`,下载后 `ollama create` 即可用。国内可用 [ModelScope 镜像](https://modelscope.cn/models/whcl412/LycheeAI-coder-2b-II-pro-GGUF)。
|
| 81 |
+
|
| 82 |
+
⚠️ 注意:Ollama 的**自动 `tool_calls` 解析对这个小模型不可靠**——它是按「直接输出 JSON」训练的,不带运行时期望的包裹标签。生产环境请从 `content` 里自己解析 JSON,详见 GGUF 仓库 README。
|
| 83 |
|
| 84 |
---
|
| 85 |
|
|
|
|
| 470 |
**New base model**: switched from MiniCPM5-1B to MiniCPM5-2B (OpenBMB, Apache 2.0, 512K context).
|
| 471 |
|
| 472 |
**This repo is the MLX 4-bit quantized build**, 1.4 GB, ready to run on Apple Silicon.
|
| 473 |
+
For full precision (re-quantization, further fine-tuning) → [`whcl412/LycheeAI-coder-2b-II-pro-f16`](https://huggingface.co/whcl412/LycheeAI-coder-2b-II-pro-f16) (bfloat16, 5.03 GB).
|
| 474 |
+
**For Ollama / llama.cpp** → [`whcl412/LycheeAI-coder-2b-II-pro-GGUF`](https://huggingface.co/whcl412/LycheeAI-coder-2b-II-pro-GGUF) (q4_k_m / q8_0 / f16).
|
| 475 |
|
| 476 |
---
|
| 477 |
|
|
|
|
| 496 |
|
| 497 |
### Ollama (GGUF)
|
| 498 |
|
| 499 |
+
Published → [`whcl412/LycheeAI-coder-2b-II-pro-GGUF`](https://huggingface.co/whcl412/LycheeAI-coder-2b-II-pro-GGUF)
|
| 500 |
+
|
| 501 |
+
Three variants: `q4_k_m` (1.45 GiB) / `q8_0` (2.50 GiB, recommended) / `f16` (4.69 GiB, lossless).
|
| 502 |
+
The repo ships a `Modelfile` — download, then `ollama create`.
|
| 503 |
+
|
| 504 |
+
⚠️ 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.
|
| 505 |
|
| 506 |
---
|
| 507 |
|