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.6
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.6.tar.gz | 806.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hugpy_engine-0.2.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.5 MB
Release files / hugpy_engine-0.2.6.tar.gz
| Download URL | hugpy_engine-0.2.6.tar.gz |
|---|---|
| Size | 806.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e7cb6477f9cdb778759d0e39bf006412fcb0ac67c05b3250b1cf6efd30b68ebc
|
|
BLAKE2b-256 checksum How to use checksums |
ea472da92446ad770b4bb67cbe8162dbd8d621ac8e0127cd41f003a94724063b
|
| 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.6-py3-none-any.whl
| Download URL | hugpy_engine-0.2.6-py3-none-any.whl |
|---|---|
| Size | 668.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
83c3428c0ed7297096d4529e3fe95e2eb02fd01e3fb32700fa33b3b67224e444
|
|
BLAKE2b-256 checksum How to use checksums |
86c5670fde487bdf5621559f4d5361ba44295fb4a4b8f076475ae0208377e8b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|