Instructions to use whcl412/LycheeAI-coder-1.7b-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use whcl412/LycheeAI-coder-1.7b-GGUF 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 whcl412/LycheeAI-coder-1.7b-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf whcl412/LycheeAI-coder-1.7b-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf whcl412/LycheeAI-coder-1.7b-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf whcl412/LycheeAI-coder-1.7b-GGUF:Q4_K_M
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 whcl412/LycheeAI-coder-1.7b-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf whcl412/LycheeAI-coder-1.7b-GGUF:Q4_K_M
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 whcl412/LycheeAI-coder-1.7b-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf whcl412/LycheeAI-coder-1.7b-GGUF:Q4_K_M
Use Docker
docker model run hf.co/whcl412/LycheeAI-coder-1.7b-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use whcl412/LycheeAI-coder-1.7b-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "whcl412/LycheeAI-coder-1.7b-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "whcl412/LycheeAI-coder-1.7b-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/whcl412/LycheeAI-coder-1.7b-GGUF:Q4_K_M
- Ollama
How to use whcl412/LycheeAI-coder-1.7b-GGUF with Ollama:
ollama run hf.co/whcl412/LycheeAI-coder-1.7b-GGUF:Q4_K_M
- Unsloth Studio
How to use whcl412/LycheeAI-coder-1.7b-GGUF 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 whcl412/LycheeAI-coder-1.7b-GGUF 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 whcl412/LycheeAI-coder-1.7b-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for whcl412/LycheeAI-coder-1.7b-GGUF to start chatting
- Pi
How to use whcl412/LycheeAI-coder-1.7b-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf whcl412/LycheeAI-coder-1.7b-GGUF:Q4_K_M
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": "whcl412/LycheeAI-coder-1.7b-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use whcl412/LycheeAI-coder-1.7b-GGUF with Docker Model Runner:
docker model run hf.co/whcl412/LycheeAI-coder-1.7b-GGUF:Q4_K_M
- Lemonade
How to use whcl412/LycheeAI-coder-1.7b-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull whcl412/LycheeAI-coder-1.7b-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.LycheeAI-coder-1.7b-GGUF-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use whcl412/LycheeAI-coder-1.7b-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf whcl412/LycheeAI-coder-1.7b-GGUF:Q4_K_M
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-1.7b-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use whcl412/LycheeAI-coder-1.7b-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf whcl412/LycheeAI-coder-1.7b-GGUF:Q4_K_M
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-1.7b-GGUF:Q4_K_M" \ --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"
LycheeAI-coder-1.7b-GGUF
当前版本:V12(思考修复版)
LycheeAI-coder-1.7b 的 GGUF 量化版本,基于 Qwen3-1.7B 通过 QLoRA(4-bit)微调,代码优先、支持中/英/粤三语对话、情感共情、可开关思考。V12 重点修复了 GGUF 版思考退化问题。
本仓库提供 GGUF 格式(跨平台,Ollama / llama.cpp / LM Studio 通用)。如需 Apple Silicon 的 MLX 版本,见 mlx-LycheeAI-coder-1.7b。
可用文件
| 文件 | 大小 | 量化 | 说明 |
|---|---|---|---|
| mlx-LycheeAI-coder-1.7b-q4_k_m.gguf | 1.05GB | Q4_K_M | 推荐,平衡质量与大小 |
使用方式
Ollama
# 1. 下载 q4_k_m 版本后,创建 Modelfile(或直接用仓库内 Modelfile)
ollama create lychee-coder -f Modelfile
# 2. 运行
ollama run lychee-coder "用 Python 写一个快速排序"
llama.cpp
llama-cli -m mlx-LycheeAI-coder-1.7b-q4_k_m.gguf -p "写一个二分查找" -n 256
训练信息
- 基座模型:Qwen3-1.7B
- 微调方法:QLoRA(4-bit + LoRA rank 16)
- 第一轮:CodeAlpaca-20k 代码指令 3500 + 中文 800 + 英语 800 + 粤语 600 + 身份问答 24(共 5724 条,lr 1e-4,4000 步)
- 第二轮(增量微调):日常对话 60 条(中32/英16/粤12),短问短答,让日常聊天简短自然、不啰嗦(从第一轮续训,lr 5e-5,60 步)
- 第三轮(增量微调):多语言小型项目 90 条(Python/C/C++/C#/HTML/Java/JS/Swift/Go)+ 场景感知对话 60 条,学会看场景决定说多说少、适度用 emoji(从第二轮续训,lr 5e-5,150 步)
- 第四轮(增量微调):情感共情 40 + 格式感知 21 + 多轮 10 + 复合逻辑 11 + 纯代码 18 + 锚点 20,修复复合逻辑出错/乱用代码块/缺共情/缺多轮四个短板(从第三轮续训,lr 5e-5,120 步)
- 第五轮(增量微调):正确代码 79(9语言)+ bug 修复 20 + 分场合安慰 20,提升代码正确性、学会分场合安慰(从第四轮续训,lr 5e-5)
- 第六轮(可开关思考):思考模式 80(
<think>推理)+ 直答 49(/no_think)+ 锚点 30,学会可开关思考(从第五轮续训,lr 5e-5,160 步) - 第七轮(纠偏):常识纠偏+网络用语 25 + 身份区分 10 + 诚实兜底 6 + 按难度思考 30 + 网络上下文 10 + 锚点 15,修复身份过拟合(从第六轮续训,lr 5e-5,100 步)
- 第八轮(代码拉回):完整代码项目 39 + 调试 15 + 思考 10 + 纠偏 10 + 锚点 15,修复代码退化(从第七轮续训,lr 5e-5,90 步)
- 第九轮(最终均衡 V10):200 条 = 代码 75 + 情感 25 + 日常 20 + 常识 20 + 思考 15 + 多语言 15 + 网络 10 + 身份 10 + 诚实 10(从第八轮续训,lr 5e-5,200 步)
- 第十轮(均衡加强思考 V11):250 条 = 代码 50 + 调试 15(思考)+ 难题思考 35 + 简单题直答 25 + 情感 25 + 日常 25 + 多语言 20 + 常识 20 + 身份 15 + 网络 10 + 诚实 10(从 v10 续训,lr 5e-5,250 步)
- 第十一轮(思考修复 V12):150 条 = 真实推理思考题 60 + 锚点 90,思考占比 20%→36.7%,修复 GGUF 版思考退化(从 v11 续训,lr 5e-5,150 步)
- 身份:通过 system prompt + 身份问答样本,固定为「LycheeAI-coder-1.7b,由 Qwen3-1.7B 微调而来」
- 许可:Apache 2.0(跟随基座)
- Downloads last month
- 352
4-bit