Skip to main content

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)

Metadata

Release files for gptq-api 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gptq-api 0.0.3
File Size Uploaded
gptq-api-0.0.3.tar.gz 17.2 kB Details

Release files / gptq-api-0.0.3.tar.gz

Download URL gptq-api-0.0.3.tar.gz
Size 17.2 kB
Tags Source
SHA-256 checksum
How to use checksums
27ec93991153da60cc1dc26557ee611a89f08531844f34f2ef11102f2430eb47
BLAKE2b-256 checksum
How to use checksums
531caab3af4a1bdc6133b99aec1722f97ed847a9aff5a8e66dda38a1b5480be7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release history Release notifications | RSS feed

This release

0.0.3 This release

1 release file

0.0.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page