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: 5,238 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 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 | import { GLOB, SEARCH } from '$lib/constants';
import {
buildCaseInsensitiveGlob,
buildGlobSearchArgs,
highlightMatch,
joinPath,
rankEntries,
splitPathQuery
} from '$lib/utils';
import { describe, expect, it } from 'vitest';
describe('splitPathQuery', () => {
it('treats a plain query as a home-relative glob (not navigation)', () => {
expect(splitPathQuery('docs')).toBeNull();
});
it('navigates the root for `/`', () => {
expect(splitPathQuery('/')).toEqual({ last: '', parent: '/' });
});
it('navigates home for `~`', () => {
expect(splitPathQuery('~')).toEqual({ last: '', parent: '~' });
});
it('splits an absolute path into parent and last segment', () => {
expect(splitPathQuery('/Users/al/proj')).toEqual({ last: 'proj', parent: '/Users/al' });
});
it('navigates a Windows drive path written with backslashes', () => {
expect(splitPathQuery('C:\\repos\\llama.cpp')).toEqual({
last: 'llama.cpp',
parent: 'C:/repos'
});
});
it('navigates a Windows drive path written with forward slashes', () => {
expect(splitPathQuery('D:/repos')).toEqual({ last: 'repos', parent: 'D:/' });
});
it('treats a bare drive as its root', () => {
expect(splitPathQuery('D:')).toEqual({ last: '', parent: 'D:/' });
expect(splitPathQuery('D:\\')).toEqual({ last: '', parent: 'D:/' });
});
it('navigates a UNC share', () => {
expect(splitPathQuery('\\\\host\\share\\proj')).toEqual({
last: 'proj',
parent: '//host/share/'
});
});
it('keeps a backslash as a POSIX filename character', () => {
expect(splitPathQuery('/tmp/a\\b')).toEqual({ last: 'a\\b', parent: '/tmp' });
});
it('splits a home-relative path into parent and last segment', () => {
expect(splitPathQuery('~/Documents')).toEqual({ last: 'Documents', parent: '~' });
});
it('strips trailing slashes before splitting', () => {
expect(splitPathQuery('/Users/al/')).toEqual({ last: 'al', parent: '/Users' });
});
it('handles a single-segment absolute path', () => {
expect(splitPathQuery('/opt')).toEqual({ last: 'opt', parent: '/' });
});
});
describe('buildCaseInsensitiveGlob', () => {
it('wraps letters in case-insensitive character classes', () => {
expect(buildCaseInsensitiveGlob('ab')).toBe('*[aA][bB]*');
});
it('escapes glob metacharacters into literal fragments', () => {
expect(buildCaseInsensitiveGlob('a*b')).toBe('*[aA][*][bB]*');
});
});
describe('rankEntries', () => {
const entries = [
{ path: '/h/README', type: 'dir' },
{ path: '/h/read', type: 'dir' },
{ path: '/h/readme.txt', type: 'dir' }
];
it('ranks exact basename match first', () => {
const ranked = rankEntries(entries, 'read');
expect(ranked[0].path).toBe('/h/read');
});
it('breaks ties by shorter path, then alphabetically', () => {
const ranked = rankEntries(entries, 'read');
expect(ranked[ranked.length - 1].path).toBe('/h/readme.txt');
});
it('does not mutate the input', () => {
const snapshot = [...entries];
rankEntries(entries, 'read');
expect(entries).toEqual(snapshot);
});
});
describe('joinPath', () => {
it('joins base and relative avoiding a double slash', () => {
expect(joinPath('/home/al/', 'docs')).toBe('/home/al/docs');
});
it('returns the relative path when base is empty', () => {
expect(joinPath('', 'docs')).toBe('docs');
});
});
describe('highlightMatch', () => {
it('returns a single non-matching segment when query is empty', () => {
expect(highlightMatch('abc', '')).toEqual([{ match: false, text: 'abc' }]);
});
it('marks every case-insensitive occurrence of the query', () => {
expect(highlightMatch('aXa', 'ax')).toEqual([
{ match: true, text: 'aX' },
{ match: false, text: 'a' }
]);
});
it('returns non-matching text when the query is absent', () => {
expect(highlightMatch('abc', 'z')).toEqual([{ match: false, text: 'abc' }]);
});
});
describe('buildGlobSearchArgs', () => {
const DEPTH = 6;
it('glob-matches home-relative within the scope path', () => {
const args = buildGlobSearchArgs('docs', '/home', DEPTH);
expect(args.path).toBe('/home');
expect(args.include).toBe(buildCaseInsensitiveGlob('docs'));
expect(args.maxDepth).toBe(DEPTH);
expect(args.rankQuery).toBe('docs');
expect(args.last).toBeUndefined();
});
it('navigates home for a `~` path query', () => {
const args = buildGlobSearchArgs('~/proj', '/home', DEPTH);
expect(args.path).toBe('~');
expect(args.include).toBe(buildCaseInsensitiveGlob('proj'));
expect(args.maxDepth).toBe(SEARCH.PATH_NAV_MAX_DEPTH);
expect(args.rankQuery).toBe('proj');
expect(args.last).toBe('proj');
});
it('lists the scope root when a path query has no last segment', () => {
const args = buildGlobSearchArgs('~/', '/home', DEPTH);
expect(args.path).toBe('~');
expect(args.include).toBe(GLOB.WILDCARD);
expect(args.maxDepth).toBe(SEARCH.PATH_NAV_MAX_DEPTH);
});
it('navigates an absolute path under its root', () => {
const args = buildGlobSearchArgs('/usr/local/bin', '/home', DEPTH);
expect(args.path).toBe('/usr/local');
expect(args.include).toBe(buildCaseInsensitiveGlob('bin'));
expect(args.maxDepth).toBe(SEARCH.PATH_NAV_MAX_DEPTH);
expect(args.rankQuery).toBe('bin');
expect(args.last).toBe('bin');
});
});
|