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 tools/ui/src/lib/utils/api-headers.ts from VladHong/llama-cpp-K2-FAST2: direct link, hf CLI and curl.
- Browser
- Download file 2.52 kB
-
https://huggingface.co/VladHong/llama-cpp-K2-FAST2/resolve/main/tools/ui/src/lib/utils/api-headers.ts
- Command line
-
hf download hf://VladHong/llama-cpp-K2-FAST2/tools/ui/src/lib/utils/api-headers.ts
-
curl -L -o api-headers.ts https://huggingface.co/VladHong/llama-cpp-K2-FAST2/resolve/main/tools/ui/src/lib/utils/api-headers.ts
2.52 kB
| import { redactValue } from './redact'; | |
| import { CORS_PROXY, HEADERS } from '$lib/constants'; | |
| import { MimeTypeApplication } from '$lib/enums'; | |
| import { settingsStore } from '$lib/stores/settings/index.svelte'; | |
| /** | |
| * Get authorization headers for API requests | |
| * Includes Bearer token if API key is configured | |
| */ | |
| export function getAuthHeaders(): Record<string, string> { | |
| const currentConfig = settingsStore.config; | |
| const apiKey = currentConfig.apiKey?.toString().trim(); | |
| return apiKey ? { [HEADERS.AUTHORIZATION]: `${HEADERS.BEARER}${apiKey}` } : {}; | |
| } | |
| /** | |
| * Get standard JSON headers with optional authorization | |
| */ | |
| export function getJsonHeaders(): Record<string, string> { | |
| return { | |
| [HEADERS.CONTENT_TYPE]: MimeTypeApplication.JSON, | |
| ...getAuthHeaders() | |
| }; | |
| } | |
| /** | |
| * Sanitize HTTP headers by redacting sensitive values. | |
| * Known sensitive headers (from HEADERS.REDACTED) and any extra headers | |
| * specified by the caller are fully redacted. Headers listed in | |
| * `partialRedactHeaders` are partially redacted, showing only the | |
| * specified number of trailing characters. | |
| * | |
| * @param headers - Headers to sanitize | |
| * @param extraRedactedHeaders - Additional header names to fully redact | |
| * @param partialRedactHeaders - Map of header name -> number of trailing chars to keep visible | |
| * @returns Object with header names as keys and (possibly redacted) values | |
| */ | |
| export function sanitizeHeaders( | |
| headers?: HeadersInit, | |
| extraRedactedHeaders?: Iterable<string>, | |
| partialRedactHeaders?: Map<string, number> | |
| ): Record<string, string> { | |
| if (!headers) { | |
| return {}; | |
| } | |
| const normalized = new Headers(headers); | |
| const sanitized: Record<string, string> = {}; | |
| const redactedHeaders = new Set( | |
| Array.from(extraRedactedHeaders ?? [], (header) => header.toLowerCase()) | |
| ); | |
| for (const [key, value] of normalized.entries()) { | |
| const normalizedKey = key.toLowerCase(); | |
| const unproxiedKey = normalizedKey.startsWith(CORS_PROXY.HEADER_PREFIX) | |
| ? normalizedKey.slice(CORS_PROXY.HEADER_PREFIX.length) | |
| : normalizedKey; | |
| const partialChars = | |
| partialRedactHeaders?.get(normalizedKey) ?? partialRedactHeaders?.get(unproxiedKey); | |
| if (partialChars !== undefined) { | |
| sanitized[key] = redactValue(value, partialChars); | |
| } else if ( | |
| HEADERS.REDACTED.has(normalizedKey) || | |
| HEADERS.REDACTED.has(unproxiedKey) || | |
| redactedHeaders.has(normalizedKey) || | |
| redactedHeaders.has(unproxiedKey) | |
| ) { | |
| sanitized[key] = redactValue(value); | |
| } else { | |
| sanitized[key] = value; | |
| } | |
| } | |
| return sanitized; | |
| } | |