nip.language_model_server.server#
A server which allows for controlling vLLM and doing language model training.
The server is a FastAPI application with the following endpoints:
version
: Returns thenip
package version./vllm/start
: Starts a vLLM server with the specified model./vllm/stop
: Stops the vLLM server./vllm/status
: Returns the status of the vLLM server./training/jobs
: Create or list fine-tuning jobs./training/jobs/<job_id>
: Get info about a fine-tuning job or cancel it.
Example
>>> from nip.language_model_server.server import LanguageModelServer
>>> from quart import Quart
>>> app = Quart(__name__)
>>> async with LanguageModelServer(app, vllm_port=8000):
... app.run(port=8080)
Functions
Raise an HTTPException based on a LanguageModelServerError. |
|
|
Cancel a training job. |
|
Create a new training job. |
Get the version of the language model server. |
|
|
Get info about a training job. |
List all training jobs managed by the server. |
|
Get the status of the vLLM server. |
|
|
Lifespan context manager for the FastAPI application. |
|
Start the vLLM server with the specified model. |
|
Stop the vLLM server. |