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-schema.h from VladHong/llama-cpp-K2-FAST2: direct link, hf CLI and curl.
- Browser
- Download file 3.22 kB
-
https://huggingface.co/VladHong/llama-cpp-K2-FAST2/resolve/main/tools/server/server-schema.h
- Command line
-
hf download hf://VladHong/llama-cpp-K2-FAST2/tools/server/server-schema.h
-
curl -L -o server-schema.h https://huggingface.co/VladHong/llama-cpp-K2-FAST2/resolve/main/tools/server/server-schema.h
3.22 kB
| namespace server_schema { | |
| struct field_eval_context { | |
| task_params & params; | |
| const llama_vocab * vocab = nullptr; | |
| const std::vector<llama_logit_bias> * logit_bias_eog = nullptr; | |
| field_eval_context(task_params & params) : params(params) {} | |
| }; | |
| using field_handler = std::function<void(field_eval_context &, const json &)>; | |
| struct field { | |
| std::vector<const char *> name; | |
| const char * desc = ""; | |
| field_handler custom_handler; | |
| field() = default; | |
| field(const char * n) : name({n}) {} | |
| virtual ~field() = default; | |
| field * set_desc(const char * s) { | |
| desc = s; | |
| return this; | |
| } | |
| // if 'name' is present, use it, otherwise look for aliases following the order they were added | |
| field * add_alias(const char * n) { | |
| name.push_back(n); | |
| return this; | |
| } | |
| field * set_handler(field_handler h) { this->custom_handler = h; return this; } | |
| virtual void eval(field_eval_context & ctx, const json & data) = 0; | |
| }; | |
| template <typename T = int32_t> | |
| struct field_num : public field { | |
| T & val; | |
| T min = std::numeric_limits<T>::lowest(); | |
| T max = std::numeric_limits<T>::max(); | |
| bool is_hard_limit = false; // if true, throw error if the value is invalid | |
| field_num(const char * n, T & val) : field(n), val(val) {} | |
| // limits are inclusive, min <= value <= max | |
| field_num * set_limits(T min, T max) { | |
| this->min = min; | |
| this->max = max; | |
| return this; | |
| } | |
| field_num * set_hard_limits(T min, T max) { | |
| set_limits(min, max); | |
| is_hard_limit = true; | |
| return this; | |
| } | |
| virtual void eval(field_eval_context & ctx, const json & data) override; | |
| }; | |
| struct field_str : public field { | |
| field_str(const char * n) : field(n) {} | |
| virtual void eval(field_eval_context & ctx, const json & data) override; | |
| }; | |
| struct field_bool : public field { | |
| bool & val; | |
| field_bool(const char * n, bool & val) : field(n), val(val) {} | |
| virtual void eval(field_eval_context & ctx, const json & data) override; | |
| }; | |
| struct field_json : public field { | |
| field_json(const char * n) : field(n) {} | |
| virtual void eval(field_eval_context & ctx, const json & data) override; | |
| }; | |
| struct field_nested : public field { | |
| std::vector<std::unique_ptr<field>> subfields; | |
| field_nested(const char * n) : field(n) {} | |
| field_nested * add_subfield(field * f) { | |
| subfields.emplace_back(std::unique_ptr<field>(f)); | |
| return this; | |
| } | |
| virtual void eval(field_eval_context & ctx, const json & data) override; | |
| }; | |
| std::vector<std::unique_ptr<field>> make_llama_cmpl_schema( | |
| const common_params & params_base, | |
| task_params & params); | |
| task_params eval_llama_cmpl_schema( | |
| const llama_vocab * vocab, | |
| const common_params & params_base, | |
| const std::vector<llama_logit_bias> & logit_bias_eog, | |
| const json & data); | |
| } // namespace server_schema | |