Instructions to use Felipe97/llama-cpp-compiled 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 Felipe97/llama-cpp-compiled 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 Felipe97/llama-cpp-compiled # Run inference directly in the terminal: llama cli -hf Felipe97/llama-cpp-compiled
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Felipe97/llama-cpp-compiled # Run inference directly in the terminal: llama cli -hf Felipe97/llama-cpp-compiled
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 Felipe97/llama-cpp-compiled # Run inference directly in the terminal: ./build/bin/llama cli -hf Felipe97/llama-cpp-compiled
Use Docker
docker model run hf.co/Felipe97/llama-cpp-compiled
- Llama new
- LM Studio
- Jan
- Ollama
How to use Felipe97/llama-cpp-compiled with Ollama:
ollama run hf.co/Felipe97/llama-cpp-compiled
- Unsloth Desktop
- Docker Model Runner
How to use Felipe97/llama-cpp-compiled with Docker Model Runner:
docker model run hf.co/Felipe97/llama-cpp-compiled
- Lemonade
How to use Felipe97/llama-cpp-compiled with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Felipe97/llama-cpp-compiled
Run and chat with the model
lemonade run user.llama-cpp-compiled-{{QUANT_TAG}}List all available models
lemonade list
- Atomic Chat
llama-cpp-compiled / examples /llama.android /lib /src /main /java /com /arm /aichat /InferenceEngine.kt
Download examples/llama.android/lib/src/main/java/com/arm/aichat/InferenceEngine.kt from Felipe97/llama-cpp-compiled: direct link, hf CLI and curl.
- Browser
- Download file 2.37 kB
-
https://huggingface.co/Felipe97/llama-cpp-compiled/resolve/eb01745a30edbb7d4a07c59607748e2f8f2cd8de/examples/llama.android/lib/src/main/java/com/arm/aichat/InferenceEngine.kt
- Command line
-
hf download hf://Felipe97/llama-cpp-compiled@eb01745a30edbb7d4a07c59607748e2f8f2cd8de/examples/llama.android/lib/src/main/java/com/arm/aichat/InferenceEngine.kt
-
curl -L -o InferenceEngine.kt https://huggingface.co/Felipe97/llama-cpp-compiled/resolve/eb01745a30edbb7d4a07c59607748e2f8f2cd8de/examples/llama.android/lib/src/main/java/com/arm/aichat/InferenceEngine.kt
2.37 kB
| package com.arm.aichat | |
| import com.arm.aichat.InferenceEngine.State | |
| import kotlinx.coroutines.flow.Flow | |
| import kotlinx.coroutines.flow.StateFlow | |
| /** | |
| * Interface defining the core LLM inference operations. | |
| */ | |
| interface InferenceEngine { | |
| /** | |
| * Current state of the inference engine | |
| */ | |
| val state: StateFlow<State> | |
| /** | |
| * Load a model from the given path. | |
| * | |
| * @throws UnsupportedArchitectureException if model architecture not supported | |
| */ | |
| suspend fun loadModel(pathToModel: String) | |
| /** | |
| * Sends a system prompt to the loaded model | |
| */ | |
| suspend fun setSystemPrompt(systemPrompt: String) | |
| /** | |
| * Sends a user prompt to the loaded model and returns a Flow of generated tokens. | |
| */ | |
| fun sendUserPrompt(message: String, predictLength: Int = DEFAULT_PREDICT_LENGTH): Flow<String> | |
| /** | |
| * Runs a benchmark with the specified parameters. | |
| */ | |
| suspend fun bench(pp: Int, tg: Int, pl: Int, nr: Int = 1): String | |
| /** | |
| * Unloads the currently loaded model. | |
| */ | |
| fun cleanUp() | |
| /** | |
| * Cleans up resources when the engine is no longer needed. | |
| */ | |
| fun destroy() | |
| /** | |
| * States of the inference engine | |
| */ | |
| sealed class State { | |
| object Uninitialized : State() | |
| object Initializing : State() | |
| object Initialized : State() | |
| object LoadingModel : State() | |
| object UnloadingModel : State() | |
| object ModelReady : State() | |
| object Benchmarking : State() | |
| object ProcessingSystemPrompt : State() | |
| object ProcessingUserPrompt : State() | |
| object Generating : State() | |
| data class Error(val exception: Exception) : State() | |
| } | |
| companion object { | |
| const val DEFAULT_PREDICT_LENGTH = 1024 | |
| } | |
| } | |
| val State.isUninterruptible | |
| get() = this is State.Initializing || | |
| this is State.LoadingModel || | |
| this is State.UnloadingModel || | |
| this is State.Benchmarking || | |
| this is State.ProcessingSystemPrompt || | |
| this is State.ProcessingUserPrompt | |
| val State.isModelLoaded: Boolean | |
| get() = this is State.ModelReady || | |
| this is State.Benchmarking || | |
| this is State.ProcessingSystemPrompt || | |
| this is State.ProcessingUserPrompt || | |
| this is State.Generating | |
| class UnsupportedArchitectureException : Exception() | |