6.3. 将 LLM 更改为自定义模型


要使用本地安装的自定义模型,请将模型文件复制到 ramalama LLM 容器中,并更新您的配置。

先决条件

  • rhel-cla 服务至少由(rhel-cla start)启动一次。

流程

  1. 确定正在运行的容器 ID:

    $ podman ps | grep ramalama
    6eef0fb344b7  quay.io/ramalama/ramalama:0.16.0                                                ramalama --store ...  7 seconds ago  Up 7 seconds  0.0.0.0:8000->8000/tcp, 0.0.0.0:8888->8888/tcp  rhel-cla-llamacpp-model
  2. 通过将 < path_to_local_model> 替换为本地路径,将 < container_id > 替换为上一步中找到的容器 ID,将 LLM 模型 文件复制到 ramalama 容器中:

    $ podman cp path_to_local_llm_file.gguf 6eef0fb344b7:/models/

    或者,您可以将 LLM 模型文件复制到本地卷路径中:

    $ cp path_to_local_llm_file.gguf ~/.local/share/containers/storage/volumes/llamacpp-models/_data/
  3. 停止 rhel-cla 服务:

    $ rhel-cla stop
  4. 编辑 ~/.config/rhel-cla/.env,并将以下配置添加到 LLM 变量中:

    LLM="file:///models/llm_file.gguf"
  5. 重启 rhel-cla 服务:

    $ rhel-cla start
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

关于红帽文档

Legal Notice

Theme

© 2026 Red Hat
返回顶部