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/tools/server/webui/src/lib/services/models.ts from OmniContent/LAVA-models: direct link, hf CLI and curl.
- Browser
- Download file 4.98 kB
-
https://huggingface.co/OmniContent/LAVA-models/resolve/main/llama/tools/server/webui/src/lib/services/models.ts
- Command line
-
hf download hf://OmniContent/LAVA-models/llama/tools/server/webui/src/lib/services/models.ts
-
curl -L -o models.ts https://huggingface.co/OmniContent/LAVA-models/resolve/main/llama/tools/server/webui/src/lib/services/models.ts
4.98 kB
| import { base } from '$app/paths'; | |
| import { ServerModelStatus } from '$lib/enums'; | |
| import { getJsonHeaders } from '$lib/utils'; | |
| /** | |
| * ModelsService - Stateless service for model management API communication | |
| * | |
| * This service handles communication with model-related endpoints: | |
| * - `/v1/models` - OpenAI-compatible model list (MODEL + ROUTER mode) | |
| * - `/models/load`, `/models/unload` - Router-specific model management (ROUTER mode only) | |
| * | |
| * **Responsibilities:** | |
| * - List available models | |
| * - Load/unload models (ROUTER mode) | |
| * - Check model status (ROUTER mode) | |
| * | |
| * **Used by:** | |
| * - modelsStore: Primary consumer for model state management | |
| */ | |
| export class ModelsService { | |
| // βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| // Listing | |
| // βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| /** | |
| * Fetch list of models from OpenAI-compatible endpoint | |
| * Works in both MODEL and ROUTER modes | |
| */ | |
| static async list(): Promise<ApiModelListResponse> { | |
| const response = await fetch(`${base}/v1/models`, { | |
| headers: getJsonHeaders() | |
| }); | |
| if (!response.ok) { | |
| throw new Error(`Failed to fetch model list (status ${response.status})`); | |
| } | |
| return response.json() as Promise<ApiModelListResponse>; | |
| } | |
| /** | |
| * Fetch list of all models with detailed metadata (ROUTER mode) | |
| * Returns models with load status, paths, and other metadata | |
| */ | |
| static async listRouter(): Promise<ApiRouterModelsListResponse> { | |
| const response = await fetch(`${base}/v1/models`, { | |
| headers: getJsonHeaders() | |
| }); | |
| if (!response.ok) { | |
| throw new Error(`Failed to fetch router models list (status ${response.status})`); | |
| } | |
| return response.json() as Promise<ApiRouterModelsListResponse>; | |
| } | |
| // βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| // Load/Unload | |
| // βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| /** | |
| * Load a model (ROUTER mode) | |
| * POST /models/load | |
| * @param modelId - Model identifier to load | |
| * @param extraArgs - Optional additional arguments to pass to the model instance | |
| */ | |
| static async load(modelId: string, extraArgs?: string[]): Promise<ApiRouterModelsLoadResponse> { | |
| const payload: { model: string; extra_args?: string[] } = { model: modelId }; | |
| if (extraArgs && extraArgs.length > 0) { | |
| payload.extra_args = extraArgs; | |
| } | |
| const response = await fetch(`${base}/models/load`, { | |
| method: 'POST', | |
| headers: getJsonHeaders(), | |
| body: JSON.stringify(payload) | |
| }); | |
| if (!response.ok) { | |
| const errorData = await response.json().catch(() => ({})); | |
| throw new Error(errorData.error || `Failed to load model (status ${response.status})`); | |
| } | |
| return response.json() as Promise<ApiRouterModelsLoadResponse>; | |
| } | |
| /** | |
| * Unload a model (ROUTER mode) | |
| * POST /models/unload | |
| * @param modelId - Model identifier to unload | |
| */ | |
| static async unload(modelId: string): Promise<ApiRouterModelsUnloadResponse> { | |
| const response = await fetch(`${base}/models/unload`, { | |
| method: 'POST', | |
| headers: getJsonHeaders(), | |
| body: JSON.stringify({ model: modelId }) | |
| }); | |
| if (!response.ok) { | |
| const errorData = await response.json().catch(() => ({})); | |
| throw new Error(errorData.error || `Failed to unload model (status ${response.status})`); | |
| } | |
| return response.json() as Promise<ApiRouterModelsUnloadResponse>; | |
| } | |
| // βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| // Status | |
| // βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| /** | |
| * Check if a model is loaded based on its metadata | |
| */ | |
| static isModelLoaded(model: ApiModelDataEntry): boolean { | |
| return model.status.value === ServerModelStatus.LOADED; | |
| } | |
| /** | |
| * Check if a model is currently loading | |
| */ | |
| static isModelLoading(model: ApiModelDataEntry): boolean { | |
| return model.status.value === ServerModelStatus.LOADING; | |
| } | |
| } | |