WizardLM-2-7B-AWQ

我要开发同款
匿名用户2024年07月31日
26阅读
所属分类ai、mistral、pytorch、region:us、text-generation-infe、endpoints_compatible、autotrain_compatible、license:apache-2.0、arxiv:2308.09583、arxiv:2306.08568
开源地址https://modelscope.cn/models/AI-ModelScope/WizardLM-2-7B-AWQ

作品详情

Description

MaziyarPanahi/WizardLM-2-7B-AWQ is a quantized (AWQ) version of microsoft/WizardLM-2-7B

How to use

Install the necessary packages

pip install --upgrade accelerate autoawq transformers

Example Python code

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!
声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论