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/conversation-utils.ts from VladHong/llama-cpp-K2-FAST2: direct link, hf CLI and curl.
- Browser
- Download file 3.35 kB
-
https://huggingface.co/VladHong/llama-cpp-K2-FAST2/resolve/main/tools/ui/src/lib/utils/conversation-utils.ts
- Command line
-
hf download hf://VladHong/llama-cpp-K2-FAST2/tools/ui/src/lib/utils/conversation-utils.ts
-
curl -L -o conversation-utils.ts https://huggingface.co/VladHong/llama-cpp-K2-FAST2/resolve/main/tools/ui/src/lib/utils/conversation-utils.ts
3.35 kB
| /** | |
| * Utility functions for conversation data manipulation | |
| */ | |
| import { MessageRole } from '$lib/enums'; | |
| import type { DatabaseMessage } from '$lib/types'; | |
| /** | |
| * Model that generated the conversation's latest assistant message, or null | |
| * when no assistant message carries one. | |
| */ | |
| export function getConversationModel(messages: readonly DatabaseMessage[]): string | null { | |
| for (let i = messages.length - 1; i >= 0; i--) { | |
| const message = messages[i]; | |
| if (message.role === MessageRole.ASSISTANT && message.model) return message.model; | |
| } | |
| return null; | |
| } | |
| /** | |
| * Creates a map of conversation IDs to their message counts from exported conversation data | |
| * @param exportedData - Array of exported conversations with their messages | |
| * @returns Map of conversation ID to message count | |
| */ | |
| export function createMessageCountMap( | |
| exportedData: Array<{ conv: DatabaseConversation; messages: DatabaseMessage[] }> | |
| ): Map<string, number> { | |
| const countMap = new Map<string, number>(); | |
| for (const item of exportedData) { | |
| countMap.set(item.conv.id, item.messages.length); | |
| } | |
| return countMap; | |
| } | |
| /** | |
| * Gets the message count for a specific conversation from the count map | |
| * @param conversationId - The ID of the conversation | |
| * @param countMap - Map of conversation IDs to message counts | |
| * @returns The message count, or 0 if not found | |
| */ | |
| export function getMessageCount(conversationId: string, countMap: Map<string, number>): number { | |
| return countMap.get(conversationId) ?? 0; | |
| } | |
| export interface ConversationTreeItem { | |
| conversation: DatabaseConversation; | |
| depth: number; | |
| } | |
| // Pinned conversations first, then by lastModified descending | |
| const comparePinnedThenRecent = (a: DatabaseConversation, b: DatabaseConversation) => { | |
| if (a.pinned && !b.pinned) return -1; | |
| if (!a.pinned && b.pinned) return 1; | |
| return b.lastModified - a.lastModified; | |
| }; | |
| /** | |
| * Builds a flat tree of conversations with depth levels for nested forks. | |
| * Accepts a pre-filtered list so search filtering stays in the component. | |
| * | |
| * Output order matches the sidebar render exactly: pinned first, then | |
| * unpinned by lastModified desc, with forks interleaved under their parents. | |
| * Range-select / marquee in the sidebar rely on this alignment. | |
| */ | |
| export function buildConversationTree(convs: DatabaseConversation[]): ConversationTreeItem[] { | |
| const childrenByParent = new Map<string, DatabaseConversation[]>(); | |
| const forkIds = new Set<string>(); | |
| for (const conv of convs) { | |
| if (conv.forkedFromConversationId) { | |
| forkIds.add(conv.id); | |
| const siblings = childrenByParent.get(conv.forkedFromConversationId) || []; | |
| siblings.push(conv); | |
| childrenByParent.set(conv.forkedFromConversationId, siblings); | |
| } | |
| } | |
| const result: ConversationTreeItem[] = []; | |
| const visited = new Set<string>(); | |
| function walk(conv: DatabaseConversation, depth: number) { | |
| visited.add(conv.id); | |
| result.push({ conversation: conv, depth }); | |
| const children = childrenByParent.get(conv.id); | |
| if (children) { | |
| children.sort(comparePinnedThenRecent); | |
| for (const child of children) { | |
| walk(child, depth + 1); | |
| } | |
| } | |
| } | |
| const roots = convs.filter((c) => !forkIds.has(c.id)).sort(comparePinnedThenRecent); | |
| for (const root of roots) { | |
| walk(root, 0); | |
| } | |
| for (const conv of convs) { | |
| if (!visited.has(conv.id)) { | |
| walk(conv, 1); | |
| } | |
| } | |
| return result; | |
| } | |