Skip to main content

A ML model serving library

Project description

Krypton ML

Krypton ML is a simple ML model serving framework with an emphasis on a config-driven approach. It's designed to make deploying machine learning models as API endpoints quick and easy.

Note: This project is currently in the experimental stage and only supports LangChain invocation.

Author: Varun Kruthiventi
Website: kryptonhq.com
PyPI Package: krypton-ml
GitHub Repository: krypton-ml

Features

  • Config-driven approach to model deployment
  • Easy integration with LangChain. More ML frameworks coming soon!
  • Support for text completion and chat-based chains currently for LangChain
  • Simple API deployment from configuration files

Installation

You can install Krypton ML using pip:

pip install krypton-ml

Usage

  1. Crate a LangChain model(chain) and save it as a Python file (e.g., langchain_example/app.py).
  2. The app.py should have a valid chain callable that can be invoked by Krypton framework.
  3. Create a configuration file (e.g., config.yaml) for your model:
krypton:
  models:
    - name: langchain-example # Name of the model
      type: langchain # Currently only LangChain is supported
      module_path: ./examples # Path to the directory containing the parent module
      callable: langchain_example.completion.chain # <parent_module>.<module>.<callable>
      endpoint: /langchain-example # API endpoint for the model
  server:
    host: 0.0.0.0 # Host to run the server on
    port: 8000 # Port to run the server on
  1. Run the Krypton ML server with your config file:
krypton config.yaml

This will start a server on http://0.0.0.0:8000 with the specified model endpoint.

Examples

Check out the examples folder in the repository for LangChain and Ollama based examples:

  1. Text completion chain
  2. Chat-based chain

These examples demonstrate how to deploy LangChain models as API endpoints using Krypton ML's config-driven approach.

Contributing

We welcome contributions to Krypton ML! Please feel free to submit issues, fork the repository and send pull requests.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Disclaimer

Krypton ML is currently in an experimental stage. Use in production environments is not recommended without thorough testing and validation.

For more information, visit kryptonhq.com or check out the GitHub repository.

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

krypton_ml-0.1.5.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

krypton_ml-0.1.5-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file krypton_ml-0.1.5.tar.gz.

File metadata

  • Download URL: krypton_ml-0.1.5.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.8.0-45-generic

File hashes

Hashes for krypton_ml-0.1.5.tar.gz
Algorithm Hash digest
SHA256 9a391b95d2acc6f5b0e5e8e3faed46d2c7b6b680a1da47c2569d874063c99510
MD5 0c66bfc40b6a564aa4175dfe0aff020b
BLAKE2b-256 aea2ba91222d890b2a5f27be057dd79cc29f8092e73ed6e0700ea3137d90824f

See more details on using hashes here.

File details

Details for the file krypton_ml-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: krypton_ml-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.8.0-45-generic

File hashes

Hashes for krypton_ml-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 31d4540b2d5e71a2f8df53f216261fb8d44d7bfce1bf212c171581dd6bb7b0b8
MD5 de5283a44a7c5e765d293cd46c4f342e
BLAKE2b-256 8646daffb20254950ac86b78934e26acf23e25f0c648910baac2bfd24b1ae505

See more details on using hashes here.

Supported by

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