LMS is a lightweight and simple web-based language model server used to serve deep learning models with an HTTP API. This tutorial will guide you through the process of installing LMS on macOS.
Before you begin, ensure that:
Use Terminus to navigate to a working directory and clone the LMS repository using Git.
cd ~/Documents
git clone https://github.com/epoupon/lms.git
Navigate to the root directory of the cloned repository and install the required dependencies with Pip.
cd lms
pip install -r requirements.txt
After installation, start the LMS server by running the following command.
./lms start
You can also use the flags -m
or --model
to specify the path to the location of your pre-trained model.
./lms start -m path/to/your/model
By default, LMS runs on http://localhost:8080
.
To test if LMS is running correctly, use the following curl
command in a different terminal window:
curl -H "Content-Type: application/json" -X POST -d "{\"texts\": [\"hello world\"]}" http://localhost:8080/generate
This should produce the following JSON output: {"generated_text": ["hello world\\n"]}
Congratulations, you've installed LMS on macOS and tested it!
This tutorial has provided you with a step-by-step guide on how to install LMS on macOS. With LMS, you can now serve deep learning models with an HTTP API. Enjoy exploring the possibilities of LMS with your pre-trained models!
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!