Skip to main content

py3model

一行命令在本地启动一个 OpenAI 兼容的 LLM 服务,配套一个极简的可视化管理窗口。

GitHub repo stars

特性

  • 基于 llama-cpp-python 加载本地 .gguf 模型,零额外依赖
  • 启动一个 Tkinter 可视化窗口,用来注册 / 加载 / 卸载 / 删除模型
  • 同时启动一个 OpenAI 兼容的 HTTP 服务(/v1/chat/completions、/v1/completions、/v1/models、/health),可直接对接 OpenAI Python SDK、LangChain、Cursor、Open WebUI 等客户端
  • 支持多模型同时驻留内存,按请求里的 model 字段路由到对应实例
  • 配置统一落在 ~/.py3model/config.json,可视化窗口是配置的可视化编辑界面

快速开始

pip3 install py3model
py3model

启动后:

  1. 在「模型列表」点「新增模型」选择本地 .gguf 文件并命名
  2. 选「加载」,把模型加载到内存(首次加载需要几秒到几十秒,取决于模型大小和磁盘)
  3. 在「HTTP 服务」卡片里点「启动服务」(默认 127.0.0.1:11435)
  4. 用任何 OpenAI 兼容的客户端,把 base_url 指向 http://127.0.0.1:11435/v1 即可

想同时用多个模型?只要每个都在 GUI 里点过「加载」,它们就同时驻留在内存里;客户端在请求里把 model 字段设成对应名字即可路由到正确的实例。

文档

关闭

直接关掉可视化窗口即可,应用退出时会自动停止 HTTP 服务并卸载所有已加载的模型。

版权

MIT License

Copyright (c) zxl20070701 走一步,再走一步

Metadata

Release files for py3model 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for py3model 0.1.1
File Size Uploaded Provenance Actions
py3model-0.1.1.tar.gz 41.3 kB Without provenance Details for py3model-0.1.1.tar.gz

Release files / py3model-0.1.1.tar.gz

Download URL py3model-0.1.1.tar.gz
Size 41.3 kB
Tags Source
SHA-256 checksum
How to use checksums
fa4eb9e8e588f34b57709274356c1c866b0d3ea3b9a8a0f1331455791b7e6941
BLAKE2b-256 checksum
How to use checksums
6efcc07e285373d764d758859c2195fda334f2ce331b8c3713a6f271379c5ff0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.5

Security for py3model 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page