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
- Crate a LangChain model(chain) and save it as a Python file (e.g.,
langchain_example/app.py
). - The app.py should have a valid chain callable that can be invoked by Krypton framework.
- 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
- 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:
- Text completion chain
- 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 Apache License 2.0 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
Built Distribution
File details
Details for the file krypton_ml-0.1.7.tar.gz
.
File metadata
- Download URL: krypton_ml-0.1.7.tar.gz
- Upload date:
- Size: 11.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.8.0-49-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 544400e16352be19aeb4c89726e79a40b42d9a4122836500dafcd785913efefc |
|
MD5 | dd8d843f443e4f3d0c4320b39b7eff74 |
|
BLAKE2b-256 | c45fbf3d7feb19b9b8f558fd8ccc38e5f564cdb62fb84250ab54c379946f6a95 |
File details
Details for the file krypton_ml-0.1.7-py3-none-any.whl
.
File metadata
- Download URL: krypton_ml-0.1.7-py3-none-any.whl
- Upload date:
- Size: 13.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.8.0-49-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2eae001374a94e52e1fec27d4c4abfa3ae0f66ae8c619fb2445059a465c0201 |
|
MD5 | 42da604e90cb40a5b7f90603425cc705 |
|
BLAKE2b-256 | 09434edc6b8f8e52102e5722a22d72794040b2c9a51913cbe11aa09b3c2708be |