Skip to main content

OpenAI compatible API server for AutoGPTQ model

Project description

GPTQAPI Server

LLM API server for AutoGPTQ model. This server is designed to be compatible with the OpenAI API, allowing you to seamlessly use OpenAI clients with it.

Installation

Before you can run the server, you need to install the necessary package. You can do this easily with pip:

pip install gptq-api

Usage

To run the GPTQAPI Server, use the following command:

python -m gptqapi.server [model-name] [port]

The model-name argument is mandatory while the port argument is optional, if not provided, it will use 8000 as the default.

You can also configure the server using a .env file for convenience. Here's an example:

# .env file
MODEL_NAME=robinsyihab/Sidrap-7B-v2-GPTQ
PORT=8000
WORKERS=1
SYSTEM_PROMPT=

This .env file sets default values for the model name, the port the server will listen on, the number of worker processes, and the system prompt which can be used to customize behavior.

API Schema

This server follows the OpenAI API schema, allowing for seamless integration with OpenAPI client libraries. You can utilize all typical endpoints as if you were using the actual OpenAI API, making it easier to integrate into your existing infrastructure if you're familiar with the OpenAI platform.

Environment Variables

Here is a list of environment variables you can use to configure the server:

  • MODEL_NAME: (required) Identifies which AutoGPTQ model to use.
  • PORT: (optional) Specifies the port number on which to run the API server.
  • WORKERS: (optional) Defines the number of worker processes for handling requests.
  • SYSTEM_PROMPT: (optional) Sets the system prompt for the model if needed.

[] Robin Syihab (@anvie)

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

gptq-api-0.0.3.tar.gz (17.2 kB view details)

Uploaded Source

File details

Details for the file gptq-api-0.0.3.tar.gz.

File metadata

  • Download URL: gptq-api-0.0.3.tar.gz
  • Upload date:
  • Size: 17.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for gptq-api-0.0.3.tar.gz
Algorithm Hash digest
SHA256 27ec93991153da60cc1dc26557ee611a89f08531844f34f2ef11102f2430eb47
MD5 5d6af7864aa61ad6b95105e2aca8017b
BLAKE2b-256 531caab3af4a1bdc6133b99aec1722f97ed847a9aff5a8e66dda38a1b5480be7

See more details on using hashes here.

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