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/client/chat-form-enter-code-block.svelte.test.ts from VladHong/llama-cpp-K2-FAST2: direct link, hf CLI and curl.
- Browser
- Download file 3.46 kB
-
https://huggingface.co/VladHong/llama-cpp-K2-FAST2/resolve/main/tools/ui/tests/client/chat-form-enter-code-block.svelte.test.ts
- Command line
-
hf download hf://VladHong/llama-cpp-K2-FAST2/tools/ui/tests/client/chat-form-enter-code-block.svelte.test.ts
-
curl -L -o chat-form-enter-code-block.svelte.test.ts https://huggingface.co/VladHong/llama-cpp-K2-FAST2/resolve/main/tools/ui/tests/client/chat-form-enter-code-block.svelte.test.ts
3.46 kB
| // Guards the Enter-key contract of the chat form against the | |
| // fenced-code-block flow: while the caret sits inside a fenced | |
| // block region - closed, or still OPEN while the user is typing | |
| // one - plain Enter adds a line instead of submitting the message. | |
| // The textarea path is covered here end-to-end (the ChatFormInputRich | |
| // consumes the same case locally; see chat-form-input-rich). | |
| import ChatFormTestWrapper from './components/ChatFormTestWrapper.svelte'; | |
| import { SETTINGS_KEYS } from '$lib/constants'; | |
| import { settingsStore } from '$lib/stores/settings/index.svelte'; | |
| import { tick } from 'svelte'; | |
| import { beforeEach, describe, expect, it, vi } from 'vitest'; | |
| import { userEvent } from 'vitest/browser'; | |
| import { render } from 'vitest-browser-svelte'; | |
| function textareaIn(container: HTMLElement): HTMLTextAreaElement { | |
| const el = container.querySelector('textarea'); | |
| if (!(el instanceof HTMLTextAreaElement)) throw new Error('textarea not rendered'); | |
| return el; | |
| } | |
| describe('ChatForm Enter in code blocks', () => { | |
| beforeEach(() => { | |
| settingsStore.updateConfig(SETTINGS_KEYS.SEND_ON_ENTER, true); | |
| }); | |
| it('adds a line after a still-open fence instead of submitting', async () => { | |
| const onSubmit = vi.fn(); | |
| const { container } = render(ChatFormTestWrapper, { onSubmit }); | |
| await tick(); | |
| const textarea = textareaIn(container); | |
| await userEvent.click(textarea); | |
| await userEvent.keyboard('```'); | |
| await tick(); | |
| await userEvent.keyboard('{Enter}'); | |
| await tick(); | |
| expect(onSubmit).not.toHaveBeenCalled(); | |
| expect(textarea.value).toBe('```\n'); | |
| }); | |
| it('keeps adding lines while the block stays open', async () => { | |
| const onSubmit = vi.fn(); | |
| const { container } = render(ChatFormTestWrapper, { onSubmit }); | |
| await tick(); | |
| const textarea = textareaIn(container); | |
| await userEvent.click(textarea); | |
| await userEvent.keyboard('```js'); | |
| await tick(); | |
| await userEvent.keyboard('{Enter}'); | |
| await userEvent.keyboard('const a = 1;'); | |
| await userEvent.keyboard('{Enter}'); | |
| await tick(); | |
| expect(onSubmit).not.toHaveBeenCalled(); | |
| expect(textarea.value).toBe('```js\nconst a = 1;\n'); | |
| }); | |
| it('submits when the caret is before the opening fence', async () => { | |
| const onSubmit = vi.fn(); | |
| const { container } = render(ChatFormTestWrapper, { onSubmit }); | |
| await tick(); | |
| const textarea = textareaIn(container); | |
| await userEvent.click(textarea); | |
| await userEvent.keyboard('```'); | |
| await tick(); | |
| textarea.setSelectionRange(0, 0); | |
| await userEvent.keyboard('{Enter}'); | |
| await tick(); | |
| expect(onSubmit).toHaveBeenCalledTimes(1); | |
| }); | |
| it('submits on Enter outside a code block', async () => { | |
| const onSubmit = vi.fn(); | |
| const { container } = render(ChatFormTestWrapper, { onSubmit }); | |
| await tick(); | |
| const textarea = textareaIn(container); | |
| await userEvent.click(textarea); | |
| await userEvent.keyboard('hello'); | |
| await tick(); | |
| await userEvent.keyboard('{Enter}'); | |
| await tick(); | |
| expect(onSubmit).toHaveBeenCalledTimes(1); | |
| }); | |
| it('submits on Ctrl+Enter even inside a code block', async () => { | |
| const onSubmit = vi.fn(); | |
| const { container } = render(ChatFormTestWrapper, { onSubmit }); | |
| await tick(); | |
| const textarea = textareaIn(container); | |
| await userEvent.click(textarea); | |
| await userEvent.keyboard('```'); | |
| await tick(); | |
| await userEvent.keyboard('{Control>}{Enter}{/Control}'); | |
| await tick(); | |
| expect(onSubmit).toHaveBeenCalledTimes(1); | |
| }); | |
| }); | |