轩辕镜像
轩辕镜像专业版
个人中心搜索镜像
交易
充值流量我的订单
工具
工单支持镜像收录Run 助手IP 归属地密码生成Npm 源Pip 源
帮助
常见问题我要吐槽
其他
关于我们网站地图

官方QQ群: 13763429

轩辕镜像
镜像详情
3x3cut0r/llama-cpp-python
官方博客使用教程热门镜像工单支持
本站面向开发者与科研用户,提供开源镜像的搜索和下载加速服务。
所有镜像均来源于原始开源仓库,本站不存储、不修改、不传播任何镜像内容。
轩辕镜像 - 国内开发者首选的专业 Docker 镜像下载加速服务平台 - 官方QQ群:13763429 👈点击免费获得技术支持。
本站面向开发者与科研用户,提供开源镜像的搜索和下载加速服务。所有镜像均来源于原始开源仓库,本站不存储、不修改、不传播任何镜像内容。

本站支持搜索的镜像仓库:Docker Hub、gcr.io、ghcr.io、quay.io、k8s.gcr.io、registry.gcr.io、elastic.co、mcr.microsoft.com

llama-cpp-python Docker 镜像下载 - 轩辕镜像

llama-cpp-python 镜像详细信息和使用指南

llama-cpp-python 镜像标签列表和版本信息

llama-cpp-python 镜像拉取命令和加速下载

llama-cpp-python 镜像使用说明和配置指南

Docker 镜像加速服务 - 轩辕镜像平台

国内开发者首选的 Docker 镜像加速平台

极速拉取 Docker 镜像服务

相关 Docker 镜像推荐

热门 Docker 镜像下载

llama-cpp-python
3x3cut0r/llama-cpp-python

llama-cpp-python 镜像详细信息

llama-cpp-python 镜像标签列表

llama-cpp-python 镜像使用说明

llama-cpp-python 镜像拉取命令

Docker 镜像加速服务

轩辕镜像平台优势

镜像下载指南

相关 Docker 镜像推荐

Docker container for llama-cpp-python - a python binding for llama.cpp
4 收藏0 次下载active3x3cut0r
🚀轩辕镜像专业版更稳定💎一键安装 Docker 配置镜像源
镜像简介版本下载
🚀轩辕镜像专业版更稳定💎一键安装 Docker 配置镜像源

llama-cpp-python 镜像详细说明

llama-cpp-python 使用指南

llama-cpp-python 配置说明

llama-cpp-python 官方文档

llama-cpp-python

Docker container for llama-cpp-python - a python binding for llama.cpp.

!Docker Image Version (latest by date)
!Docker Image Size (latest by date)
!Docker Pulls
!GitHub Workflow Status

GitHub - 3x3cut0r/llama-cpp-python
DockerHub - 3x3cut0r/llama-cpp-python

Index

  1. Usage
    1.1 docker run
    1.2 docker-compose.yml
  2. Environment Variables
  3. Volumes
  4. Ports
  5. API Endpoints
  6. Find Me
  7. License

1 Usage

IMPORTANT: you need to add SYS_RESOURCE capability to enable MLOCK support

# for docker run:
docker run -d --cap-add SYS_RESOURCE ...

# for docker compose:
version: '3.9'
  llama-cpp-python:
    image: 3x3cut0r/llama-cpp-python:latest
    container_name: llama-cpp-python
    cap_add:
      - SYS_RESOURCE

1.1 docker run

Example 1 - run model from huggingface:
This is the recommended way to use this container !!!

docker run -d \
    --name llama-cpp-python \
    --cap-add SYS_RESOURCE \
    -e MODEL_DOWNLOAD="True" \
    -e MODEL_REPO="TheBloke/Mistral-7B-Instruct-v0.2-GGUF" \
    -e MODEL="mistral-7b-instruct-v0.2.Q4_K_M.gguf" \
    -e MODEL_ALIAS="mistral-7b-instruct" \
    -e CHAT_FORMAT="mistral" \
    -p 8000:8000/tcp \
    3x3cut0r/llama-cpp-python:latest

Example 2 - run own model from local file:

docker run -d \
    --name llama-cpp-python \
    --cap-add SYS_RESOURCE \
    -e MODEL_DOWNLOAD="False" \
    -e MODEL_REPO="local" \
    -e MODEL="mistral-7b-instruct-v0.2.Q4_K_M.gguf" \
    -e MODEL_ALIAS="mistral-7b-instruct" \
    -e CHAT_FORMAT="mistral" \
    -v /path/to/your/model/mistral-7b-instruct-v0.2.Q4_K_M.gguf:/model/mistral-7b-instruct-v0.2.Q4_K_M.gguf \
    -p 8000:8000/tcp \
    3x3cut0r/llama-cpp-python:latest

Example 3 - run with arguments (most environment variables will be ignored):
arguments will be executed like this:
/venv/bin/python3 -B -m llama_cpp.server --host 0.0.0.0 <your arguments>

docker run -d \
    --name llama-cpp-python \
    --cap-add SYS_RESOURCE \
    -e MODEL_DOWNLOAD="False" \
    -v /path/to/your/model/mistral-7b-instruct-v0.2.Q4_K_M.gguf:/model/mistral-7b-instruct-v0.2.Q4_K_M.gguf \
    -p 8000:8000/tcp \
    3x3cut0r/llama-cpp-python:latest \
    --model /model/mistral-7b-instruct-v0.2.Q4_K_M.gguf \
    --n_ctx 1024 \
    ...

Example 4 - show help:

docker run --rm \
    --name llama-cpp-python \
    3x3cut0r/llama-cpp-python:latest \
    --help

1.2 docker-compose.yml

version: '3.9'

services:
  llama-cpp-python:
    image: 3x3cut0r/llama-cpp-python:latest
    container_name: llama-cpp-python
    cap_add:
      - SYS_RESOURCE
    environment:
        MODEL_DOWNLOAD: "True"
        MODEL_REPO: "TheBloke/Mistral-7B-Instruct-v0.2-GGUF"
        MODEL: "mistral-7b-instruct-v0.2.Q4_K_M.gguf"
        MODEL_ALIAS: "mistral-7b-instruct"
        CHAT_FORMAT: "mistral"
    ports:
      - 8000:8000/tcp

2 Environment Variables

  • TZ - Specifies the server timezone - default: UTC
  • MODEL_DOWNLOAD - If True, downloads MODEL file from Huggingface MODEL_REPO- default: true
  • MODEL_REPO - The huggingface repo name. Set to local if MODEL was mounted locally - default: TheBloke/Llama-2-7B-Chat-GGUF
  • MODEL - MANDATORY: The model filename - default: llama-2-7b-chat.Q4_K_M.gguf
  • MODEL_ALIAS - The alias of the model to use for generating completions - default: llama-2-7b-chat
  • SEED - Random seed. -1 for random - default: 4294967295
  • N_CTX - The context size - default: 2048
  • N_BATCH - The batch size to use per eval - default: 512
  • N_GPU_LAYERS - The number of layers to put on the GPU. The rest will be on the CPU - default: 0
  • MAIN_GPU - Main GPU to use - default: 0
  • TENSOR_SPLIT - Split layers across multiple GPUs in proportion.
  • ROPE_FREQ_BASE - RoPE base frequency - default: 0.0
  • ROPE_FREQ_SCALE - RoPE frequency scaling factor - default: 0.0
  • MUL_MAT_Q - if true, use experimental mul_mat_q kernels - default: True
  • LOGITS_ALL - Whether to return logits - default: True
  • VOCAB_ONLY - Whether to only return the vocabulary - default: False
  • USE_MMAP - Use mmap - default: True
  • USE_MLOCK - Use mlock - default: True
  • EMBEDDING - Whether to use embeddings - default: True
  • N_THREADS - The number of threads to use - default: 4
  • LAST_N_TOKENS_SIZE - Last n tokens to keep for repeat penalty calculation - default: 64
  • LORA_BASE - Optional path to base model, useful if using a quantized base model and you want to apply LoRA to an f16 model.
  • LORA_PATH - Path to a LoRA file to apply to the model.
  • NUMA - Enable NUMA support - default: False
  • CHAT_FORMAT - Chat format to use - default: llama-2
  • CACHE - Use a cache to reduce processing times for evaluated prompts - default: False
  • CACHE_TYPE - The type of cache to use. Only used if cache is True - default: ram
  • CACHE_SIZE - The size of the cache in bytes. Only used if cache is True - default: 2147483648
  • VERBOSE - Whether to print debug information - default: True
  • HOST - Listen address - default: 0.0.0.0
  • PORT - Listen port - default: 8000
  • INTERRUPT_REQUESTS - Whether to interrupt requests when a new request is received - default: True
  • HF_TOKEN - Huggingface Token for private repos - default: None

3 Volumes

  • /model - model directory -> map your llama (*.gguf) models here

4 Ports

  • 8000/tcp - API Port

5 API Endpoints

visit abetlen's documentation or
see [***] for more information

  • /v1/engines/copilot-codex/completions - POST - Create Completion
{
  "prompt": "\n\n### Instructions:\nWhat is the capital of France?\n\n### Response:\n",
  "stop": ["\n", "###"]
}
  • /v1/completions - POST - Create Completion
{
  "prompt": "\n\n### Instructions:\nWhat is the capital of France?\n\n### Response:\n",
  "stop": ["\n", "###"]
}
  • /v1/embeddings - POST - Create Embedding
{
  "input": "The food was delicious and the waiter..."
}
  • /v1/chat/completions - POST - Create Chat Completion
{
  "messages": [
    {
      "content": "You are a helpful assistant.",
      "role": "system"
    },
    {
      "content": "What is the capital of France?",
      "role": "user"
    }
  ]
}
  • /v1/models - GET - Get Models response:
{
  "object": "list",
  "data": [
    {
      "id": "llama-2-7b-chat",
      "object": "model",
      "owned_by": "me",
      "permissions": []
    }
  ]
}

6 Find Me

!E-Mail

  • GitHub
  • DockerHub

7 License

![License: GPL v3]([***] - This project is licensed under the GNU General Public License - see the gpl-3.0 for details.

查看更多 llama-cpp-python 相关镜像 →
apecloud/llama-cpp-python logo
apecloud/llama-cpp-python
by apecloud
暂无描述
110K+ pulls
上次更新:11 个月前

常见问题

轩辕镜像免费版与专业版有什么区别?

免费版仅支持 Docker Hub 加速,不承诺可用性和速度;专业版支持更多镜像源,保证可用性和稳定速度,提供优先客服响应。

轩辕镜像免费版与专业版有分别支持哪些镜像?

免费版仅支持 docker.io;专业版支持 docker.io、gcr.io、ghcr.io、registry.k8s.io、nvcr.io、quay.io、mcr.microsoft.com、docker.elastic.co 等。

流量耗尽错误提示

当返回 402 Payment Required 错误时,表示流量已耗尽,需要充值流量包以恢复服务。

410 错误问题

通常由 Docker 版本过低导致,需要升级到 20.x 或更高版本以支持 V2 协议。

manifest unknown 错误

先检查 Docker 版本,版本过低则升级;版本正常则验证镜像信息是否正确。

镜像拉取成功后,如何去掉轩辕镜像域名前缀?

使用 docker tag 命令为镜像打上新标签,去掉域名前缀,使镜像名称更简洁。

查看全部问题→

轩辕镜像下载加速使用手册

探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式

🔐

登录方式进行 Docker 镜像下载加速教程

通过 Docker 登录方式配置轩辕镜像加速服务,包含7个详细步骤

🐧

Linux Docker 镜像下载加速教程

在 Linux 系统上配置轩辕镜像源,支持主流发行版

🖥️

Windows/Mac Docker 镜像下载加速教程

在 Docker Desktop 中配置轩辕镜像加速,适用于桌面系统

📦

Docker Compose 镜像下载加速教程

在 Docker Compose 中使用轩辕镜像加速,支持容器编排

📋

K8s containerd 镜像下载加速教程

在 k8s 中配置 containerd 使用轩辕镜像加速

🔧

宝塔面板 Docker 镜像下载加速教程

在宝塔面板中配置轩辕镜像加速,提升服务器管理效率

💾

群晖 NAS Docker 镜像下载加速教程

在 Synology 群晖NAS系统中配置轩辕镜像加速

🐂

飞牛fnOS Docker 镜像下载加速教程

在飞牛fnOS系统中配置轩辕镜像加速

📱

极空间 NAS Docker 镜像下载加速教程

在极空间NAS中配置轩辕镜像加速

⚡

爱快路由 ikuai Docker 镜像下载加速教程

在爱快ikuai系统中配置轩辕镜像加速

🔗

绿联 NAS Docker 镜像下载加速教程

在绿联NAS系统中配置轩辕镜像加速

🌐

威联通 NAS Docker 镜像下载加速教程

在威联通NAS系统中配置轩辕镜像加速

📦

Podman Docker 镜像下载加速教程

在 Podman 中配置轩辕镜像加速,支持多系统

📚

ghcr、Quay、nvcr、k8s、gcr 等仓库下载镜像加速教程

配置轩辕镜像加速9大主流镜像仓库,包含详细配置步骤

🚀

专属域名方式进行 Docker 镜像下载加速教程

无需登录即可使用轩辕镜像加速服务,更加便捷高效

需要其他帮助?请查看我们的 常见问题 或 官方QQ群: 13763429

商务:17300950906
|©2024-2025 源码跳动
商务合作电话:17300950906|Copyright © 2024-2025 杭州源码跳动科技有限公司. All rights reserved.