---
title: WizardLM-2-7B-AWQ
canonical_url: "https://www.modelscope.cn/models/AI-ModelScope/WizardLM-2-7B-AWQ"
md_url: "https://www.modelscope.cn/models/AI-ModelScope/WizardLM-2-7B-AWQ.md"
repository: AI-ModelScope/WizardLM-2-7B-AWQ
last_updated: 2024-04-16
pipeline_tag: text-generation
tasks:
  - text-generation
model_type:
  - mistral
architectures:
  - MistralForCausalLM
parameters: 1.2B
tensor_type:
  - F16
  - I32
library_name:
  - transformer
  - safetensors
  - pytorch
frameworks:
  - pytorch
inference_backends:
  - "deploy_task text/emb"
  - "lmdeploy 0.9.1"
  - "lmdeploy_turbomind 0.9.1"
  - "sglang 0.5.2"
  - "vllm 0.9.2"
downloads: 3298
stars: 0
tags:
  - finetuned
  - quantized
  - 4-bit
  - AWQ
  - transformers
  - safetensors
  - mistral
  - text-generation
  - "arxiv:2304.12244"
  - "arxiv:2306.08568"
  - "arxiv:2308.09583"
  - "license:apache-2.0"
  - autotrain_compatible
  - endpoints_compatible
  - text-generation-inference
  - "region:us"
---

# WizardLM-2-7B-AWQ

> WizardLM-2-7B-AWQ - AI-ModelScope 在 ModelScope 开源的模型。Description MaziyarPanahi/WizardLM-2-7B-AWQ is a quantized (AWQ) version of microsoft/WizardLM-2-7B

AI-ModelScope/WizardLM-2-7B-AWQ 是 ModelScope 魔搭社区上的 1.2B 参数text-generation模型，可用 deploy_task text/emb、lmdeploy 0.9.1、lmdeploy_turbomind 0.9.1 部署。

- **Repository**: AI-ModelScope/WizardLM-2-7B-AWQ
- **Tasks**: text-generation
- **Parameters**: 1.2B
- **Inference backends**: deploy_task text/emb, lmdeploy 0.9.1, lmdeploy_turbomind 0.9.1, sglang 0.5.2, vllm 0.9.2
- **Tags**: finetuned, quantized, 4-bit, AWQ, transformers, safetensors, mistral, text-generation, arxiv:2304.12244, arxiv:2306.08568, arxiv:2308.09583, license:apache-2.0, autotrain_compatible, endpoints_compatible, text-generation-inference, region:us
- **Downloads**: 3298
- **Stars**: 0
- **Last updated**: 2024-04-16

Source: https://www.modelscope.cn/models/AI-ModelScope/WizardLM-2-7B-AWQ

---

# Description
[MaziyarPanahi/WizardLM-2-7B-AWQ](https://huggingface.co/MaziyarPanahi/WizardLM-2-7B-AWQ) is a quantized (AWQ) version of [microsoft/WizardLM-2-7B](https://huggingface.co/microsoft/WizardLM-2-7B)

## How to use
### Install the necessary packages

```
pip install --upgrade accelerate autoawq transformers
```

### Example Python code


```python
from transformers import AutoTokenizer, AutoModelForCausalLM

model_id = "MaziyarPanahi/WizardLM-2-7B-AWQ"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id).to(0)

text = "User:\nHello can you provide me with top-3 cool places to visit in Paris?\n\nAssistant:\n"
inputs = tokenizer(text, return_tensors="pt").to(0)

out = model.generate(**inputs, max_new_tokens=300)
print(tokenizer.decode(out[0], skip_special_tokens=True))
```

Results:
```
User:
Hello can you provide me with top-3 cool places to visit in Paris?

Assistant:
Absolutely, here are my top-3 recommendations for must-see places in Paris:

1. The Eiffel Tower: An icon of Paris, this wrought-iron lattice tower is a global cultural icon of France and is among the most recognizable structures in the world. Climbing up to the top offers breathtaking views of the city.

2. The Louvre Museum: Home to thousands of works of art, the Louvre is the world's largest art museum and a historic monument in Paris. Must-see pieces include the Mona Lisa, the Winged Victory of Samothrace, and the Venus de Milo.

3. Notre-Dame Cathedral: This cathedral is a masterpiece of French Gothic architecture and is famous for its intricate stone carvings, beautiful stained glass, and its iconic twin towers. Be sure to spend some time exploring its history and learning about the fascinating restoration efforts post the 2019 fire.

I hope you find these recommendations helpful and that they make for an enjoyable and memorable trip to Paris. Safe travels!
```
