Instructions to use askmyteapot/GPT4-X-Alpasta-30b-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use askmyteapot/GPT4-X-Alpasta-30b-4bit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="askmyteapot/GPT4-X-Alpasta-30b-4bit")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("askmyteapot/GPT4-X-Alpasta-30b-4bit") model = AutoModelForCausalLM.from_pretrained("askmyteapot/GPT4-X-Alpasta-30b-4bit", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use askmyteapot/GPT4-X-Alpasta-30b-4bit with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "askmyteapot/GPT4-X-Alpasta-30b-4bit" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "askmyteapot/GPT4-X-Alpasta-30b-4bit", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/askmyteapot/GPT4-X-Alpasta-30b-4bit
- SGLang
How to use askmyteapot/GPT4-X-Alpasta-30b-4bit 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 "askmyteapot/GPT4-X-Alpasta-30b-4bit" \ --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": "askmyteapot/GPT4-X-Alpasta-30b-4bit", "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 "askmyteapot/GPT4-X-Alpasta-30b-4bit" \ --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": "askmyteapot/GPT4-X-Alpasta-30b-4bit", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use askmyteapot/GPT4-X-Alpasta-30b-4bit with Docker Model Runner:
docker model run hf.co/askmyteapot/GPT4-X-Alpasta-30b-4bit
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
This is a 4bit quant of https://huggingface.co/MetaIX/GPT4-X-Alpasta-30b
My secret sauce:
- Using comit 3c16fd9 of 0cc4m's GPTQ fork
- Using C4 as the calibration dataset
- Act-order, True-sequential, percdamp 0.1 (the default percdamp is 0.01)
- No groupsize
- Will run with CUDA, does not need triton.
- Quant completed on a 'Premium GPU' and 'High Memory' Google Colab.
Benchmark results
| Model | C4 | WikiText2 | PTB |
|---|---|---|---|
| MetaIX's FP16 | 6.98400259 | 4.607768536 | 9.414786339 |
| This Quant | 7.292364597 | 4.954069614 | 9.754593849 |
- Downloads last month
- 9