Logo de Llamacpp Xpu Run

Llamacpp Xpu Run

Organização
intel
llamacpp-xpu-run

Run a GGUF model on an Intel GPU using llama.cpp's SYCL backend (Level Zero) with the official intel.Dockerfile. Covers building the Docker image from source at a pinned tag, launching llama-server with an OpenAI-compatible API, device selection, multi-GPU layer splitting, all recommended runtime env vars, flash-attention, and quantisation selection. Use when the user has a GGUF model and wants fast local inference or an OpenAI-compatible endpoint on Intel GPU without Python/PyTorch. The CUDA analogue is llama.cpp built with `-DGGML_CUDA=ON`. Use **vllm-xpu-run** instead for safetensors models with continuous batching at scale; use **torch-xpu-run** for Hugging Face Transformers direct.

Visão geral

Publicado porintel
Repositórioskills
Nome da habilidadellamacpp-xpu-run
Estrelas
31
Forks
14
Arquivos incluídos
3
LicençaApache-2.0
Links
  • Instruções em Markdown

    Um arquivo SKILL.md que o modelo carrega sob demanda, consumindo tokens apenas quando uma solicitação é realmente relevante para a habilidade.

  • Funciona com qualquer LLM

    As habilidades de IA são escritas em Markdown simples, não em código específico de um provedor. Por isso, funcionam com GPT, Claude, Gemini, Grok ou um modelo local.

  • Arquivos incluídos: 3

    Scripts, templates e referências que o modelo pode ler enquanto trabalha. Os arquivos são somente para leitura e nunca são executados.

  • Código aberto

    Publicada por intel no GitHub. Leia os arquivos da habilidade antes de instalá-la.

Instalação

Instale a habilidade de IA Llamacpp Xpu Run no TypingMind para usá-la com qualquer LLM ou adicione-a a outro agente que leia SKILL.md.

1

Instalar no TypingMind

O TypingMind instala uma habilidade diretamente da pasta dela no GitHub — lê o arquivo SKILL.md, reúne os arquivos de recursos em um pacote e armazena o resultado localmente.

  1. Abra o app e vá para Plugins → Habilidades.
  2. Escolha "Instalar do GitHub".
  3. Cole a URL abaixo, que aponta para a pasta da habilidade, e confirme.
    https://github.com/intel/skills/tree/main/skills/llamacpp-xpu-run
  4. Ative a habilidade em cada chat em que quiser disponibilizá-la.
Plugins → Habilidades → Adicionar habilidade → Via URL do GitHub. Depois, cole a URL da pasta e pressione Continuar.
2

Instalar em outro agente

Qualquer agente que leia o formato Agent Skills pode usar esta habilidade — copie a pasta para o diretório de habilidades desse agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/intel/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/llamacpp-xpu-run .claude/skills/llamacpp-xpu-run
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative Llamacpp Xpu Run em qualquer chat do TypingMind e o modelo cuida do resto. O nome e a descrição da habilidade ficam no prompt do sistema e, assim que uma solicitação relevante aparece, o modelo carrega as instruções completas automaticamente — sem precisar de acionamento manual e sem consumir tokens até que ela seja realmente usada.

O modelo carrega Llamacpp Xpu Run automaticamente assim que uma solicitação é relevante para essa habilidade.

Funciona com qualquer modelo de IA

Habilidades de IA são instruções em Markdown simples, não código específico de um provedor. Por isso, Llamacpp Xpu Run não fica vinculada ao modelo para o qual foi criada. Instale-a uma vez no TypingMind e use-a com GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou um modelo local executado por conta própria — tudo com suas próprias chaves de API.

  • Carregada apenas quando necessário

    O prompt do sistema contém apenas o nome e a descrição. As instruções são buscadas na primeira solicitação relevante, então uma habilidade sem uso não gera custo.

  • Troque de modelo durante a conversa

    Como a habilidade é composta de instruções, não de código, trocar de modelo não afeta seu funcionamento — o próximo modelo lê o mesmo arquivo SKILL.md.

Instruções da habilidade

Este é o conteúdo de SKILL.md que o modelo carrega. Leia antes de instalar — uma habilidade é um conjunto de instruções que seu modelo seguirá.

llamacpp-xpu-run

Run GGUF models on Intel GPUs via llama.cpp's SYCL backend. The official .devops/intel.Dockerfile is the canonical build path.

Tested against tag b9494 on Intel Arc B70 (Battlemage, level_zero:0).

CRITICAL SAFETY RULE: When removing a docker container, always docker stop first, then docker rm. Never use docker prune or any system-wide process-kill command.

Performance note

When the Docker image and GGUF model are already present, launch the server immediately. Skip redundant image rebuilds and device checks — the server will fail fast if misconfigured. Always verify with the health endpoint after launch (see Validate section below).

Use a pinned upstream tag (e.g. :b9494), not :latest. docker run reuses any locally-tagged image with no upstream check, so a stale llama-server-sycl:latest will silently run. If the user requests :latest, rebuild with --no-cache first, or resolve latest to the current upstream tag and build with that pinned name.

CUDA → XPU cheat sheet

CUDAIntel SYCL
-DGGML_CUDA=ON-DGGML_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx
CUDA_VISIBLE_DEVICES=0ONEAPI_DEVICE_SELECTOR="level_zero:0"
--gpus all (Docker)--device /dev/dri --group-add render
--n-gpu-layers 99same (-ngl 99)

Before running any docker commands below, confirm with the user that they want to proceed. The following steps will launch a Docker container and may modify system state.

Build

Confirm the tag and GGUF model with the user before running — the build pulls source and creates a Docker image.

sh
git clone --depth 1 --branch <tag> https://github.com/ggml-org/llama.cpp.git
cd llama.cpp

docker build \
    --build-arg http_proxy=$http_proxy \
    --build-arg https_proxy=$https_proxy \
    --build-arg GGML_SYCL_F16=OFF \
    --target server \
    -t llama-server-sycl:<tag> \
    -f .devops/intel.Dockerfile .

Three targets available — server (serving), full (bench + convert), light (cli + batch). See references/build-and-env.md for proxy setup, the Level Zero deb conflict fix, and full env var reference.

Ask the user to confirm before proceeding with docker run.

Verify device

sh
docker run --rm \
    --device /dev/dri \
    --group-add "$(getent group render | cut -d: -f3)" \
    llama-server-sycl:<tag> --list-devices
# Expect: SYCL0: Intel(R) ... (NNNN MiB free)

Run (single GPU)

Quick-start workflow: If the image exists and the model is downloaded, launch immediately with docker run below. The server will fail fast if there's a problem — trust its own validation.

Before launching, check if the container name is already in use:

sh
docker ps -a --filter "name=llama-sycl"
# If it exists and is running: docker stop llama-sycl
# If it exists but is stopped: docker rm llama-sycl  # (without -f)
# Or use a different --name in the docker run command below

If port 8000 is already in use, check what's running:

sh
docker ps --filter "publish=8000"
# Then stop it gracefully: docker stop <name>

Launch the server:

sh
docker run -d --name llama-sycl \
    --rm \
    --device /dev/dri \
    --group-add "$(getent group render | cut -d: -f3)" \
    --ipc=host \
    -e ONEAPI_DEVICE_SELECTOR="level_zero:0" \
    -e ZES_ENABLE_SYSMAN=1 \
    -e UR_L0_ENABLE_RELAXED_ALLOCATION_LIMITS=1 \
    -v "$HOME/models:/models:ro" \
    -p 8000:8080 \
    llama-server-sycl:<tag> \
    -m /models/<model>.gguf \
    -ngl 99 -c 8192 \
    --flash-attn on \
    --host 0.0.0.0 --port 8080

Wait for all slots are idle in docker logs. First run may take 60–120 s for JIT kernel compilation.

Run (multi-GPU, layer split)

sh
-e ONEAPI_DEVICE_SELECTOR="level_zero:0;level_zero:1" \
... \
--split-mode layer

--split-mode row is not supported on SYCL; use layer or none.

Validate

sh
curl -f http://localhost:8000/health   # {"status":"ok"}

REPLY=$(curl -s http://localhost:8000/v1/chat/completions \
    -H 'Content-Type: application/json' \
    -d '{"model":"test","messages":[{"role":"user","content":"What is 2+2?"}],
         "max_tokens":16,"temperature":0}')
echo "$REPLY" | jq -r '.choices[0].message.content'
# Must contain "4"

References

  • references/build-and-env.md — proxy build-args, Level Zero conflict fix, --flash-attn syntax change (b9494+), device index mapping, full env var table.
  • references/quantisation-and-bench.md — quant ladder, VRAM formula, GGUF sources, llama-bench usage, key server flags.
  • references/troubleshooting.md — error table, AOT compilation for B70, log inspection, render group diagnosis.

Cross-references

  • xpu-discover / xpu-runtime-preflight — verify host readiness first.
  • model-can-it-fit — VRAM sizing (uses HF config.json; for GGUF use the formula in references/quantisation-and-bench.md).
  • vllm-xpu-run — safetensors + continuous batching at scale.

Arquivos incluídos

O modelo lê esses arquivos sob demanda enquanto a habilidade está carregada. Eles são disponibilizados para leitura e nunca são executados.

Perguntas frequentes

O que a habilidade de IA Llamacpp Xpu Run faz?

Run a GGUF model on an Intel GPU using llama.cpp's SYCL backend (Level Zero) with the official intel.Dockerfile. Covers building the Docker image from source at a pinned tag, launching llama-server with an OpenAI-compatible API, device selection, multi-GPU layer splitting, all recommended runtime env vars, flash-attention, and quantisation selection. Use when the user has a GGUF model and wants fast local inference or an OpenAI-compatible endpoint on Intel GPU without Python/PyTorch. The CUDA analogue is llama.cpp built with `-DGGML_CUDA=ON`. Use **vllm-xpu-run** instead for safetensors mod...

Por que usar Llamacpp Xpu Run no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. A habilidade Llamacpp Xpu Run é escrita em Markdown simples, e não em código específico de um provedor, então a mesma habilidade funciona com GPT-5, Claude, Gemini, Grok ou um modelo local — e é possível trocar de modelo no meio do chat sem que ela deixe de funcionar. No TypingMind, você usa suas próprias chaves de API e paga diretamente aos provedores, em vez de pagar uma assinatura por licença de usuário. Suas habilidades e chats permanecem no seu próprio armazenamento.

Como instalar Llamacpp Xpu Run no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/intel/skills/tree/main/skills/llamacpp-xpu-run. O TypingMind lê o arquivo SKILL.md, reúne os arquivos da habilidade e a instala para que possa ser ativada em cada chat.

Quais modelos de IA podem usar Llamacpp Xpu Run?

Qualquer modelo conectado no TypingMind. As habilidades de IA são instruções em Markdown simples, e não código específico de um provedor. Assim, GPT, Claude, Gemini, Grok e modelos locais podem carregar esta habilidade quando uma solicitação corresponder a ela.

Quantos modelos de IA posso usar com Llamacpp Xpu Run?

Quantos quiser. Desde que o modelo ofereça suporte a habilidades, é possível usar Llamacpp Xpu Run com ele — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e outros — tudo no TypingMind com suas próprias chaves de API.

A habilidade de IA Llamacpp Xpu Run é gratuita?

Sim. A habilidade é publicada no GitHub por intel sob a licença Apache-2.0. O pagamento é feito apenas ao seu provedor de IA pelos tokens usados.

O que são habilidades de IA?

Uma habilidade de IA é um conjunto reutilizável de instruções que ensina um modelo de IA a realizar uma tarefa específica. Ela segue o formato aberto Agent Skills: um arquivo SKILL.md com nome e descrição, além de scripts, templates ou arquivos de referência de que o modelo possa precisar. O modelo lê as instruções apenas quando sua solicitação corresponde à habilidade, então uma habilidade instalada não gera custos até ser usada.

Qual é a diferença entre habilidades de IA e plugins ou servidores MCP?

Um plugin ou servidor MCP oferece ao modelo novas ferramentas que ele pode acionar — código que é executado em algum lugar e retorna um resultado. Já uma habilidade de IA dá ao modelo o conhecimento e as orientações de que ele precisa: como abordar uma tarefa, quais etapas seguir e como deve ser um bom resultado. As habilidades são escritas em Markdown simples, por isso não precisam de servidor, chave de API nem ambiente de execução, e funcionam com qualquer modelo.

Ver lista completa

Crie seu próprio espaço de trabalho com IA agora

Inscreva-se na nossa newsletter para receber avisos sobre novos recursos e futuros sorteios 👇