Downloads · 30 days
16
20% of all-time downloads
thesven/microsoft_WizardLM-2-7B-GPTQ
microsoft_WizardLM-2-7B-GPTQ is a text generation model from thesven. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
This repo contains a GPTQ 4bit Quantized version of the WizardLM-2-7B model
Downloads · 30 days
16
20% of all-time downloads
All-time downloads
80
Public
Parameters
7.2B
4.2 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors4.2 GB · 100%
How the weights are stored.
I327B · 96%
From the Hugging Face model README
This repo contains a GPTQ 4bit Quantized version of the WizardLM-2-7B model
### System: {system_message}
### Human: {prompt}
### Assistant:
</s>
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
model_name_or_path = "thesven/microsoft_WizardLM-2-7B-GPTQ"
tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
model = AutoModelForCausalLM.from_pretrained(model_name_or_path,
device_map="auto",
trust_remote_code=False,
revision="main")
model.pad_token = model.config.eos_token_id
prompt_template=f'''
### System: You are a very creative story writer. Write a store on the following topic:
### Human: Write a story about Ai
### Assistant:
'''
input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
output = model.generate(inputs=input_ids, temperature=0.1, do_sample=True, top_p=0.95, top_k=40, max_new_tokens=512)
print(tokenizer.decode(output[0]))
Weights sourced from: lucyknada/microsoft_WizardLM-2-7B
We introduce and opensource WizardLM-2, our next generation state-of-the-art large language models, which have improved performance on complex chat, multilingual, reasoning and agent. New family includes three cutting-edge models: WizardLM-2 8x22B, WizardLM-2 70B, and WizardLM-2 7B.
For more details of WizardLM-2 please read our release blog post and upcoming paper.
MT-Bench
We also adopt the automatic MT-Bench evaluation framework based on GPT-4 proposed by lmsys to assess the performance of models. The WizardLM-2 8x22B even demonstrates highly competitive performance compared to the most advanced proprietary models. Meanwhile, WizardLM-2 7B and WizardLM-2 70B are all the top-performing models among the other leading baselines at 7B to 70B model scales.
<p align="center" width="100%"> <a ><img src="https://raw.githubusercontent.com/WizardLM/WizardLM2/main/static/images/mtbench.png" alt="MTBench" style="width: 96%; min-width: 300px; display: block; margin: auto;"></a> </p>Human Preferences Evaluation
We carefully collected a complex and challenging set consisting of real-world instructions, which includes main requirements of humanity, such as writing, coding, math, reasoning, agent, and multilingual. We report the win:loss rate without tie:
We built a fully AI powered synthetic training system to train WizardLM-2 models, please refer to our blog for more details of this system.
<p align="center" width="100%"> <a ><img src="https://raw.githubusercontent.com/WizardLM/WizardLM2/main/static/images/exp_1.png" alt="Method" style="width: 96%; min-width: 300px; display: block; margin: auto;"></a> </p>❗<b>Note for model system prompts usage:</b>
<b>WizardLM-2</b> adopts the prompt format from <b>Vicuna</b> and supports multi-turn conversation. The prompt should be as following:
A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful,
detailed, and polite answers to the user's questions. USER: Hi ASSISTANT: Hello.</s>
USER: Who are you? ASSISTANT: I am WizardLM.</s>......
<b> Inference WizardLM-2 Demo Script</b>
We provide a WizardLM-2 inference demo code on our github