Skip to main content

Python-based Machine Learning Interface

Project description

python-mli

Downloads Supported Versions License: MIT

Pure Python-based Machine Learning Interface for multiple engines with multi-modal support.

Python HTTP Server/Client (including WebSocket streaming support) for:

Prerequisites

Debian/Ubuntu

sudo apt update -y
sudo apt install build-essential git curl libssl-dev libffi-dev pkg-config

Rust

  1. Using latest system repository:
sudo apt install rustc cargo
  1. Install rustup using official instructions:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"
rustup default stable

Python

  1. Install Python using internal repository:
sudo apt install python3.11 python3.11-dev python3.11-venv
  1. Install Python using external repository:
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update -y
sudo apt install python3.11 python3.11-dev python3.11-venv

Arch/Manjaro

Rust

  1. Using latest system-wide rust/cargo:
sudo pacman -Sy base-devel openssl libffi git rust cargo rust-wasm wasm-bindgen
  1. Using latest rustup:
sudo pacman -Sy base-devel openssl libffi git rustup
rustup default stable

macOS

brew update
brew install rustup
rustup default stable

llama.cpp

cd ~
git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
make

candle

cd ~
git clone https://github.com/huggingface/candle.git
cd candle
find candle-examples -type f -exec sed -i 's/println/eprintln/g' {} +
cargo build -r --examples

Run Development Server

git clone https://github.com/mtasic85/mlipy.git
cd mlipy

python3.11 -m venv venv
source venv/bin/activate
pip install poetry
poetry install
python -B mli/server.py

Run Examples

python -B examples/sync_demo.py
python -B examples/async_demo.py
python -B examples/langchain_sync_demo.py
python -B examples/langchain_async_demo.py

Run mlipy Server

python3.11 -m venv venv
source venv/bin/activate
pip install -U mlipy
python -B -m mli.server

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

mlipy-0.1.1.tar.gz (8.7 kB view hashes)

Uploaded Source

Built Distribution

mlipy-0.1.1-py3-none-any.whl (8.7 kB view hashes)

Uploaded Python 3

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