Instructions to use tarruda/Hy3-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use tarruda/Hy3-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="tarruda/Hy3-GGUF", filename="Hy3-MTP-Q8_0.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use tarruda/Hy3-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 tarruda/Hy3-GGUF:Q8_0 # Run inference directly in the terminal: llama cli -hf tarruda/Hy3-GGUF:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf tarruda/Hy3-GGUF:Q8_0 # Run inference directly in the terminal: llama cli -hf tarruda/Hy3-GGUF:Q8_0
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 tarruda/Hy3-GGUF:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf tarruda/Hy3-GGUF:Q8_0
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 tarruda/Hy3-GGUF:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf tarruda/Hy3-GGUF:Q8_0
Use Docker
docker model run hf.co/tarruda/Hy3-GGUF:Q8_0
- LM Studio
- Jan
- vLLM
How to use tarruda/Hy3-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tarruda/Hy3-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": "tarruda/Hy3-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/tarruda/Hy3-GGUF:Q8_0
- Ollama
How to use tarruda/Hy3-GGUF with Ollama:
ollama run hf.co/tarruda/Hy3-GGUF:Q8_0
- Unsloth Studio
How to use tarruda/Hy3-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 tarruda/Hy3-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 tarruda/Hy3-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for tarruda/Hy3-GGUF to start chatting
- Pi
How to use tarruda/Hy3-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf tarruda/Hy3-GGUF:Q8_0
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": "tarruda/Hy3-GGUF:Q8_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use tarruda/Hy3-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 tarruda/Hy3-GGUF:Q8_0
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 tarruda/Hy3-GGUF:Q8_0
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use tarruda/Hy3-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf tarruda/Hy3-GGUF:Q8_0
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 "tarruda/Hy3-GGUF:Q8_0" \ --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"
- Docker Model Runner
How to use tarruda/Hy3-GGUF with Docker Model Runner:
docker model run hf.co/tarruda/Hy3-GGUF:Q8_0
- Lemonade
How to use tarruda/Hy3-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull tarruda/Hy3-GGUF:Q8_0
Run and chat with the model
lemonade run user.Hy3-GGUF-Q8_0
List all available models
lemonade list
| set -euo pipefail | |
| shopt -s extglob | |
| common_tensor_types=" | |
| " | |
| TYPE_DEFAULT_FALLBACK=Q8_0 | |
| recipes=( | |
| " | |
| RECIPE_NAME=IQ3_XXS | |
| TYPE_DEFAULT=q6_k | |
| ffn_down_exps=iq3_xxs | |
| ffn_gate_exps=iq3_xxs | |
| ffn_up_exps=iq3_xxs | |
| " | |
| ) | |
| recipe_line() { | |
| local line="$1" | |
| printf '%s' "${line##+([[:space:]])}" | |
| } | |
| recipe_value() { | |
| local recipe="$1" | |
| local key="$2" | |
| local line | |
| while IFS= read -r line || [ -n "$line" ]; do | |
| line="$(recipe_line "$line")" | |
| case "$line" in | |
| "${key}="*) | |
| printf '%s' "${line#*=}" | |
| return 0 | |
| ;; | |
| esac | |
| done <<<"$recipe" | |
| return 1 | |
| } | |
| recipe_type_default() { | |
| local recipe="$1" | |
| recipe_value "$recipe" TYPE_DEFAULT || printf '%s' "$TYPE_DEFAULT_FALLBACK" | |
| } | |
| print_recipes() { | |
| local recipe recipe_name type_default | |
| for recipe in "${recipes[@]}"; do | |
| recipe_name="$(recipe_value "$recipe" RECIPE_NAME)" | |
| type_default="$(recipe_type_default "$recipe")" | |
| printf ' %s:\n' "$recipe_name" | |
| printf ' TYPE_DEFAULT=%s\n' "$type_default" | |
| printf '\n' | |
| done | |
| } | |
| SELECTED_RECIPE_NAME= | |
| SELECTED_TYPE_DEFAULT= | |
| SELECTED_RECIPE= | |
| load_recipe() { | |
| local requested_recipe="$1" | |
| local recipe recipe_name | |
| for recipe in "${recipes[@]}"; do | |
| recipe_name="$(recipe_value "$recipe" RECIPE_NAME)" | |
| if [ "$recipe_name" = "$requested_recipe" ]; then | |
| SELECTED_RECIPE_NAME="$recipe_name" | |
| SELECTED_TYPE_DEFAULT="$(recipe_type_default "$recipe")" | |
| SELECTED_RECIPE="$recipe" | |
| return 0 | |
| fi | |
| done | |
| return 1 | |
| } | |
| append_tensor_type_lines() { | |
| local block="$1" | |
| local output_path="$2" | |
| local skip_recipe_metadata="${3:-false}" | |
| local line | |
| while IFS= read -r line || [ -n "$line" ]; do | |
| line="$(recipe_line "$line")" | |
| if [ "$skip_recipe_metadata" = true ]; then | |
| case "$line" in | |
| RECIPE_NAME=* | TYPE_DEFAULT=*) | |
| continue | |
| ;; | |
| esac | |
| fi | |
| if [ -z "$line" ]; then | |
| continue | |
| fi | |
| printf '%s\n' "$line" >>"$output_path" | |
| done <<<"$block" | |
| } | |
| write_tensor_type_file() { | |
| local recipe="$1" | |
| local output_path="$2" | |
| : >"$output_path" | |
| append_tensor_type_lines "$common_tensor_types" "$output_path" | |
| append_tensor_type_lines "$recipe" "$output_path" true | |
| } | |
| usage() { | |
| cat <<'EOF' | |
| Usage: quantize.sh <llama_cpp_dir> <recipe_name> [--dry-run] [--split] | |
| Outputs are written relative to the current directory. | |
| Environment overrides: | |
| INPUT_GGUF=<path> Input GGUF. Defaults to the first *BF16*.gguf in BF16/. | |
| IMATRIX_PATH=<path> Importance matrix path. Defaults to imatrix.gguf. | |
| Available recipes: | |
| EOF | |
| print_recipes | |
| cat <<'EOF' | |
| Examples: | |
| ./scripts/quantize.sh ~/code/llama.cpp IQ3_XXS --dry-run | |
| ./scripts/quantize.sh ~/code/llama.cpp IQ3_XXS | |
| ./scripts/quantize.sh ~/code/llama.cpp IQ3_XXS --split | |
| EOF | |
| } | |
| if [ $# -lt 2 ]; then | |
| usage | |
| exit 1 | |
| fi | |
| LLAMA_CPP_DIR="$1" | |
| REQUESTED_RECIPE="$2" | |
| DRY_RUN=false | |
| SPLIT=false | |
| shift 2 | |
| while [ $# -gt 0 ]; do | |
| case "$1" in | |
| --dry-run) | |
| DRY_RUN=true | |
| ;; | |
| --split) | |
| SPLIT=true | |
| ;; | |
| *) | |
| usage | |
| exit 1 | |
| ;; | |
| esac | |
| shift | |
| done | |
| SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | |
| PROJECT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)" | |
| BF16_DIR="$PROJECT_DIR/BF16" | |
| SPLIT_SCRIPT="$SCRIPT_DIR/split.sh" | |
| if ! load_recipe "$REQUESTED_RECIPE"; then | |
| echo "Error: unknown recipe: $REQUESTED_RECIPE" >&2 | |
| usage >&2 | |
| exit 1 | |
| fi | |
| if [ ! -d "$LLAMA_CPP_DIR" ]; then | |
| echo "Error: llama.cpp directory not found: $LLAMA_CPP_DIR" >&2 | |
| exit 1 | |
| fi | |
| QUANTIZE_BIN="$LLAMA_CPP_DIR/build/bin/llama-quantize" | |
| SPLIT_BIN="$LLAMA_CPP_DIR/build/bin/llama-gguf-split" | |
| if [ ! -x "$QUANTIZE_BIN" ]; then | |
| echo "Error: llama-quantize binary not found: $QUANTIZE_BIN" >&2 | |
| exit 1 | |
| fi | |
| if [ "$SPLIT" = true ] && [ ! -x "$SPLIT_SCRIPT" ]; then | |
| echo "Error: split script not found or not executable: $SPLIT_SCRIPT" >&2 | |
| exit 1 | |
| fi | |
| if [ "$SPLIT" = true ] && [ ! -x "$SPLIT_BIN" ]; then | |
| echo "Error: llama-gguf-split binary not found: $SPLIT_BIN" >&2 | |
| exit 1 | |
| fi | |
| if [ -z "${INPUT_GGUF-}" ]; then | |
| if [ ! -d "$BF16_DIR" ]; then | |
| echo "Error: BF16 directory not found: $BF16_DIR" >&2 | |
| exit 1 | |
| fi | |
| INPUT_GGUF="$(find "$BF16_DIR" -maxdepth 1 -name "*BF16*.gguf" -type f | sort | head -n 1)" | |
| fi | |
| if [ -z "$INPUT_GGUF" ] || [ ! -e "$INPUT_GGUF" ]; then | |
| echo "Error: input GGUF not found: ${INPUT_GGUF:-<none>}" >&2 | |
| exit 1 | |
| fi | |
| IMATRIX_PATH="${IMATRIX_PATH:-$PROJECT_DIR/imatrix.gguf}" | |
| if [ ! -e "$IMATRIX_PATH" ]; then | |
| echo "Error: imatrix file not found: $IMATRIX_PATH" >&2 | |
| exit 1 | |
| fi | |
| cd "$LLAMA_CPP_DIR" | |
| if [ -f .venv/bin/activate ]; then | |
| # shellcheck disable=SC1091 | |
| source .venv/bin/activate | |
| fi | |
| cd - >/dev/null | |
| OUTPUT_BASE_DIR="$(pwd)" | |
| INPUT_BASENAME="$(basename "$INPUT_GGUF")" | |
| MODEL_NAME="$(printf '%s\n' "$INPUT_BASENAME" | sed -E 's/-BF16(-[0-9]+-of-[0-9]+)?\.gguf$//')" | |
| INTERMEDIATE_OUTPUT="$OUTPUT_BASE_DIR/${MODEL_NAME}-${SELECTED_RECIPE_NAME}.gguf" | |
| OUTPUT_DIR="$OUTPUT_BASE_DIR/$SELECTED_RECIPE_NAME" | |
| if [ "$DRY_RUN" = false ] && [ -e "$INTERMEDIATE_OUTPUT" ]; then | |
| echo "Error: quantized output already exists: $INTERMEDIATE_OUTPUT" >&2 | |
| exit 1 | |
| fi | |
| TENSOR_TYPE_FILE="$(mktemp "${TMPDIR:-/tmp}/nex-n2-pro-tensor-types.XXXXXX")" | |
| cleanup() { | |
| rm -f "$TENSOR_TYPE_FILE" | |
| } | |
| trap cleanup EXIT | |
| write_tensor_type_file "$SELECTED_RECIPE" "$TENSOR_TYPE_FILE" | |
| echo "Input: $INPUT_GGUF" | |
| echo "Recipe name: $SELECTED_RECIPE_NAME" | |
| echo "Tensor type file: $TENSOR_TYPE_FILE" | |
| echo "Default type: $SELECTED_TYPE_DEFAULT" | |
| echo "imatrix: $IMATRIX_PATH" | |
| echo "Output base: $OUTPUT_BASE_DIR" | |
| echo "Split output: $SPLIT" | |
| if [ "$DRY_RUN" = true ]; then | |
| "$QUANTIZE_BIN" \ | |
| --dry-run \ | |
| --allow-requantize \ | |
| --tensor-type-file "$TENSOR_TYPE_FILE" \ | |
| --imatrix "$IMATRIX_PATH" \ | |
| "$INPUT_GGUF" \ | |
| "$INTERMEDIATE_OUTPUT" \ | |
| "$SELECTED_TYPE_DEFAULT" | |
| else | |
| "$QUANTIZE_BIN" \ | |
| --allow-requantize \ | |
| --tensor-type-file "$TENSOR_TYPE_FILE" \ | |
| --imatrix "$IMATRIX_PATH" \ | |
| "$INPUT_GGUF" \ | |
| "$INTERMEDIATE_OUTPUT" \ | |
| "$SELECTED_TYPE_DEFAULT" | |
| fi | |
| if [ "$DRY_RUN" = false ]; then | |
| if [ "$SPLIT" = true ]; then | |
| "$SPLIT_SCRIPT" \ | |
| "$LLAMA_CPP_DIR" \ | |
| "$INTERMEDIATE_OUTPUT" \ | |
| "$OUTPUT_DIR" \ | |
| "${MODEL_NAME}-${SELECTED_RECIPE_NAME}" \ | |
| --remove-input | |
| else | |
| echo "Quantization complete. Output saved to: $INTERMEDIATE_OUTPUT" | |
| fi | |
| fi | |