Text Generation
Transformers
Safetensors
English
llama
text-generation-inference
4-bit precision
gptq
Instructions to use GAIR/autoj-13b-GPTQ-4bits with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use GAIR/autoj-13b-GPTQ-4bits with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="GAIR/autoj-13b-GPTQ-4bits")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("GAIR/autoj-13b-GPTQ-4bits") model = AutoModelForCausalLM.from_pretrained("GAIR/autoj-13b-GPTQ-4bits", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use GAIR/autoj-13b-GPTQ-4bits with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "GAIR/autoj-13b-GPTQ-4bits" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "GAIR/autoj-13b-GPTQ-4bits", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/GAIR/autoj-13b-GPTQ-4bits
- SGLang
How to use GAIR/autoj-13b-GPTQ-4bits 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 "GAIR/autoj-13b-GPTQ-4bits" \ --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": "GAIR/autoj-13b-GPTQ-4bits", "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 "GAIR/autoj-13b-GPTQ-4bits" \ --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": "GAIR/autoj-13b-GPTQ-4bits", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use GAIR/autoj-13b-GPTQ-4bits with Docker Model Runner:
docker model run hf.co/GAIR/autoj-13b-GPTQ-4bits
This is a GPTQ 4bits version of Auto-J-13B. We convert it using this script (by TheBroke).
To use the 4bits version of Auto-J, you need to install the following packages:
pip install safetensors
pip install transformers>=4.32.0 optimum>=1.12.0
pip install auto-gptq --extra-index-url https://huggingface.github.io/autogptq-index/whl/cu118/ # Use cu117 if on CUDA 11.7
It takes about 8GB VRAM to load this model, and we provide an example for using it in example_gptq4bits.py.
Note that the behaviours of the quantized model and the original one might be different.
Please refer to our github repo for more datails.
- Downloads last month
- 23