Instructions to use VladHong/llama-cpp-K2-FAST2 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 VladHong/llama-cpp-K2-FAST2 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 VladHong/llama-cpp-K2-FAST2 # Run inference directly in the terminal: llama cli -hf VladHong/llama-cpp-K2-FAST2
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf VladHong/llama-cpp-K2-FAST2 # Run inference directly in the terminal: llama cli -hf VladHong/llama-cpp-K2-FAST2
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 VladHong/llama-cpp-K2-FAST2 # Run inference directly in the terminal: ./build/bin/llama cli -hf VladHong/llama-cpp-K2-FAST2
Use Docker
docker model run hf.co/VladHong/llama-cpp-K2-FAST2
- Llama new
- LM Studio
- Jan
- Ollama
How to use VladHong/llama-cpp-K2-FAST2 with Ollama:
ollama run hf.co/VladHong/llama-cpp-K2-FAST2
- Unsloth Desktop
- Docker Model Runner
How to use VladHong/llama-cpp-K2-FAST2 with Docker Model Runner:
docker model run hf.co/VladHong/llama-cpp-K2-FAST2
- Lemonade
How to use VladHong/llama-cpp-K2-FAST2 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull VladHong/llama-cpp-K2-FAST2
Run and chat with the model
lemonade run user.llama-cpp-K2-FAST2-{{QUANT_TAG}}List all available models
lemonade list
- Atomic Chat
Download examples/model-conversion/scripts/utils/quantize.sh from VladHong/llama-cpp-K2-FAST2: direct link, hf CLI and curl.
- Browser
- Download file 1.47 kB
-
https://huggingface.co/VladHong/llama-cpp-K2-FAST2/resolve/main/examples/model-conversion/scripts/utils/quantize.sh
- Command line
-
hf download hf://VladHong/llama-cpp-K2-FAST2/examples/model-conversion/scripts/utils/quantize.sh
-
curl -L -o quantize.sh https://huggingface.co/VladHong/llama-cpp-K2-FAST2/resolve/main/examples/model-conversion/scripts/utils/quantize.sh
1.47 kB
| set -e | |
| CONVERTED_MODEL="${1:-"$CONVERTED_MODEL"}" | |
| QUANTIZED_TYPE="${2:-"$QUANTIZED_TYPE"}" | |
| TOKEN_EMBD_TYPE="${3:-"${TOKEN_EMBD_TYPE}"}" | |
| OUTPUT_TYPE="${4:-"${OUTPUT_TYPE}"}" | |
| BUILD_DIR="${5:-"$BUILD_DIR"}" | |
| QUANTIZED_MODEL=$CONVERTED_MODEL | |
| # Final check if we have a model path | |
| if [ -z "$CONVERTED_MODEL" ]; then | |
| echo "Error: Model path must be provided either as:" >&2 | |
| echo " 1. Command line argument" >&2 | |
| echo " 2. CONVERTED_MODEL environment variable" >&2 | |
| exit 1 | |
| fi | |
| if [ -z "$QUANTIZED_TYPE" ]; then | |
| echo "Error: QUANTIZED_TYPE is required" >&2 | |
| exit 1 | |
| fi | |
| echo $CONVERTED_MODEL | |
| # Process the quantized model filename | |
| if [[ "$QUANTIZED_MODEL" == *.gguf ]]; then | |
| # Remove .gguf suffix, add quantized type, then add .gguf back | |
| BASE_NAME="${QUANTIZED_MODEL%.gguf}" | |
| QUANTIZED_MODEL="${BASE_NAME}-${QUANTIZED_TYPE}.gguf" | |
| else | |
| echo "Error: QUANTIZED_MODEL must end with .gguf extension" >&2 | |
| exit 1 | |
| fi | |
| if [ -z "$BUILD_DIR" ]; then | |
| BUILD_DIR="../../build" | |
| fi | |
| cmake --build $BUILD_DIR --target llama-quantize -j8 | |
| echo $TOKEN_EMBD_TYPE | |
| echo $OUTPUT_TYPE | |
| CMD_ARGS=("${BUILD_DIR}/bin/llama-quantize") | |
| [[ -n "$TOKEN_EMBD_TYPE" ]] && CMD_ARGS+=("--token-embedding-type" "$TOKEN_EMBD_TYPE") | |
| [[ -n "$OUTPUT_TYPE" ]] && CMD_ARGS+=("--output-tensor-type" "$OUTPUT_TYPE") | |
| CMD_ARGS+=("$CONVERTED_MODEL" "$QUANTIZED_MODEL" "$QUANTIZED_TYPE") | |
| "${CMD_ARGS[@]}" | |
| echo "Quantized model saved to: $QUANTIZED_MODEL" | |