Instructions to use HelloSun/openPangu-R-7B-Diffusion-Q4KM 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/openPangu-R-7B-Diffusion-Q4KM 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/openPangu-R-7B-Diffusion-Q4KM:Q4_K_M # Run inference directly in the terminal: llama cli -hf HelloSun/openPangu-R-7B-Diffusion-Q4KM:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf HelloSun/openPangu-R-7B-Diffusion-Q4KM:Q4_K_M # Run inference directly in the terminal: llama cli -hf HelloSun/openPangu-R-7B-Diffusion-Q4KM: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 HelloSun/openPangu-R-7B-Diffusion-Q4KM:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf HelloSun/openPangu-R-7B-Diffusion-Q4KM: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 HelloSun/openPangu-R-7B-Diffusion-Q4KM:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf HelloSun/openPangu-R-7B-Diffusion-Q4KM:Q4_K_M
Use Docker
docker model run hf.co/HelloSun/openPangu-R-7B-Diffusion-Q4KM:Q4_K_M
- Llama new
- LM Studio
- Jan
- Ollama
How to use HelloSun/openPangu-R-7B-Diffusion-Q4KM with Ollama:
ollama run hf.co/HelloSun/openPangu-R-7B-Diffusion-Q4KM:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use HelloSun/openPangu-R-7B-Diffusion-Q4KM with Docker Model Runner:
docker model run hf.co/HelloSun/openPangu-R-7B-Diffusion-Q4KM:Q4_K_M
- Lemonade
How to use HelloSun/openPangu-R-7B-Diffusion-Q4KM with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull HelloSun/openPangu-R-7B-Diffusion-Q4KM:Q4_K_M
Run and chat with the model
lemonade run user.openPangu-R-7B-Diffusion-Q4KM-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Download build_llamacpp_pangu_diffusion.sh from HelloSun/openPangu-R-7B-Diffusion-Q4KM: direct link, hf CLI and curl.
- Browser
- Download file 1.49 kB
-
https://huggingface.co/HelloSun/openPangu-R-7B-Diffusion-Q4KM/resolve/main/build_llamacpp_pangu_diffusion.sh
- Command line
-
hf download hf://HelloSun/openPangu-R-7B-Diffusion-Q4KM/build_llamacpp_pangu_diffusion.sh
-
curl -L -o build_llamacpp_pangu_diffusion.sh https://huggingface.co/HelloSun/openPangu-R-7B-Diffusion-Q4KM/resolve/main/build_llamacpp_pangu_diffusion.sh
1.49 kB
| # | |
| # One-click build of llama.cpp with openPangu-R-7B-Diffusion support. | |
| # | |
| # ./build_llamacpp_pangu_diffusion.sh | |
| # | |
| # It will: | |
| # 1. clone llama.cpp at the pinned release tag | |
| # 2. download and apply the openPangu-R-Diffusion patch | |
| # 3. build llama-diffusion-cli / llama-cli / llama-quantize | |
| # | |
| # Requirements: git, cmake >= 3.14, a C/C++ toolchain, and (optionally) an NVIDIA GPU. | |
| # | |
| set -euo pipefail | |
| LLAMA_TAG="b11719" | |
| PATCH_URL="https://huggingface.co/HelloSun/openPangu-R-7B-Diffusion-Q4KM/resolve/main/pangu-diffusion-llamacpp.patch" | |
| WORKDIR="${WORKDIR:-$PWD/pangu-diffusion-build}" | |
| mkdir -p "$WORKDIR" | |
| cd "$WORKDIR" | |
| if [ ! -d llama.cpp ]; then | |
| echo ">>> cloning llama.cpp ($LLAMA_TAG) ..." | |
| git clone --depth 1 --branch "$LLAMA_TAG" https://github.com/ggml-org/llama.cpp.git | |
| fi | |
| cd llama.cpp | |
| git checkout -- . 2>/dev/null || true | |
| echo ">>> downloading patch ..." | |
| curl -L --fail -o pangu-diffusion-llamacpp.patch "$PATCH_URL" | |
| echo ">>> applying patch ..." | |
| git apply pangu-diffusion-llamacpp.patch | |
| echo ">>> configuring ..." | |
| if command -v nvcc >/dev/null 2>&1; then | |
| cmake -B build -DGGML_CUDA=ON -DLLAMA_CURL=OFF | |
| else | |
| cmake -B build -DGGML_NATIVE=ON -DLLAMA_CURL=OFF | |
| fi | |
| echo ">>> building ..." | |
| cmake --build build --config Release -j"$(nproc)" --target llama-diffusion-cli llama-cli llama-quantize | |
| echo | |
| echo ">>> done. binaries:" | |
| echo " $WORKDIR/llama.cpp/build/bin/llama-diffusion-cli" | |
| echo " $WORKDIR/llama.cpp/build/bin/llama-cli" | |