Text Generation
Transformers
Safetensors
English
qwen2
chat
conversational
text-generation-inference
8-bit precision
gptq
Instructions to use Qwen/Qwen1.5-72B-Chat-GPTQ-Int8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Qwen/Qwen1.5-72B-Chat-GPTQ-Int8 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Qwen/Qwen1.5-72B-Chat-GPTQ-Int8") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen1.5-72B-Chat-GPTQ-Int8") model = AutoModelForMultimodalLM.from_pretrained("Qwen/Qwen1.5-72B-Chat-GPTQ-Int8") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Qwen/Qwen1.5-72B-Chat-GPTQ-Int8 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Qwen/Qwen1.5-72B-Chat-GPTQ-Int8" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Qwen/Qwen1.5-72B-Chat-GPTQ-Int8", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Qwen/Qwen1.5-72B-Chat-GPTQ-Int8
- SGLang
How to use Qwen/Qwen1.5-72B-Chat-GPTQ-Int8 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 "Qwen/Qwen1.5-72B-Chat-GPTQ-Int8" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Qwen/Qwen1.5-72B-Chat-GPTQ-Int8", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "Qwen/Qwen1.5-72B-Chat-GPTQ-Int8" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Qwen/Qwen1.5-72B-Chat-GPTQ-Int8", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Qwen/Qwen1.5-72B-Chat-GPTQ-Int8 with Docker Model Runner:
docker model run hf.co/Qwen/Qwen1.5-72B-Chat-GPTQ-Int8
Update README.md
Browse files
README.md
CHANGED
|
@@ -17,7 +17,7 @@ tags:
|
|
| 17 |
|
| 18 |
Qwen1.5 is the beta version of Qwen2, a transformer-based decoder-only language model pretrained on a large amount of data. In comparison with the previous released Qwen, the improvements include:
|
| 19 |
|
| 20 |
-
*
|
| 21 |
* Significant performance improvement in human preference for chat models;
|
| 22 |
* Multilingual support of both base and chat models;
|
| 23 |
* Stable support of 32K context length for models of all sizes
|
|
@@ -27,10 +27,10 @@ For more details, please refer to our [blog post](https://qwenlm.github.io/blog/
|
|
| 27 |
<br>
|
| 28 |
|
| 29 |
## Model Details
|
| 30 |
-
Qwen1.5 is a language model series including decoder language models of different model sizes. For each size, we release the base language model and the aligned chat model. It is based on the Transformer architecture with SwiGLU activation, attention QKV bias, group query attention, mixture of sliding window attention and full attention, etc. Additionally, we have an improved tokenizer adaptive to multiple natural languages and codes. For the beta version, temporarily we did not include GQA and the mixture of SWA and full attention.
|
| 31 |
|
| 32 |
## Training details
|
| 33 |
-
We pretrained the models with a large amount of data, and we post-trained the models with both supervised finetuning and direct preference optimization.
|
| 34 |
|
| 35 |
## Requirements
|
| 36 |
The code of Qwen1.5 has been in the latest Hugging face transformers and we advise you to install `transformers>=4.37.0`, or you might encounter the following error:
|
|
|
|
| 17 |
|
| 18 |
Qwen1.5 is the beta version of Qwen2, a transformer-based decoder-only language model pretrained on a large amount of data. In comparison with the previous released Qwen, the improvements include:
|
| 19 |
|
| 20 |
+
* 8 model sizes, including 0.5B, 1.8B, 4B, 7B, 14B, 32B and 72B dense models, and an MoE model of 14B with 2.7B activated;
|
| 21 |
* Significant performance improvement in human preference for chat models;
|
| 22 |
* Multilingual support of both base and chat models;
|
| 23 |
* Stable support of 32K context length for models of all sizes
|
|
|
|
| 27 |
<br>
|
| 28 |
|
| 29 |
## Model Details
|
| 30 |
+
Qwen1.5 is a language model series including decoder language models of different model sizes. For each size, we release the base language model and the aligned chat model. It is based on the Transformer architecture with SwiGLU activation, attention QKV bias, group query attention, mixture of sliding window attention and full attention, etc. Additionally, we have an improved tokenizer adaptive to multiple natural languages and codes. For the beta version, temporarily we did not include GQA (except for 32B) and the mixture of SWA and full attention.
|
| 31 |
|
| 32 |
## Training details
|
| 33 |
+
We pretrained the models with a large amount of data, and we post-trained the models with both supervised finetuning and direct preference optimization.
|
| 34 |
|
| 35 |
## Requirements
|
| 36 |
The code of Qwen1.5 has been in the latest Hugging face transformers and we advise you to install `transformers>=4.37.0`, or you might encounter the following error:
|