Skip to main content

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

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

P.S.

I wish to convey my deep gratitude to the folks at Docker, Huggingface and Meta. You made this project possible.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cuzco-0.1.dev1.tar.gz (22.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cuzco-0.1.dev1-py3-none-any.whl (25.8 kB view details)

Uploaded Python 3

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

Hashes for cuzco-0.1.dev1.tar.gz
Algorithm Hash digest
SHA256 fb2898a71f4a7a1edfc4dc70166621288e19475bffa4656f5a66fd3c82612ead
MD5 4bb5fa162e99a7d63c712091a90766a0
BLAKE2b-256 9ba776b13dcbfc8b745fd95e965aba1be17d188bb82438da8b66aef3c6a80acb

See more details on using hashes here.

Provenance

The following attestation bundles were made for cuzco-0.1.dev1.tar.gz:

Publisher: publish-to-pypi.yml on IAmSorryDave/Cuzco

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for cuzco-0.1.dev1-py3-none-any.whl
Algorithm Hash digest
SHA256 8f86946404228801ae811f8293b6afb3a08ea7db31402af40e1c850e6069f839
MD5 f33f9df32cf0d3ec883f2e18c6131ad8
BLAKE2b-256 b1c2268f07c9f626f299e10ebeca5a291913dfb5103cb6669cbd0a5bfcf5bb46

See more details on using hashes here.

Provenance

The following attestation bundles were made for cuzco-0.1.dev1-py3-none-any.whl:

Publisher: publish-to-pypi.yml on IAmSorryDave/Cuzco

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page