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/cli/cli-context.h from VladHong/llama-cpp-K2-FAST2: direct link, hf CLI and curl.
- Browser
- Download file 2.15 kB
-
https://huggingface.co/VladHong/llama-cpp-K2-FAST2/resolve/main/tools/cli/cli-context.h
- Command line
-
hf download hf://VladHong/llama-cpp-K2-FAST2/tools/cli/cli-context.h
-
curl -L -o cli-context.h https://huggingface.co/VladHong/llama-cpp-K2-FAST2/resolve/main/tools/cli/cli-context.h
2.15 kB
| struct cli_timings { | |
| double prompt_per_second = 0.0; | |
| double predicted_per_second = 0.0; | |
| }; | |
| struct cli_context_impl; | |
| struct cli_context { | |
| common_params params; | |
| cli_client client; // always initialized | |
| std::optional<cli_server> server; // only set when no --server-base is given | |
| // properties of the connected server | |
| // will be populated by fetch_server_props() | |
| std::string model_name; | |
| std::string model_ftype; | |
| std::string build_info; | |
| bool has_vision = false; | |
| bool has_audio = false; | |
| bool has_video = false; | |
| std::optional<std::ofstream> output_file; | |
| cli_context(const common_params & params); | |
| ~cli_context(); | |
| // connect to --server-base or spawn a local llama-server child; | |
| // argc/argv are needed to forward the server-relevant args to the child | |
| bool init(); | |
| // run the interactive chat loop, returns the process exit code | |
| int run(); | |
| // stop the local server child (if any) | |
| void shutdown(); | |
| // set by the SIGINT handler; cleared once the interrupt has been handled | |
| static std::atomic<bool> & interrupted(); | |
| private: | |
| struct generated_content { | |
| std::string reasoning; | |
| std::string content; | |
| }; | |
| bool generate_completion(generated_content & content_out, cli_timings & timings); | |
| void fetch_server_props(); | |
| void add_system_prompt(); | |
| void push_user_message(const std::string & text); | |
| // check if server have multiple models (router mode) | |
| // if yes, list them then ask; do nothing otherwise | |
| bool list_and_ask_models(); | |
| // read a file and stage it as a multimodal content part; type is one of | |
| // "image", "audio", "video"; returns false if the file cannot be read | |
| bool stage_media_file(const std::string & fname, const std::string & type); | |
| // no-op if output file is not set | |
| void write_output_file(const std::string & content); | |
| std::unique_ptr<cli_context_impl> impl; | |
| }; | |