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 common/jinja/string.h from VladHong/llama-cpp-K2-FAST2: direct link, hf CLI and curl.
- Browser
- Download file 1.77 kB
-
https://huggingface.co/VladHong/llama-cpp-K2-FAST2/resolve/main/common/jinja/string.h
- Command line
-
hf download hf://VladHong/llama-cpp-K2-FAST2/common/jinja/string.h
-
curl -L -o string.h https://huggingface.co/VladHong/llama-cpp-K2-FAST2/resolve/main/common/jinja/string.h
1.77 kB
| namespace jinja { | |
| // allow differentiate between user input strings and template strings | |
| // transformations should handle this information as follows: | |
| // - one-to-one (e.g., uppercase, lowercase): preserve is_input flag | |
| // - one-to-many (e.g., strip): if input string is marked as is_input, all resulting parts should be marked as is_input | |
| // - many-to-one (e.g., concat): if ALL input parts are marked as is_input, resulting part should be marked as is_input | |
| struct string_part { | |
| bool is_input = false; // may skip parsing special tokens if true | |
| std::string val; | |
| bool is_uppercase() const; | |
| bool is_lowercase() const; | |
| }; | |
| struct string { | |
| std::vector<string_part> parts; | |
| string() = default; | |
| string(const std::string & v, bool user_input = false) { | |
| parts.push_back({user_input, v}); | |
| } | |
| string(int v) { | |
| parts.push_back({false, std::to_string(v)}); | |
| } | |
| string(double v) { | |
| parts.push_back({false, std::to_string(v)}); | |
| } | |
| // mark all parts as user input | |
| void mark_input(); | |
| std::string str() const; | |
| size_t length() const; | |
| void hash_update(hasher & hash) const noexcept; | |
| bool all_parts_are_input() const; | |
| bool is_uppercase() const; | |
| bool is_lowercase() const; | |
| // mark this string as input if other has ALL parts as input | |
| void mark_input_based_on(const string & other); | |
| string & append(const string & other); | |
| // in-place transformations | |
| string uppercase(); | |
| string lowercase(); | |
| string capitalize(); | |
| string titlecase(); | |
| string strip(bool left, bool right, std::optional<const std::string_view> chars = std::nullopt); | |
| }; | |
| } // namespace jinja | |