Colibri explained: streaming MoE experts across storage, RAM and VRAM
Reading Colibri’s pip entry point: locating c/coli
Diagnose packaging and launcher-path failures before inspecting inference kernels.
What you will learn
- Trace the path calculation
- Understand in-process delegation
- Keep the test claim narrow
Before you start
- Basic Python and command-line knowledge
- A documented hardware and storage inventory
Create a reproducibility ledger before attempting another inference optimization.
Key takeaways
- The wrapper relies on a sibling directory.
- runpy delegates within the Python process.
- No model execution was tested here.
Trace the path calculation
colibri/cli.py obtains its own absolute directory, moves one level up and appends c/coli. If that script is absent, main exits with an engine-directory-not-found message and a source-install suggestion.
This is a relative-layout contract. Finding the Python package does not prove the sibling engine directory was included or preserved in a moved installation. Inspect the resolved package and c directory before downloading weights again.
Understand in-process delegation
When the script exists, the wrapper prepends the engine directory to sys.path, sets sys.argv[0] to the launcher path and invokes runpy.run_path with run_name set to __main__. It does not spawn a subprocess in this function.
The remaining arguments stay available to the launcher, which owns subcommand behavior. A failure after delegation may come from that script or later engine startup; this wrapper alone cannot identify the model-format error.
Keep the test claim narrow
This chapter is a line-by-line source inspection of the small entry point, not an executed pip installation or inference test. The example below shows the expected layout rather than a verified local deployment.
A useful packaging test would install into a disposable environment and check missing-script and successful-delegation cases with a harmless fake launcher. Review the packaging code before adopting that proposed test.
Decision guide
| Criterion | Option A | Option B |
|---|---|---|
| Best when | You need predictable behavior and easy auditing | You need adaptive optimization and have reliable telemetry |
| Main risk | May leave performance on the table | Can become difficult to explain or debug |
Implementation steps
- 1
Locate the installed Python package.
- 2
Check the sibling c/coli path and layout.
- 3
Separate pre-delegation failure from launcher failure.
Copy-ready example
installation-root/
colibri/cli.py
c/coli
c/<matching engine and support files>Frequently asked questions
Does this function launch a separate process?
No. The inspected wrapper uses runpy.run_path in-process.
Should a missing c/coli error trigger a weight download?
First inspect package layout; the error occurs before this wrapper delegates to model handling.
Sources
- Colibri / colibri/cli.pySource checked 2026-09-23