Instructions to use netease-youdao/Confucius4_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 netease-youdao/Confucius4_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 netease-youdao/Confucius4_GGUF:Q5_K_M # Run inference directly in the terminal: llama cli -hf netease-youdao/Confucius4_GGUF:Q5_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf netease-youdao/Confucius4_GGUF:Q5_K_M # Run inference directly in the terminal: llama cli -hf netease-youdao/Confucius4_GGUF:Q5_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 netease-youdao/Confucius4_GGUF:Q5_K_M # Run inference directly in the terminal: ./llama-cli -hf netease-youdao/Confucius4_GGUF:Q5_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 netease-youdao/Confucius4_GGUF:Q5_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf netease-youdao/Confucius4_GGUF:Q5_K_M
Use Docker
docker model run hf.co/netease-youdao/Confucius4_GGUF:Q5_K_M
- LM Studio
- Jan
- Ollama
How to use netease-youdao/Confucius4_GGUF with Ollama:
ollama run hf.co/netease-youdao/Confucius4_GGUF:Q5_K_M
- Unsloth Desktop
- Pi
How to use netease-youdao/Confucius4_GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf netease-youdao/Confucius4_GGUF:Q5_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "netease-youdao/Confucius4_GGUF:Q5_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use netease-youdao/Confucius4_GGUF with Docker Model Runner:
docker model run hf.co/netease-youdao/Confucius4_GGUF:Q5_K_M
- Lemonade
How to use netease-youdao/Confucius4_GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull netease-youdao/Confucius4_GGUF:Q5_K_M
Run and chat with the model
lemonade run user.Confucius4_GGUF-Q5_K_M
List all available models
lemonade list
- Hermes Agent
How to use netease-youdao/Confucius4_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 netease-youdao/Confucius4_GGUF:Q5_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 netease-youdao/Confucius4_GGUF:Q5_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use netease-youdao/Confucius4_GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf netease-youdao/Confucius4_GGUF:Q5_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 "netease-youdao/Confucius4_GGUF:Q5_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"
| set -e | |
| BASE=./Confucius4_GGUF | |
| LLAMA_CPP_DIR=<your-llama.cpp-install-path> | |
| # defaults | |
| MODEL="" | |
| PORT=8080 | |
| N_CTX=20000 | |
| USE_GPU="${GGML_CUDA:-ON}" | |
| GPU_LAYERS=99 | |
| GPUS="0" | |
| usage() { | |
| echo "Usage: sh run_gguf_server.sh [OPTIONS] [MODEL]" | |
| echo "" | |
| echo "MODEL: quant type (Q4_K_M, IQ3_M), file path, or empty for auto-detect" | |
| echo "" | |
| echo "Options:" | |
| echo " -p PORT port (default 8080)" | |
| echo " -c CTX context length (default 4096)" | |
| echo " -g GPUS GPU devices (default 0, e.g. 0,1)" | |
| echo " -ngl LAYERS GPU layers (default 99)" | |
| echo " --cpu disable GPU" | |
| echo "" | |
| echo "Examples:" | |
| echo " sh run_gguf_server.sh Q4_K_M" | |
| echo " sh run_gguf_server.sh Q4_K_M -p 8080 -g 0,1 -c 8192" | |
| echo " sh run_gguf_server.sh bf16/Confucius4-Q4_K_M.gguf --cpu" | |
| exit 1 | |
| } | |
| # parse args | |
| while [ $# -gt 0 ]; do | |
| case "$1" in | |
| -p) PORT="$2"; shift 2 ;; | |
| -c) N_CTX="$2"; shift 2 ;; | |
| -g) GPUS="$2"; shift 2 ;; | |
| -ngl) GPU_LAYERS="$2"; shift 2 ;; | |
| --cpu) USE_GPU=OFF; shift ;; | |
| -h|--help) usage ;; | |
| -*) echo "Unknown: $1"; usage ;; | |
| *) MODEL="$1"; shift ;; | |
| esac | |
| done | |
| # resolve model | |
| if [ -z "$MODEL" ]; then | |
| # auto-detect: prefer quantized, then f16 | |
| MODEL=$(ls "$BASE"/*/Confucius4-*.gguf 2>/dev/null | head -1) | |
| if [ -z "$MODEL" ]; then | |
| MODEL=$(ls "$BASE"/bf16/Confucius4-00001-of-*.gguf 2>/dev/null | head -1) | |
| fi | |
| else | |
| # if it's a quant type like Q4_K_M, look in that dir | |
| if [ -d "$BASE/$MODEL" ] && [ -f "$BASE/$MODEL/Confucius4-$MODEL.gguf" ]; then | |
| MODEL="$BASE/$MODEL/Confucius4-$MODEL.gguf" | |
| elif [ -d "$BASE/$MODEL" ]; then | |
| # dir exists, find first gguf inside | |
| MODEL=$(ls "$BASE/$MODEL"/Confucius4-*.gguf 2>/dev/null | head -1) | |
| [ -z "$MODEL" ] && { echo "ERROR: no gguf in $BASE/$MODEL/"; exit 1; } | |
| fi | |
| fi | |
| [ -f "$MODEL" ] || { echo "ERROR: model not found: $MODEL"; exit 1; } | |
| # auto-detect mmproj | |
| MMPROJ="" | |
| MODEL_DIR=$(dirname "$MODEL") | |
| # Look for mmproj in the same directory as the model, or in f16 dir | |
| for candidate in "$MODEL_DIR"/mmproj-*.gguf "$BASE"/bf16/mmproj-*.gguf; do | |
| [ -f "$candidate" ] && { MMPROJ="$candidate"; break; } | |
| done | |
| # build llama-server if needed | |
| SERVER_BIN="$LLAMA_CPP_DIR/build/bin/llama-server" | |
| CUDA_BUILD_DIR="$LLAMA_CPP_DIR/build-cuda" | |
| if [ "$USE_GPU" = "ON" ]; then | |
| SERVER_BIN="$CUDA_BUILD_DIR/bin/llama-server" | |
| if [ ! -f "$SERVER_BIN" ]; then | |
| echo "=== Building llama-server (CUDA) ===" | |
| cmake -S "$LLAMA_CPP_DIR" -B "$CUDA_BUILD_DIR" \ | |
| -DBUILD_SHARED_LIBS=OFF -DLLAMA_CURL=OFF \ | |
| -DGGML_CUDA=ON 2>&1 | tail -1 | |
| cmake --build "$CUDA_BUILD_DIR" --target llama-server -j$(nproc) 2>&1 | tail -3 | |
| fi | |
| else | |
| if [ ! -f "$SERVER_BIN" ]; then | |
| echo "=== Building llama-server (CPU) ===" | |
| cmake -S "$LLAMA_CPP_DIR" -B "$LLAMA_CPP_DIR/build" -DBUILD_SHARED_LIBS=OFF -DLLAMA_CURL=OFF 2>&1 | tail -1 | |
| cmake --build "$LLAMA_CPP_DIR/build" --target llama-server -j$(nproc) 2>&1 | tail -3 | |
| fi | |
| fi | |
| echo "=== Starting server ===" | |
| echo " model: $MODEL" | |
| echo " port: $PORT" | |
| echo " ctx: $N_CTX" | |
| if [ -n "$MMPROJ" ]; then | |
| echo " mmproj: $MMPROJ" | |
| fi | |
| if [ "$USE_GPU" = "ON" ]; then | |
| echo " GPU: layers=$GPU_LAYERS devices=$GPUS" | |
| export CUDA_VISIBLE_DEVICES=$GPUS | |
| else | |
| echo " GPU: off" | |
| fi | |
| echo " API: http://localhost:$PORT/v1/chat/completions" | |
| echo "" | |
| MMPROJ_ARG=() | |
| [ -n "$MMPROJ" ] && MMPROJ_ARG=(--mmproj "$MMPROJ") | |
| if [ "$USE_GPU" = "ON" ]; then | |
| "$SERVER_BIN" -m "$MODEL" --port "$PORT" --host 0.0.0.0 -c "$N_CTX" -ngl "$GPU_LAYERS" --parallel 1 "${MMPROJ_ARG[@]}" | |
| else | |
| "$SERVER_BIN" -m "$MODEL" --port "$PORT" --host 0.0.0.0 -c "$N_CTX" --parallel 1 "${MMPROJ_ARG[@]}" | |
| fi |