Instructions to use FreedomIntelligence/AceGPT-7b-chat-GPTQ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use FreedomIntelligence/AceGPT-7b-chat-GPTQ with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="FreedomIntelligence/AceGPT-7b-chat-GPTQ")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("FreedomIntelligence/AceGPT-7b-chat-GPTQ") model = AutoModelForCausalLM.from_pretrained("FreedomIntelligence/AceGPT-7b-chat-GPTQ") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use FreedomIntelligence/AceGPT-7b-chat-GPTQ with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "FreedomIntelligence/AceGPT-7b-chat-GPTQ" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "FreedomIntelligence/AceGPT-7b-chat-GPTQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/FreedomIntelligence/AceGPT-7b-chat-GPTQ
- SGLang
How to use FreedomIntelligence/AceGPT-7b-chat-GPTQ 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 "FreedomIntelligence/AceGPT-7b-chat-GPTQ" \ --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": "FreedomIntelligence/AceGPT-7b-chat-GPTQ", "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 "FreedomIntelligence/AceGPT-7b-chat-GPTQ" \ --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": "FreedomIntelligence/AceGPT-7b-chat-GPTQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use FreedomIntelligence/AceGPT-7b-chat-GPTQ with Docker Model Runner:
docker model run hf.co/FreedomIntelligence/AceGPT-7b-chat-GPTQ
File size: 1,559 Bytes
e701494 d3ffb36 e701494 d3ffb36 d59fa20 d3ffb36 f572f8e d3ffb36 e701494 e4f6a3b e701494 e4f6a3b e701494 d3ffb36 e701494 575f449 d3ffb36 6765249 d3ffb36 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | ---
language:
- ar
- en
model_name: AceGPT 7B Chat
model_type: AceGPT
quantized_by: FreedomIntelligence
---
## Updates
Add arg ’**use_safetensors=False**‘ in from_quanted(), while this arg is set to False as defauly in previous Auto-GPTQ. If there are any problems to load model directly by HF, someone can try **git clone**. (Dec 15, 2023)
<!-- description start -->
## Description
This repo contains int4 model(GPTQ) for [AceGPT-7B-Chat](https://huggingface.co/FreedomIntelligence/AceGPT-7B-chat).
The performance of the int4 version has experienced some degradation. For a better user experience, please use the fp16 version.
For details, see [AceGPT-7B-Chat](https://huggingface.co/FreedomIntelligence/AceGPT-7B-chat) and [AceGPT-13B-Chat](https://huggingface.co/FreedomIntelligence/AceGPT-13B-chat).
<!-- description end -->
<!-- README_GPTQ.md-use-from-python start -->
## How to use this GPTQ model from Python code
### Install the necessary packages
Requires: Transformers 4.32.0 or later, Optimum 1.12.0 or later, and AutoGPTQ 0.4.2 or later.
```shell
pip3 install transformers>=4.32.0 optimum>=1.12.0 #See requirements.py for verified versions.
pip3 install auto-gptq --extra-index-url https://huggingface.github.io/autogptq-index/whl/cu118/ # Use cu117 if on CUDA 11.7
```
### You can then generate a simple gradioweb with_quant.py
```bash
python web_quant.py --model-name ${model-path}
```
# You can get more details at https://github.com/FreedomIntelligence/AceGPT/tree/main
<!-- README_GPTQ.md-use-from-python end --> |