Instructions to use OmniContent/LAVA-models 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 OmniContent/LAVA-models 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 OmniContent/LAVA-models:Q4_K_M # Run inference directly in the terminal: llama cli -hf OmniContent/LAVA-models:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf OmniContent/LAVA-models:Q4_K_M # Run inference directly in the terminal: llama cli -hf OmniContent/LAVA-models:Q4_K_M
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 OmniContent/LAVA-models:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf OmniContent/LAVA-models:Q4_K_M
Use Docker
docker model run hf.co/OmniContent/LAVA-models:Q4_K_M
- Llama new
- LM Studio
- Jan
- Ollama
How to use OmniContent/LAVA-models with Ollama:
ollama run hf.co/OmniContent/LAVA-models:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use OmniContent/LAVA-models with Docker Model Runner:
docker model run hf.co/OmniContent/LAVA-models:Q4_K_M
- Lemonade
How to use OmniContent/LAVA-models with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull OmniContent/LAVA-models:Q4_K_M
Run and chat with the model
lemonade run user.LAVA-models-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Download llama/common/unicode.cpp from OmniContent/LAVA-models: direct link, hf CLI and curl.
- Browser
- Download file 2.56 kB
-
https://huggingface.co/OmniContent/LAVA-models/resolve/main/llama/common/unicode.cpp
- Command line
-
hf download hf://OmniContent/LAVA-models/llama/common/unicode.cpp
-
curl -L -o unicode.cpp https://huggingface.co/OmniContent/LAVA-models/resolve/main/llama/common/unicode.cpp
2.56 kB
| // implementation adopted from src/unicode.cpp | |
| size_t utf8_sequence_length(unsigned char first_byte) { | |
| const size_t lookup[] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 4 }; | |
| uint8_t highbits = static_cast<uint8_t>(first_byte) >> 4; | |
| return lookup[highbits]; | |
| } | |
| utf8_parse_result parse_utf8_codepoint(std::string_view input, size_t offset) { | |
| if (offset >= input.size()) { | |
| return utf8_parse_result(utf8_parse_result::INCOMPLETE); | |
| } | |
| // ASCII fast path | |
| if (!(input[offset] & 0x80)) { | |
| return utf8_parse_result(utf8_parse_result::SUCCESS, input[offset], 1); | |
| } | |
| // Invalid: continuation byte as first byte | |
| if (!(input[offset] & 0x40)) { | |
| return utf8_parse_result(utf8_parse_result::INVALID); | |
| } | |
| // 2-byte sequence | |
| if (!(input[offset] & 0x20)) { | |
| if (offset + 1 >= input.size()) { | |
| return utf8_parse_result(utf8_parse_result::INCOMPLETE); | |
| } | |
| if ((input[offset + 1] & 0xc0) != 0x80) { | |
| return utf8_parse_result(utf8_parse_result::INVALID); | |
| } | |
| auto result = ((input[offset] & 0x1f) << 6) | (input[offset + 1] & 0x3f); | |
| return utf8_parse_result(utf8_parse_result::SUCCESS, result, 2); | |
| } | |
| // 3-byte sequence | |
| if (!(input[offset] & 0x10)) { | |
| if (offset + 2 >= input.size()) { | |
| return utf8_parse_result(utf8_parse_result::INCOMPLETE); | |
| } | |
| if ((input[offset + 1] & 0xc0) != 0x80 || (input[offset + 2] & 0xc0) != 0x80) { | |
| return utf8_parse_result(utf8_parse_result::INVALID); | |
| } | |
| auto result = ((input[offset] & 0x0f) << 12) | ((input[offset + 1] & 0x3f) << 6) | (input[offset + 2] & 0x3f); | |
| return utf8_parse_result(utf8_parse_result::SUCCESS, result, 3); | |
| } | |
| // 4-byte sequence | |
| if (!(input[offset] & 0x08)) { | |
| if (offset + 3 >= input.size()) { | |
| return utf8_parse_result(utf8_parse_result::INCOMPLETE); | |
| } | |
| if ((input[offset + 1] & 0xc0) != 0x80 || (input[offset + 2] & 0xc0) != 0x80 || (input[offset + 3] & 0xc0) != 0x80) { | |
| return utf8_parse_result(utf8_parse_result::INVALID); | |
| } | |
| auto result = ((input[offset] & 0x07) << 18) | ((input[offset + 1] & 0x3f) << 12) | ((input[offset + 2] & 0x3f) << 6) | (input[offset + 3] & 0x3f); | |
| return utf8_parse_result(utf8_parse_result::SUCCESS, result, 4); | |
| } | |
| // Invalid first byte | |
| return utf8_parse_result(utf8_parse_result::INVALID); | |
| } | |