hugpy-engine
hugpy-engine is the standalone boundary for Hugpy's complete inference path:
prompt/messages
-> model discovery and resolution
-> RAM/VRAM allocation and admission
-> engine and runner selection/loading
-> generation and continuation
-> streamed events or a completed reply
The package is split by responsibility:
catalog— discovered models, task/media/default model resolution;allocation— feasible modes, default placement, spill and admission plans;engines— native llama.cpp discovery and GGUF runner lifecycle;runtime— request resolution, execution, runner caching and eviction;query— prompt/messages to streamed events, text, orQueryResult;backend— the injection contract joining those layers to an implementation.
The package imports CPU-only: import hugpy_engine never loads llama_cpp,
torch, transformers or peft. Those arrive through extras and are imported by
the runner that needs them:
| extra | provides |
|---|---|
hugpy-engine[gguf] |
in-process GGUF inference via llama-cpp-python |
hugpy-engine[transformers] |
the transformers text-generation runner |
hugpy-engine[finetune] |
PEFT adapter loading |
hugpy-engine[index] |
the optional Postgres model index |
The default backend is the in-process LocalBackend (hugpy_engine.backends),
built from the engine's own catalog, allocation, native-engine and dispatch
modules; configure_backend(...) / backend_scope(...) swap in another
InferenceBackend (a fake in tests, a remote proxy in a thin client).
from hugpy_engine import query_sync
reply = query_sync("Explain tensor parallelism", model_key="my-model")
Async callers use await query(...). stream_query(...) yields engine events;
query_result(...) retains request ID, finish reason, usage, and timings.
Seams (what the engine asks of the packages above it)
hugpy_engine.placement— Protocols +get_*()/set_*()providers for everything the engine asks about the fleet (worker registry and key forms, worker HTTP transport/breaker, eviction telemetry ledger, blocklist, model metrics, priority groups). Null defaults mean "no fleet";hugpy_fleetimplements them and the server wires them.hugpy_engine.tasks— the task-runner registry. Media and video runners plug in withregister_task(task, runner=..., build_request=..., frameworks=(...), extra=..., source=...);FRAMEWORK_RUNNERS,MODEL_REQUEST_BUILDERSandKNOWN_TASKS_REGISTRYinhugpy_engine.resolvers.categoriesare live views over it. Packages may also expose ahugpy_engine.tasksentry point (a zero-arg register function); the engine loads those on first use.hugpy_engine.catalog_bridge— installs the engine's registry ashugpy_storage's catalog source, the hot cache as its serve-path hook, and refreshes discovery onhugpy_control.buscatalog.changedevents.LocalBackendinstalls it lazily.hugpy_engine.name_match— the pure eliminate-then-rank name pipeline (resolve_name,Candidate) thatassure_model_keyuses; the oracle re-exports it.
Metadata
Release files for hugpy-engine 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hugpy_engine-0.2.3.tar.gz | 631.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hugpy_engine-0.2.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.2 MB
Release files / hugpy_engine-0.2.3.tar.gz
| Download URL | hugpy_engine-0.2.3.tar.gz |
|---|---|
| Size | 631.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
991d99dd3c2474edfe5ce3351666e3d06421b02e8714c38b22674a5e96715932
|
|
BLAKE2b-256 checksum How to use checksums |
2738df82024709c8006690001714ad12ecf0e690e021f70c85421a18840f0d37
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Release files / hugpy_engine-0.2.3-py3-none-any.whl
| Download URL | hugpy_engine-0.2.3-py3-none-any.whl |
|---|---|
| Size | 546.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d7fc1a0ddf84d98f4ed37d97802c5f02b53133b432ffb8340d5f1c253d564b29
|
|
BLAKE2b-256 checksum How to use checksums |
0af7b4943fe2f8bc17ee7100e36d41ed0986e1a5e764887e52776c5672a571e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 26, 2026.
Transparency log