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
File size: 4,303 Bytes
c59fd93 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 | import { classifyToolResult } from '$lib/utils/agentic';
import { describe, expect, it } from 'vitest';
describe('classifyToolResult', () => {
describe('text', () => {
it('returns text for undefined input', () => {
expect(classifyToolResult(undefined)).toBe('text');
});
it('returns text for empty string', () => {
expect(classifyToolResult('')).toBe('text');
});
it('returns text for whitespace-only input', () => {
expect(classifyToolResult(' \n ')).toBe('text');
});
it('returns text for plain prose', () => {
expect(classifyToolResult('Hello, this is just some text.')).toBe('text');
});
it('returns text for shell-style line listings', () => {
expect(classifyToolResult('file1.java\nfile2.java\nfile3.java\n')).toBe('text');
});
it('returns text when a brace-like string is not valid JSON', () => {
expect(classifyToolResult('{key: value}')).toBe('text');
});
});
describe('json', () => {
it('classifies a flat JSON object', () => {
expect(classifyToolResult('{"key": "value", "n": 42}')).toBe('json');
});
it('classifies a JSON array', () => {
expect(classifyToolResult('["a", "b", "c"]')).toBe('json');
});
it('classifies a pretty-printed JSON object', () => {
expect(classifyToolResult('{\n "key": "value"\n}')).toBe('json');
});
it('classifies a deeply nested JSON payload', () => {
const nested = JSON.stringify({ items: [{ id: 1, tags: ['a', 'b'] }] }, null, 2);
expect(classifyToolResult(nested)).toBe('json');
});
it('prefers JSON over inner markdown markers when the content starts with a brace', () => {
// A JSON object whose inner strings contain link syntax still
// reads as JSON because the leading `{` parses cleanly -
// `classifyToolResult` only inspects the top-level shape, not
// every nested line marker.
const jsonWithLink = '{"docs": "see [docs](https://example.com) for more"}';
expect(classifyToolResult(jsonWithLink)).toBe('json');
});
});
describe('markdown', () => {
it('classifies an ATX header line', () => {
expect(classifyToolResult('# Title\n\nSome text below.')).toBe('markdown');
});
it('classifies a fenced code block', () => {
expect(classifyToolResult('```json\n{"key": "v"}\n```')).toBe('markdown');
});
it('classifies a tilde-fenced code block', () => {
expect(classifyToolResult('~~~bash\nls -la\n~~~')).toBe('markdown');
});
it('classifies a markdown link', () => {
expect(classifyToolResult('See [docs](https://example.com) for more.')).toBe('markdown');
});
it('classifies bold text', () => {
expect(classifyToolResult('This is **very important**.')).toBe('markdown');
});
it('classifies a bulleted list', () => {
expect(classifyToolResult('- item one\n- item two\n- item three')).toBe('markdown');
});
it('classifies an ordered list', () => {
expect(classifyToolResult('1. first step\n2. second step\n3. third step')).toBe('markdown');
});
it('classifies a blockquote', () => {
expect(classifyToolResult('> quoted text\n> second line')).toBe('markdown');
});
it('classifies a markdown table', () => {
const table = '| a | b |\n| - | - |\n| 1 | 2 |';
expect(classifyToolResult(table)).toBe('markdown');
});
it('classifies a markdown table with alignment markers', () => {
const table = '| left | center | right |\n| :--- | :---: | ---: |\n| a | b | c |';
expect(classifyToolResult(table)).toBe('markdown');
});
it('classifies nested markdown headings', () => {
expect(classifyToolResult('## Section\n\n### Subsection\n')).toBe('markdown');
});
it('classifies combined markdown markers in one document', () => {
const md = [
'# Heading',
'',
'A paragraph with a [link](https://example.com) and **bold text**.',
'',
'- bullet item',
'- another bullet',
'',
'| col1 | col2 |',
'| ----- | ----- |',
'| a | b |'
].join('\n');
expect(classifyToolResult(md)).toBe('markdown');
});
});
describe('precedence', () => {
it('prefers JSON over markdown when both signals are present', () => {
// Starts with `[`, parses as JSON - markdown check is skipped.
const arr = '[1, 2, "# not-a-heading", "**not-bold**"]';
expect(classifyToolResult(arr)).toBe('json');
});
});
});
|