Model Intelligence Sheet
qwp4w3hyb/qwen2-72b-instruct-imat-gguf overview
# Original Model Card: # Qwen2-72B-Instruct
Downloads
140
Likes
0
Pipeline
text-generation
Library
—
Visibility
Public
Access
Open
Repository Files & Downloads
26 files detected
Direct downloads for all repository files
| File | Type | Quantization | Size | Link |
|---|---|---|---|---|
| qwen2-72b-instruct-bf16.split-00001-of-00004.gguf | GGUF | BF16 | 40.66 GB | Download |
| qwen2-72b-instruct-bf16.split-00002-of-00004.gguf | GGUF | BF16 | 40.59 GB | Download |
| qwen2-72b-instruct-bf16.split-00003-of-00004.gguf | GGUF | BF16 | 40.87 GB | Download |
| qwen2-72b-instruct-bf16.split-00004-of-00004.gguf | GGUF | BF16 | 13.31 GB | Download |
| qwen2-72b-instruct-imat-IQ1_S.gguf | GGUF | IQ1_S | 21.13 GB | Download |
| qwen2-72b-instruct-imat-IQ2_M.gguf | GGUF | IQ2_M | 27.32 GB | Download |
| qwen2-72b-instruct-imat-IQ2_S.gguf | GGUF | IQ2_S | 26.02 GB | Download |
| qwen2-72b-instruct-imat-IQ2_XS.gguf | GGUF | IQ2_XS | 25.20 GB | Download |
| qwen2-72b-instruct-imat-IQ2_XXS.gguf | GGUF | IQ2_XXS | 23.74 GB | Download |
| qwen2-72b-instruct-imat-IQ3_M.gguf | GGUF | IQ3_M | 33.07 GB | Download |
| qwen2-72b-instruct-imat-IQ3_S.gguf | GGUF | IQ3_S | 32.12 GB | Download |
| qwen2-72b-instruct-imat-IQ3_XS.gguf | GGUF | IQ3_XS | 30.59 GB | Download |
| qwen2-72b-instruct-imat-IQ3_XXS.gguf | GGUF | IQ3_XXS | 29.66 GB | Download |
| qwen2-72b-instruct-imat-IQ4_NL.gguf | GGUF | IQ4_NL | 38.48 GB | Download |
| qwen2-72b-instruct-imat-IQ4_XS.gguf | GGUF | IQ4_XS | 36.98 GB | Download |
| qwen2-72b-instruct-imat-Q4_0.gguf | GGUF | — | 38.54 GB | Download |
| qwen2-72b-instruct-imat-Q4_K_M.gguf | GGUF | Q4_K_M | 44.16 GB | Download |
| qwen2-72b-instruct-imat-Q4_K_S.gguf | GGUF | Q4_K_S | 40.88 GB | Download |
| qwen2-72b-instruct-imat-Q5_K_M.split-00001-of-00002.gguf | GGUF | Q5_K_M | 26.99 GB | Download |
| qwen2-72b-instruct-imat-Q5_K_M.split-00002-of-00002.gguf | GGUF | Q5_K_M | 23.72 GB | Download |
| qwen2-72b-instruct-imat-Q5_K_S.split-00001-of-00002.gguf | GGUF | Q5_K_S | 25.49 GB | Download |
| qwen2-72b-instruct-imat-Q5_K_S.split-00002-of-00002.gguf | GGUF | Q5_K_S | 22.36 GB | Download |
| qwen2-72b-instruct-imat-Q6_K.split-00001-of-00002.gguf | GGUF | Q6_K | 32.03 GB | Download |
| qwen2-72b-instruct-imat-Q6_K.split-00002-of-00002.gguf | GGUF | Q6_K | 27.89 GB | Download |
| qwen2-72b-instruct-imat-Q8_0.split-00001-of-00002.gguf | GGUF | — | 38.45 GB | Download |
| qwen2-72b-instruct-imat-Q8_0.split-00002-of-00002.gguf | GGUF | — | 33.51 GB | Download |
Model Details Live
Metadata Inspector
Normalized metadata (stored in metadata_json)
{
"metadata": {},
"card_data": {
"license": "other",
"license_name": "tongyi-qianwen",
"license_link": "https://huggingface.co/Qwen/Qwen2-72B-Instruct/blob/main/LICENSE",
"language": [
"en"
],
"pipeline_tag": "text-generation",
"tags": [
"chat"
],
"base_model": "Qwen/Qwen2-72B-Instruct",
"frontmatter": {
"license": "other",
"license_name": "tongyi-qianwen",
"license_link": "https://huggingface.co/Qwen/Qwen2-72B-Instruct/blob/main/LICENSE",
"language": [
"en"
],
"pipeline_tag": "text-generation",
"tags": [
"chat"
],
"base_model": "Qwen/Qwen2-72B-Instruct"
},
"hero_image_url": "",
"summary": "`` ./imatrix -c 512 -m $model_name-bf16.gguf -f calibration_datav3.txt -o $model_name.imatrix `` # Original Model Card: # Qwen2-72B-Instruct",
"quick_links": [],
"benchmark_table_html": "",
"readme_markdown": "---\nlicense: other\nlicense_name: tongyi-qianwen\nlicense_link: https://huggingface.co/Qwen/Qwen2-72B-Instruct/blob/main/LICENSE\nlanguage:\n- en\npipeline_tag: text-generation\ntags:\n- chat\nbase_model: Qwen/Qwen2-72B-Instruct\n---\n\n# Quant Infos\n\n- quants done with an importance matrix for improved quantization loss\n- ggufs & imatrix generated from bf16 for \"optimal\" accuracy loss\n- Wide coverage of different gguf quant types from Q\\_8\\_0 down to IQ1\\_S\n- Quantized with [llama.cpp](https://github.com/ggerganov/llama.cpp) commit [d62e4aaa02540c89be8b59426340b909d02bbc9e](https://github.com/ggerganov/llama.cpp/commit/d62e4aaa02540c89be8b59426340b909d02bbc9e) (master as of 2024-06-24)\n- Imatrix generated with [this](https://gist.github.com/bartowski1182/eb213dccb3571f863da82e99418f81e8) multi-purpose dataset by [bartowski](https://huggingface.co/bartowski).\n ```\n ./imatrix -c 512 -m $model_name-bf16.gguf -f calibration_datav3.txt -o $model_name.imatrix\n ```\n\n# Original Model Card:\n\n# Qwen2-72B-Instruct\n\n## Introduction\n\nQwen2 is the new series of Qwen large language models. For Qwen2, we release a number of base language models and instruction-tuned language models ranging from 0.5 to 72 billion parameters, including a Mixture-of-Experts model. This repo contains the instruction-tuned 72B Qwen2 model.\n\nCompared with the state-of-the-art opensource language models, including the previous released Qwen1.5, Qwen2 has generally surpassed most opensource models and demonstrated competitiveness against proprietary models across a series of benchmarks targeting for language understanding, language generation, multilingual capability, coding, mathematics, reasoning, etc.\n\nQwen2-72B-Instruct supports a context length of up to 131,072 tokens, enabling the processing of extensive inputs. Please refer to [this section](#processing-long-texts) for detailed instructions on how to deploy Qwen2 for handling long texts.\n\nFor more details, please refer to our [blog](https://qwenlm.github.io/blog/qwen2/), [GitHub](https://github.com/QwenLM/Qwen2), and [Documentation](https://qwen.readthedocs.io/en/latest/).\n<br>\n\n## Model Details\nQwen2 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, etc. Additionally, we have an improved tokenizer adaptive to multiple natural languages and codes.\n\n## Training details\nWe pretrained the models with a large amount of data, and we post-trained the models with both supervised finetuning and direct preference optimization.\n\n\n## Requirements\nThe code of Qwen2 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:\n```\nKeyError: 'qwen2'\n```\n\n## Quickstart\n\nHere provides a code snippet with `apply_chat_template` to show you how to load the tokenizer and model and how to generate contents.\n\n```python\nfrom transformers import AutoModelForCausalLM, AutoTokenizer\ndevice = \"cuda\" # the device to load the model onto\n\nmodel = AutoModelForCausalLM.from_pretrained(\n \"Qwen/Qwen2-72B-Instruct\",\n torch_dtype=\"auto\",\n device_map=\"auto\"\n)\ntokenizer = AutoTokenizer.from_pretrained(\"Qwen/Qwen2-72B-Instruct\")\n\nprompt = \"Give me a short introduction to large language model.\"\nmessages = [\n {\"role\": \"system\", \"content\": \"You are a helpful assistant.\"},\n {\"role\": \"user\", \"content\": prompt}\n]\ntext = tokenizer.apply_chat_template(\n messages,\n tokenize=False,\n add_generation_prompt=True\n)\nmodel_inputs = tokenizer([text], return_tensors=\"pt\").to(device)\n\ngenerated_ids = model.generate(\n model_inputs.input_ids,\n max_new_tokens=512\n)\ngenerated_ids = [\n output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)\n]\n\nresponse = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]\n```\n\n### Processing Long Texts\n\nTo handle extensive inputs exceeding 32,768 tokens, we utilize [YARN](https://arxiv.org/abs/2309.00071), a technique for enhancing model length extrapolation, ensuring optimal performance on lengthy texts.\n\nFor deployment, we recommend using vLLM. You can enable the long-context capabilities by following these steps:\n\n1. **Install vLLM**: You can install vLLM by running the following command.\n\n```bash\npip install \"vllm>=0.4.3\"\n```\n\nOr you can install vLLM from [source](https://github.com/vllm-project/vllm/).\n\n2. **Configure Model Settings**: After downloading the model weights, modify the `config.json` file by including the below snippet:\n ```json\n {\n \"architectures\": [\n \"Qwen2ForCausalLM\"\n ],\n // ...\n \"vocab_size\": 152064,\n\n // adding the following snippets\n \"rope_scaling\": {\n \"factor\": 4.0,\n \"original_max_position_embeddings\": 32768,\n \"type\": \"yarn\"\n }\n }\n ```\n This snippet enable YARN to support longer contexts.\n\n3. **Model Deployment**: Utilize vLLM to deploy your model. For instance, you can set up an openAI-like server using the command:\n\n ```bash\n python -m vllm.entrypoints.openai.api_server --served-model-name Qwen2-72B-Instruct --model path/to/weights\n ```\n\n Then you can access the Chat API by:\n\n ```bash\n curl http://localhost:8000/v1/chat/completions \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"model\": \"Qwen2-72B-Instruct\",\n \"messages\": [\n {\"role\": \"system\", \"content\": \"You are a helpful assistant.\"},\n {\"role\": \"user\", \"content\": \"Your Long Input Here.\"}\n ]\n }'\n ```\n\n For further usage instructions of vLLM, please refer to our [Github](https://github.com/QwenLM/Qwen2).\n\n**Note**: Presently, vLLM only supports static YARN, which means the scaling factor remains constant regardless of input length, **potentially impacting performance on shorter texts**. We advise adding the `rope_scaling` configuration only when processing long contexts is required.\n\n## Evaluation\n\nWe briefly compare Qwen2-72B-Instruct with similar-sized instruction-tuned LLMs, including our previous Qwen1.5-72B-Chat. The results are shown as follows:\n\n| Datasets | Llama-3-70B-Instruct | Qwen1.5-72B-Chat | **Qwen2-72B-Instruct** |\n| :--- | :---: | :---: | :---: |\n| _**English**_ | | | |\n| MMLU | 82.0 | 75.6 | **82.3** |\n| MMLU-Pro | 56.2 | 51.7 | **64.4** |\n| GPQA | 41.9 | 39.4 | **42.4** |\n| TheroemQA | 42.5 | 28.8 | **44.4** |\n| MT-Bench | 8.95 | 8.61 | **9.12** |\n| Arena-Hard | 41.1 | 36.1 | **48.1** |\n| IFEval (Prompt Strict-Acc.) | 77.3 | 55.8 | **77.6** |\n| _**Coding**_ | | | |\n| HumanEval | 81.7 | 71.3 | **86.0** |\n| MBPP | **82.3** | 71.9 | 80.2 |\n| MultiPL-E | 63.4 | 48.1 | **69.2** |\n| EvalPlus | 75.2 | 66.9 | **79.0** |\n| LiveCodeBench | 29.3 | 17.9 | **35.7** |\n| _**Mathematics**_ | | | |\n| GSM8K | **93.0** | 82.7 | 91.1 |\n| MATH | 50.4 | 42.5 | **59.7** |\n| _**Chinese**_ | | | |\n| C-Eval | 61.6 | 76.1 | **83.8** |\n| AlignBench | 7.42 | 7.28 | **8.27** |\n\n## Citation\n\nIf you find our work helpful, feel free to give us a cite.\n\n```\n@article{qwen2,\n title={Qwen2 Technical Report},\n year={2024}\n}\n```\n",
"related_quantizations": []
},
"tags": [
"gguf",
"chat",
"text-generation",
"en",
"arxiv:2309.00071",
"base_model:Qwen/Qwen2-72B-Instruct",
"base_model:quantized:Qwen/Qwen2-72B-Instruct",
"license:other",
"endpoints_compatible",
"region:us",
"imatrix",
"conversational"
],
"likes": 0,
"downloads": 140,
"gated": false,
"private": false,
"last_modified": "2024-06-27T09:20:20.000Z",
"created_at": "2024-06-25T22:03:16.000Z",
"pipeline_tag": "text-generation",
"library_name": ""
}
Source payload excerpt (from Hugging Face API)
{
"_id": "667b3ea40ae3fef85fe97378",
"id": "qwp4w3hyb/Qwen2-72B-Instruct-iMat-GGUF",
"modelId": "qwp4w3hyb/Qwen2-72B-Instruct-iMat-GGUF",
"sha": "016ed0c715509bba5fa60929e230c77f6fb3914f",
"createdAt": "2024-06-25T22:03:16.000Z",
"lastModified": "2024-06-27T09:20:20.000Z",
"author": "qwp4w3hyb",
"downloads": 140,
"likes": 0,
"gated": false,
"private": false,
"pipeline_tag": "text-generation",
"library_name": "",
"siblings_count": 28
}