Instructions to use rustformers/gpt-j-ggml with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use rustformers/gpt-j-ggml with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="rustformers/gpt-j-ggml")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("rustformers/gpt-j-ggml", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use rustformers/gpt-j-ggml with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "rustformers/gpt-j-ggml" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "rustformers/gpt-j-ggml", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/rustformers/gpt-j-ggml
- SGLang
How to use rustformers/gpt-j-ggml with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "rustformers/gpt-j-ggml" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "rustformers/gpt-j-ggml", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "rustformers/gpt-j-ggml" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "rustformers/gpt-j-ggml", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use rustformers/gpt-j-ggml with Docker Model Runner:
docker model run hf.co/rustformers/gpt-j-ggml
Generated README.md
Browse files
README.md
CHANGED
|
@@ -9,7 +9,7 @@ datasets:
|
|
| 9 |
- the_pile
|
| 10 |
---
|
| 11 |
|
| 12 |
-
# GGML
|
| 13 |
|
| 14 |
## Description
|
| 15 |
|
|
@@ -44,6 +44,7 @@ GPT-2/GPT-3.
|
|
| 44 |
| [gpt-j-6b-f16.bin](https://huggingface.co/rustformers/gpt-j-ggml/blob/main/gpt-j-6b-f16.bin) | [EleutherAI/gpt-j-6b](https://huggingface.co/EleutherAI/gpt-j-6b) | F16 | GGML | V3 |
|
| 45 |
| [gpt-j-6b-q4_0.bin](https://huggingface.co/rustformers/gpt-j-ggml/blob/main/gpt-j-6b-q4_0.bin) | [EleutherAI/gpt-j-6b](https://huggingface.co/EleutherAI/gpt-j-6b) | Q4_0 | GGML | V3 |
|
| 46 |
| [gpt-j-6b-q4_0-ggjt.bin](https://huggingface.co/rustformers/gpt-j-ggml/blob/main/gpt-j-6b-q4_0-ggjt.bin) | [EleutherAI/gpt-j-6b](https://huggingface.co/EleutherAI/gpt-j-6b) | Q4_0 | GGJT | V3 |
|
|
|
|
| 47 |
| [gpt-j-6b-q5_1-ggjt.bin](https://huggingface.co/rustformers/gpt-j-ggml/blob/main/gpt-j-6b-q5_1-ggjt.bin) | [EleutherAI/gpt-j-6b](https://huggingface.co/EleutherAI/gpt-j-6b) | Q5_1 | GGJT | V3 |
|
| 48 |
|
| 49 |
## Usage
|
|
|
|
| 9 |
- the_pile
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# GGML converted versions of [EleutherAI](https://huggingface.co/EleutherAI)'s GPT-J model
|
| 13 |
|
| 14 |
## Description
|
| 15 |
|
|
|
|
| 44 |
| [gpt-j-6b-f16.bin](https://huggingface.co/rustformers/gpt-j-ggml/blob/main/gpt-j-6b-f16.bin) | [EleutherAI/gpt-j-6b](https://huggingface.co/EleutherAI/gpt-j-6b) | F16 | GGML | V3 |
|
| 45 |
| [gpt-j-6b-q4_0.bin](https://huggingface.co/rustformers/gpt-j-ggml/blob/main/gpt-j-6b-q4_0.bin) | [EleutherAI/gpt-j-6b](https://huggingface.co/EleutherAI/gpt-j-6b) | Q4_0 | GGML | V3 |
|
| 46 |
| [gpt-j-6b-q4_0-ggjt.bin](https://huggingface.co/rustformers/gpt-j-ggml/blob/main/gpt-j-6b-q4_0-ggjt.bin) | [EleutherAI/gpt-j-6b](https://huggingface.co/EleutherAI/gpt-j-6b) | Q4_0 | GGJT | V3 |
|
| 47 |
+
| [gpt-j-6b-q5_1.bin](https://huggingface.co/rustformers/gpt-j-ggml/blob/main/gpt-j-6b-q5_1.bin) | [EleutherAI/gpt-j-6b](https://huggingface.co/EleutherAI/gpt-j-6b) | Q5_1 | GGML | V3 |
|
| 48 |
| [gpt-j-6b-q5_1-ggjt.bin](https://huggingface.co/rustformers/gpt-j-ggml/blob/main/gpt-j-6b-q5_1-ggjt.bin) | [EleutherAI/gpt-j-6b](https://huggingface.co/EleutherAI/gpt-j-6b) | Q5_1 | GGJT | V3 |
|
| 49 |
|
| 50 |
## Usage
|