Welcome to the Mighty manual! Getting started is easy, just download and extract the application, then start a server with a default configuration and model.
Step 1. Download
Mighty is a small executable with some minimal dependencies (also small), that does not need to be installed - it is simply run from the location you extract it to. The only requirements are curl and hwloc.
#Install dependencies sudo apt-get install curl hwloc libhwloc-dev #Download the application curl http://max.io/mighty-linux.tar.gz tar -zxf mighty-linux.tar.gz cd mighty
Step 2. Start Mighty
Start the server using the `mighty` executable in the extracted directory. Without any arguments, this will start a server that will serve an embeddings endpoint using the default model.
./mighty >Mighty server for embeddings is listening on http://localhost:5050
Step 3. Inference!
When the server is running, in another terminal or browser, you can make a request to http://localhost:5050/?text=Hello+Mighty. to get an inference response, by providing some text in the querystring - in this example you will retrieve the embeddings for the phrase `Hello Mighty.`
curl http://localhost:5050/\?text=Hello+Mighty. >{ > "took":12, > "text":"Hello mighty.", > "shape":[5,384], > "outputs":[[0.066911593079,0.162673592567,...,-0.233405888080]] >}
The server returns how long the request took, the text you provided, the output embeddings, and the shape of the embeddings. "Hello Mighty." has 5 tokens, and the embedding dimensions are 384 for the default model. That gives the shape of `[5,384]`. The outputs and this other information can be readily used in your application by making a simple http request to your Mighty server!
Step 4. Stopping the server
You can always stop the server from the terminal in which you opened it using `Ctrl-C`. From another terminal, you can execute `pkill mighty` to kill the process - don't worry, it's safe! Mighty is stateless and can't lose data.
It is common to execute mighty to run as a background process by appending an `&` to the command: `./mighty &`. This will print the startup information and then stay in the background, ready to be stopped anytime with the `pkill mighty` command.