No project description provided
Project description
Cuzco : An Emperor With and Without Clothes.
Accelerate your AI development. No inference credits? No problem.
What the heck is this thing?..
Cuzco is a Python package that let's you...
- Treat Huggingface's and Ollama's inference endpoint as a single endpoint.
- Declaratively summon language models.
- Automatically fall back to local inference once you've exhausted your Huggingface inference credits.
Maximal System Requirements
- Docker Engine ( see the 'example-docker' folder for a potential image build. )
- A valid Huggingface token with read permissions.
- As much freekin compute as possible if you plan on running backup inference.
Bare Naked Requirements
- Python >= 3.12
- Ollama ( See official installation https://ollama.com/download )
- As much freekin compute as possible.
Usage in Dockerfile
ENTRYPOINT[ "python", "-m", "cuzco"]
or
ENTRYPOINT[ "python", "-m", "cuzco", "--entrypoint", "your_optional_plugin_with_cool_custom_tools_and_or_interface" ]
Extending Cuzco for Your Project.
With nearly any language model a pip install away, it's time to focus on tool building.
In your pyproject.toml, you can define new entrypoints under [project.entry-points.user_defined].
See Cuzco's pyproject.toml and src/example_plugin for guidance.
LanguageModelAgentGenerator the secret sauce.
The LanguageModelAgentGenerator class is a Generator that continually updates your inference endpoint.
When building plugins, customize it's tools or subclass it to your liking.
interfaces.py
interfaces.py contains various subclasses of the GradioUI class. By default CuzcoApp is the interface implemented when launch is called. When building plugins, customize these classes to your liking.
config.toml Variables
defaults
- GRADIO_PORT =
7860 - LANGUAGE_MODEL_FLAVOR =
""# Must begin with '-' if defined. - HF_ACCESS_TOKEN =
"" - OLLAMA_PORT =
11434
protected defaults
- GRADIO_SERVER =
"0.0.0.0" - OLLAMA_START =
["ollama", "serve"] - OLLAMA_FETCH =
["ollama", "pull"] - OLLAMA_HOST =
"http://localhost"
Enviromental Variables and Overrides
- GRADIO_PORT :
Optional[int] - HF_ACCESS_TOKEN :
str - LANGUAGE_MODEL_PROVIDER :
str, - LANGUAGE_MODEL_VERSION :
float - LANGUAGE_MODEL_PARAMETERS :
str, suffix must be a 'b'. When using Qwen, the number of parameters ideally should be 32 billion and no less than 7 billion. Use can use 1.5 billion parameters to test Cuzco is working as intended. - LANGUAGE_MODEL_FLAVOR :
Optional[str], prefix must be a '-' such as '-coder'. - OLLAMA_PORT :
Optional[int]
Gotchas
- Not all models are compatible with both Huggingface and Ollama. If you require Huggingface inference and back-up inference, double check https://ollama.com/library and https://huggingface.co/models for model cross-availability.
P.S.
I wish to convey my deep gratitude to the folks at Docker, Huggingface and Meta. You made this project possible.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cuzco-0.1.dev1.tar.gz.
File metadata
- Download URL: cuzco-0.1.dev1.tar.gz
- Upload date:
- Size: 22.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb2898a71f4a7a1edfc4dc70166621288e19475bffa4656f5a66fd3c82612ead
|
|
| MD5 |
4bb5fa162e99a7d63c712091a90766a0
|
|
| BLAKE2b-256 |
9ba776b13dcbfc8b745fd95e965aba1be17d188bb82438da8b66aef3c6a80acb
|
Provenance
The following attestation bundles were made for cuzco-0.1.dev1.tar.gz:
Publisher:
publish-to-pypi.yml on IAmSorryDave/Cuzco
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cuzco-0.1.dev1.tar.gz -
Subject digest:
fb2898a71f4a7a1edfc4dc70166621288e19475bffa4656f5a66fd3c82612ead - Sigstore transparency entry: 955149067
- Sigstore integration time:
-
Permalink:
IAmSorryDave/Cuzco@2a0be58aba3f2de454443d7973baf0f215163adc -
Branch / Tag:
refs/heads/PyPi - Owner: https://github.com/IAmSorryDave
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@2a0be58aba3f2de454443d7973baf0f215163adc -
Trigger Event:
push
-
Statement type:
File details
Details for the file cuzco-0.1.dev1-py3-none-any.whl.
File metadata
- Download URL: cuzco-0.1.dev1-py3-none-any.whl
- Upload date:
- Size: 25.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f86946404228801ae811f8293b6afb3a08ea7db31402af40e1c850e6069f839
|
|
| MD5 |
f33f9df32cf0d3ec883f2e18c6131ad8
|
|
| BLAKE2b-256 |
b1c2268f07c9f626f299e10ebeca5a291913dfb5103cb6669cbd0a5bfcf5bb46
|
Provenance
The following attestation bundles were made for cuzco-0.1.dev1-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on IAmSorryDave/Cuzco
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cuzco-0.1.dev1-py3-none-any.whl -
Subject digest:
8f86946404228801ae811f8293b6afb3a08ea7db31402af40e1c850e6069f839 - Sigstore transparency entry: 955149070
- Sigstore integration time:
-
Permalink:
IAmSorryDave/Cuzco@2a0be58aba3f2de454443d7973baf0f215163adc -
Branch / Tag:
refs/heads/PyPi - Owner: https://github.com/IAmSorryDave
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@2a0be58aba3f2de454443d7973baf0f215163adc -
Trigger Event:
push
-
Statement type: