Instructions to use HelloSun/flint_cpu_opt 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 HelloSun/flint_cpu_opt 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 HelloSun/flint_cpu_opt:UD-Q4_K_XL # Run inference directly in the terminal: llama cli -hf HelloSun/flint_cpu_opt:UD-Q4_K_XL
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf HelloSun/flint_cpu_opt:UD-Q4_K_XL # Run inference directly in the terminal: llama cli -hf HelloSun/flint_cpu_opt:UD-Q4_K_XL
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf HelloSun/flint_cpu_opt:UD-Q4_K_XL # Run inference directly in the terminal: ./build/bin/llama cli -hf HelloSun/flint_cpu_opt:UD-Q4_K_XL
Use Docker
docker model run hf.co/HelloSun/flint_cpu_opt:UD-Q4_K_XL
- Llama new
- LM Studio
- Jan
- vLLM
How to use HelloSun/flint_cpu_opt with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "HelloSun/flint_cpu_opt" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HelloSun/flint_cpu_opt", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/HelloSun/flint_cpu_opt:UD-Q4_K_XL
- Ollama
How to use HelloSun/flint_cpu_opt with Ollama:
ollama run hf.co/HelloSun/flint_cpu_opt:UD-Q4_K_XL
- Unsloth Desktop
- Pi
How to use HelloSun/flint_cpu_opt with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf HelloSun/flint_cpu_opt:UD-Q4_K_XL
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": "HelloSun/flint_cpu_opt:UD-Q4_K_XL" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use HelloSun/flint_cpu_opt with Docker Model Runner:
docker model run hf.co/HelloSun/flint_cpu_opt:UD-Q4_K_XL
- Lemonade
How to use HelloSun/flint_cpu_opt with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull HelloSun/flint_cpu_opt:UD-Q4_K_XL
Run and chat with the model
lemonade run user.flint_cpu_opt-UD-Q4_K_XL
List all available models
lemonade list
- Hermes Agent
How to use HelloSun/flint_cpu_opt with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf HelloSun/flint_cpu_opt:UD-Q4_K_XL
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 HelloSun/flint_cpu_opt:UD-Q4_K_XL
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use HelloSun/flint_cpu_opt with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf HelloSun/flint_cpu_opt:UD-Q4_K_XL
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 "HelloSun/flint_cpu_opt:UD-Q4_K_XL" \ --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"
build.sh: pi 依 Node 版本安裝(Node<22.19 用 legacy-node20),安裝後驗證可執行;curl 下載取代崩潰的 hf CLI
Browse files
build.sh
CHANGED
|
@@ -66,12 +66,14 @@ fi
|
|
| 66 |
if [[ ! -s "$MODEL_PATH" ]]; then
|
| 67 |
info "下載模型 $MODEL_REPO/$MODEL_FILE(約 24 GiB,支援續傳)"
|
| 68 |
URL="https://huggingface.co/$MODEL_REPO/resolve/main/$MODEL_FILE?download=true"
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
fi
|
|
|
|
|
|
|
| 75 |
fi
|
| 76 |
if [[ ! -s "$MODEL_PATH" ]]; then
|
| 77 |
warn "模型不存在或下載失敗:$MODEL_PATH"
|
|
@@ -81,14 +83,34 @@ ok "模型:$MODEL_PATH"
|
|
| 81 |
|
| 82 |
# ── 3. Install pi if needed, and configure it to use this llama-server ───────
|
| 83 |
export PATH="$HOME/.local/bin:$HOME/.pi/bin:${XDG_DATA_HOME:-$HOME/.local/share}/pi-node/current/bin:$PATH"
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
npm install -g --ignore-scripts --no-fund --no-audit --progress=false \
|
| 88 |
-
--prefix "$HOME/.local"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 89 |
else
|
| 90 |
-
warn "找不到 npm,略過 pi 安裝(僅寫入設定)"
|
| 91 |
fi
|
|
|
|
|
|
|
| 92 |
fi
|
| 93 |
|
| 94 |
info "設定 pi 使用本地 llama-server:http://127.0.0.1:$LLAMA_PORT/v1"
|
|
|
|
| 66 |
if [[ ! -s "$MODEL_PATH" ]]; then
|
| 67 |
info "下載模型 $MODEL_REPO/$MODEL_FILE(約 24 GiB,支援續傳)"
|
| 68 |
URL="https://huggingface.co/$MODEL_REPO/resolve/main/$MODEL_FILE?download=true"
|
| 69 |
+
# 直接用 curl 續傳(hf CLI 在部分映像會因 typer/click 版本衝突而崩潰)。
|
| 70 |
+
# HF_TOKEN 有設定時帶上 Authorization(私有 repo 或避免匿名限速)。
|
| 71 |
+
CURL_AUTH=()
|
| 72 |
+
if [[ -n "${HF_TOKEN:-}" ]]; then
|
| 73 |
+
CURL_AUTH=(-H "Authorization: Bearer $HF_TOKEN")
|
| 74 |
fi
|
| 75 |
+
curl -fL -C - --retry 3 --retry-delay 5 "${CURL_AUTH[@]}" "$URL" -o "$MODEL_PATH" \
|
| 76 |
+
|| warn "curl 下載失敗(exit=$?)"
|
| 77 |
fi
|
| 78 |
if [[ ! -s "$MODEL_PATH" ]]; then
|
| 79 |
warn "模型不存在或下載失敗:$MODEL_PATH"
|
|
|
|
| 83 |
|
| 84 |
# ── 3. Install pi if needed, and configure it to use this llama-server ───────
|
| 85 |
export PATH="$HOME/.local/bin:$HOME/.pi/bin:${XDG_DATA_HOME:-$HOME/.local/share}/pi-node/current/bin:$PATH"
|
| 86 |
+
# pi 1.x 起要求 Node >= 22.19;Space 映像是 Node 20,npm 的 latest 會裝到啟動即崩潰的版本
|
| 87 |
+
# (SyntaxError: enableCompileCache)。依目前 Node 版本選擇:新 Node 用 latest,
|
| 88 |
+
# 舊 Node 用 npm dist-tag legacy-node20(0.74.2)。並且安裝後實際執行 pi --version 驗證。
|
| 89 |
+
PI_PKG="@earendil-works/pi-coding-agent"
|
| 90 |
+
pi_runs() { command -v pi >/dev/null 2>&1 && pi --version >/dev/null 2>&1; }
|
| 91 |
+
if ! pi_runs; then
|
| 92 |
+
if command -v npm >/dev/null 2>&1 && command -v node >/dev/null 2>&1; then
|
| 93 |
+
if node -e 'const [a,b]=process.versions.node.split(".").map(Number); process.exit(a>22||(a===22&&b>=19)?0:1)'; then
|
| 94 |
+
PI_SPEC="$PI_PKG@latest"
|
| 95 |
+
else
|
| 96 |
+
PI_SPEC="$PI_PKG@legacy-node20"
|
| 97 |
+
fi
|
| 98 |
+
info "安裝 pi coding agent($PI_SPEC)到 $HOME/.local(Node $(node -v))"
|
| 99 |
+
# 舊版殘留的 bin 連結會讓 npm 拒絕覆寫(EEXIST),先移除。
|
| 100 |
+
rm -f "$HOME/.local/bin/pi"
|
| 101 |
npm install -g --ignore-scripts --no-fund --no-audit --progress=false \
|
| 102 |
+
--prefix "$HOME/.local" "$PI_SPEC" || warn "pi 安裝失敗"
|
| 103 |
+
hash -r
|
| 104 |
+
if pi_runs; then
|
| 105 |
+
ok "pi 可執行:$(pi --version 2>&1 | head -n1)"
|
| 106 |
+
else
|
| 107 |
+
warn "pi 安裝後仍無法執行(pi --version 失敗)"
|
| 108 |
+
fi
|
| 109 |
else
|
| 110 |
+
warn "找不到 npm/node,略過 pi 安裝(僅寫入設定)"
|
| 111 |
fi
|
| 112 |
+
else
|
| 113 |
+
ok "pi 已可執行:$(pi --version 2>&1 | head -n1)"
|
| 114 |
fi
|
| 115 |
|
| 116 |
info "設定 pi 使用本地 llama-server:http://127.0.0.1:$LLAMA_PORT/v1"
|