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/server/server-tools.h from VladHong/llama-cpp-K2-FAST2: direct link, hf CLI and curl.
- Browser
- Download file 1.53 kB
-
https://huggingface.co/VladHong/llama-cpp-K2-FAST2/resolve/main/tools/server/server-tools.h
- Command line
-
hf download hf://VladHong/llama-cpp-K2-FAST2/tools/server/server-tools.h
-
curl -L -o server-tools.h https://huggingface.co/VladHong/llama-cpp-K2-FAST2/resolve/main/tools/server/server-tools.h
1.53 kB
| struct server_tool { | |
| std::string name; | |
| std::string display_name; | |
| bool permission_write = false; | |
| bool support_stream = false; // if true, output can be streamed | |
| bool uses_cwd = false; // if true, the tool resolves paths and runs against the working directory | |
| virtual ~server_tool() = default; | |
| virtual json get_definition() const = 0; | |
| virtual std::string type() const { return "server"; } | |
| struct stream { | |
| server_response & qr; | |
| int id; | |
| std::function<bool()> alive; | |
| void push(const std::string & chunk); | |
| }; | |
| virtual json invoke(json params, stream * st = nullptr) const = 0; | |
| json to_json() const; | |
| }; | |
| struct server_tools_runtime; // impl detail, defined in server-tools.cpp | |
| struct server_tools { | |
| std::vector<std::unique_ptr<server_tool>> tools; | |
| // for streaming | |
| server_response queue_res; | |
| std::atomic<int> res_id{0}; | |
| // set when --tools-runtime is configured; routes every tool call through an isolate | |
| std::unique_ptr<server_tools_runtime> runtime; | |
| void setup(const std::vector<std::string> & enabled_tools, | |
| server_mcp & mcp_mgr, | |
| const std::string & tools_runtime); | |
| server_http_context::handler_t handle_get; | |
| server_http_context::handler_t handle_post; | |
| server_tools(); | |
| ~server_tools(); | |
| }; | |