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/tests/unit/sanitize-headers.test.ts from VladHong/llama-cpp-K2-FAST2: direct link, hf CLI and curl.
- Browser
- Download file 2.83 kB
-
https://huggingface.co/VladHong/llama-cpp-K2-FAST2/resolve/main/tools/ui/tests/unit/sanitize-headers.test.ts
- Command line
-
hf download hf://VladHong/llama-cpp-K2-FAST2/tools/ui/tests/unit/sanitize-headers.test.ts
-
curl -L -o sanitize-headers.test.ts https://huggingface.co/VladHong/llama-cpp-K2-FAST2/resolve/main/tools/ui/tests/unit/sanitize-headers.test.ts
2.83 kB
| import { CORS_PROXY } from '$lib/constants'; | |
| import { sanitizeHeaders } from '$lib/utils/api-headers'; | |
| import { describe, expect, it } from 'vitest'; | |
| describe('sanitizeHeaders', () => { | |
| it('returns empty object for undefined input', () => { | |
| expect(sanitizeHeaders()).toEqual({}); | |
| }); | |
| it('passes through non-sensitive headers', () => { | |
| const headers = new Headers({ accept: 'text/html', 'content-type': 'application/json' }); | |
| expect(sanitizeHeaders(headers)).toEqual({ | |
| accept: 'text/html', | |
| 'content-type': 'application/json' | |
| }); | |
| }); | |
| it('redacts known sensitive headers', () => { | |
| const headers = new Headers({ | |
| authorization: 'Bearer secret', | |
| 'content-type': 'application/json', | |
| 'x-api-key': 'key-123' | |
| }); | |
| const result = sanitizeHeaders(headers); | |
| expect(result.authorization).toBe('[redacted]'); | |
| expect(result['x-api-key']).toBe('[redacted]'); | |
| expect(result['content-type']).toBe('application/json'); | |
| }); | |
| it('partially redacts headers specified in partialRedactHeaders', () => { | |
| const headers = new Headers({ 'mcp-session-id': 'session-12345' }); | |
| const partial = new Map([['mcp-session-id', 5]]); | |
| expect(sanitizeHeaders(headers, undefined, partial)['mcp-session-id']).toBe('....12345'); | |
| }); | |
| it('fully redacts mcp-session-id when no partialRedactHeaders is given', () => { | |
| const headers = new Headers({ 'mcp-session-id': 'session-12345' }); | |
| expect(sanitizeHeaders(headers)['mcp-session-id']).toBe('[redacted]'); | |
| }); | |
| it('redacts extra headers provided by the caller', () => { | |
| const headers = new Headers({ | |
| 'content-type': 'application/json', | |
| 'x-vendor-key': 'vendor-secret' | |
| }); | |
| const result = sanitizeHeaders(headers, ['x-vendor-key']); | |
| expect(result['x-vendor-key']).toBe('[redacted]'); | |
| expect(result['content-type']).toBe('application/json'); | |
| }); | |
| it('handles case-insensitive extra header names', () => { | |
| const headers = new Headers({ 'X-Custom-Token': 'token-value' }); | |
| const result = sanitizeHeaders(headers, ['X-CUSTOM-TOKEN']); | |
| expect(result['x-custom-token']).toBe('[redacted]'); | |
| }); | |
| it('redacts proxied sensitive and custom target headers', () => { | |
| const proxiedAuthorization = `${CORS_PROXY.HEADER_PREFIX}authorization`; | |
| const proxiedSessionId = `${CORS_PROXY.HEADER_PREFIX}mcp-session-id`; | |
| const proxiedVendorKey = `${CORS_PROXY.HEADER_PREFIX}x-vendor-key`; | |
| const headers = new Headers({ | |
| [proxiedAuthorization]: 'Bearer secret', | |
| [proxiedSessionId]: 'session-12345', | |
| [proxiedVendorKey]: 'vendor-secret' | |
| }); | |
| const partial = new Map([['mcp-session-id', 5]]); | |
| const result = sanitizeHeaders(headers, ['x-vendor-key'], partial); | |
| expect(result[proxiedAuthorization]).toBe('[redacted]'); | |
| expect(result[proxiedSessionId]).toBe('....12345'); | |
| expect(result[proxiedVendorKey]).toBe('[redacted]'); | |
| }); | |
| }); | |