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
Download ggml/src/ggml-hexagon/htp/dma-queue.c from Felipe97/llama-cpp-compiled: direct link, hf CLI and curl.
- Browser
- Download file 2.79 kB
-
https://huggingface.co/Felipe97/llama-cpp-compiled/resolve/main/ggml/src/ggml-hexagon/htp/dma-queue.c
- Command line
-
hf download hf://Felipe97/llama-cpp-compiled/ggml/src/ggml-hexagon/htp/dma-queue.c
-
curl -L -o dma-queue.c https://huggingface.co/Felipe97/llama-cpp-compiled/resolve/main/ggml/src/ggml-hexagon/htp/dma-queue.c
2.79 kB
| static inline uint32_t pow2_ceil(uint32_t x) { | |
| if (x <= 1) { | |
| return 1; | |
| } | |
| int p = 2; | |
| x--; | |
| while (x >>= 1) { | |
| p <<= 1; | |
| } | |
| return p; | |
| } | |
| static inline uintptr_t align_up(uintptr_t addr, size_t align) { | |
| return (addr + align - 1) & ~(align - 1); | |
| } | |
| size_t dma_queue_sizeof(size_t capacity) { | |
| capacity = pow2_ceil(capacity); | |
| size_t size_q = sizeof(dma_queue); | |
| size_t offset_r = align_up(size_q, HEX_L2_LINE_SIZE); | |
| size_t size_r = sizeof(dma_ring); | |
| size_t offset_desc = align_up(offset_r + size_r, HEX_L2_LINE_SIZE); | |
| size_t size_desc = capacity * sizeof(dma_descriptor_2d); | |
| size_t offset_dptr = align_up(offset_desc + size_desc, HEX_L2_LINE_SIZE); | |
| size_t size_dptr = capacity * sizeof(dma_ptr); | |
| return offset_dptr + size_dptr; | |
| } | |
| size_t dma_queue_alignof(void) { | |
| return HEX_L2_LINE_SIZE; | |
| } | |
| dma_queue_t dma_queue_init(void * ptr, size_t capacity, uintptr_t vtcm_base, size_t vtcm_size, struct htp_thread_trace * trace) { | |
| capacity = pow2_ceil(capacity); | |
| size_t size_q = sizeof(dma_queue); | |
| size_t offset_r = align_up(size_q, HEX_L2_LINE_SIZE); | |
| size_t size_r = sizeof(dma_ring); | |
| size_t offset_desc = align_up(offset_r + size_r, HEX_L2_LINE_SIZE); | |
| size_t size_desc = capacity * sizeof(dma_descriptor_2d); | |
| size_t offset_dptr = align_up(offset_desc + size_desc, HEX_L2_LINE_SIZE); | |
| size_t size_dptr = capacity * sizeof(dma_ptr); | |
| size_t total_size = offset_dptr + size_dptr; | |
| memset(ptr, 0, total_size); | |
| dma_queue * q = (dma_queue *) ptr; | |
| dma_ring * r = (dma_ring *) ((uintptr_t) ptr + offset_r); | |
| q->ring = r; | |
| q->nocache = 0; | |
| q->alias = false; | |
| r->trace = trace; | |
| r->vtcm_base = vtcm_base; | |
| r->vtcm_end = vtcm_base + vtcm_size; | |
| r->capacity = capacity; | |
| r->idx_mask = capacity - 1; | |
| r->push_idx = 0; | |
| r->pop_idx = 0; | |
| r->desc = (dma_descriptor_2d *) ((uintptr_t) ptr + offset_desc); | |
| r->dptr = (dma_ptr *) ((uintptr_t) ptr + offset_dptr); | |
| r->tail = &r->desc[capacity - 1]; | |
| FARF(HIGH, "dma-queue: capacity %u, unified memory size %zu\n", capacity, total_size); | |
| return q; | |
| } | |
| void dma_queue_free(dma_queue_t q) { | |
| (void) q; | |
| } | |
| size_t dma_queue_alias_sizeof(void) { | |
| return sizeof(dma_queue); | |
| } | |
| dma_queue_t dma_queue_alias_init(void * ptr, dma_queue_t main_q, uint8_t nocache) { | |
| dma_queue * q = (dma_queue *) ptr; | |
| memset(q, 0, sizeof(dma_queue)); | |
| q->ring = main_q->ring; | |
| q->nocache = nocache; | |
| q->alias = true; | |
| return q; | |
| } | |
| void dma_queue_alias_free(dma_queue_t q) { | |
| (void) q; | |
| } | |