Hippius
mainggufPublicapache-2.0text-generationbase: Qwen/Qwen3-8B

archive/qwen3-8b-gguf-q4-k-m

sha256:f7976e6a75135cb52138ea75484cb6fc42305ff3bc5a292ea8bf3feada25857a·Indexed 15d ago

Parameters

—

Total size

4.7 GB

Files

76

Quantization

—

README.md

7.9 KB

Hippius-maintained selected-file mirror of Qwen/Qwen3-8B-GGUF. Selected quantisation: Q4_K_M. The weight bytes are unchanged; other quantisations are omitted. Original authors and quantiser retain credit. This README was modified to add this notice; upstream usage examples may still point to Hugging Face. See hippius-provenance.json for pinned sources and the origin of the included licence.

Qwen3-8B-GGUF

Chat

Qwen3 Highlights

Qwen3 is the latest generation of large language models in Qwen series, offering a comprehensive suite of dense and mixture-of-experts (MoE) models. Built upon extensive training, Qwen3 delivers groundbreaking advancements in reasoning, instruction-following, agent capabilities, and multilingual support, with the following key features:

  • Uniquely support of seamless switching between thinking mode (for complex logical reasoning, math, and coding) and non-thinking mode (for efficient, general-purpose dialogue) within single model, ensuring optimal performance across various scenarios.
  • Significantly enhancement in its reasoning capabilities, surpassing previous QwQ (in thinking mode) and Qwen2.5 instruct models (in non-thinking mode) on mathematics, code generation, and commonsense logical reasoning.
  • Superior human preference alignment, excelling in creative writing, role-playing, multi-turn dialogues, and instruction following, to deliver a more natural, engaging, and immersive conversational experience.
  • Expertise in agent capabilities, enabling precise integration with external tools in both thinking and unthinking modes and achieving leading performance among open-source models in complex agent-based tasks.
  • Support of 100+ languages and dialects with strong capabilities for multilingual instruction following and translation.

Model Overview

Qwen3-8B has the following features:

  • Type: Causal Language Models

  • Training Stage: Pretraining & Post-training

  • Number of Parameters: 8.2B

  • Number of Paramaters (Non-Embedding): 6.95B

  • Number of Layers: 36

  • Number of Attention Heads (GQA): 32 for Q and 8 for KV

  • Context Length: 32,768 natively and 131,072 tokens with YaRN.

  • Quantization: q4_K_M, q5_0, q5_K_M, q6_K, q8_0

For more details, including benchmark evaluation, hardware requirements, and inference performance, please refer to our blog, GitHub, and Documentation.

Quickstart

llama.cpp

Check out our llama.cpp documentation for more usage guide.

We advise you to clone llama.cpp and install it following the official guide. We follow the latest version of llama.cpp. In the following demonstration, we assume that you are running commands under the repository llama.cpp.

./llama-cli -hf Qwen/Qwen3-8B-GGUF:Q8_0 --jinja --color -ngl 99 -fa -sm row --temp 0.6 --top-k 20 --top-p 0.95 --min-p 0 --presence-penalty 1.5 -c 40960 -n 32768 --no-context-shift

ollama

Check out our ollama documentation for more usage guide.

You can run Qwen3 with one command:

ollama run hf.co/Qwen/Qwen3-8B-GGUF:Q8_0

Switching Between Thinking and Non-Thinking Mode

You can add /think and /no_think to user prompts or system messages to switch the model's thinking mode from turn to turn. The model will follow the most recent instruction in multi-turn conversations.

Here is an example of multi-turn conversation:

> Who are you /no_think

<think>

</think>

I am Qwen, a large-scale language model developed by Alibaba Cloud. [...]

> How many 'r's are in 'strawberries'? /think

<think>
Okay, let's see. The user is asking how many times the letter 'r' appears in the word "strawberries". [...]
</think>

The word strawberries contains 3 instances of the letter r. [...]

Processing Long Texts

Qwen3 natively supports context lengths of up to 32,768 tokens. For conversations where the total length (including both input and output) significantly exceeds this limit, we recommend using RoPE scaling techniques to handle long texts effectively. We have validated the model's performance on context lengths of up to 131,072 tokens using the YaRN method.

To enable YARN in llama.cpp:

./llama-cli ... -c 131072 --rope-scaling yarn --rope-scale 4 --yarn-orig-ctx 32768

Note

All the notable open-source frameworks implement 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. It is also recommended to modify the factor as needed. For example, if the typical context length for your application is 65,536 tokens, it would be better to set factor as 2.0.

Tip

The endpoint provided by Alibaba Model Studio supports dynamic YaRN by default and no extra configuration is needed.

Best Practices

To achieve optimal performance, we recommend the following settings:

  1. Sampling Parameters:

    • For thinking mode (enable_thinking=True), use Temperature=0.6, TopP=0.95, TopK=20, MinP=0, and PresencePenalty=1.5. DO NOT use greedy decoding, as it can lead to performance degradation and endless repetitions.
    • For non-thinking mode (enable_thinking=False), we suggest using Temperature=0.7, TopP=0.8, TopK=20, MinP=0, and PresencePenalty=1.5.
    • We recommend setting presence_penalty to 1.5 for quantized models to suppress repetitive outputs. You can adjust the presence_penalty parameter between 0 and 2. A higher value may occasionally lead to language mixing and a slight reduction in model performance.
  2. Adequate Output Length: We recommend using an output length of 32,768 tokens for most queries. For benchmarking on highly complex problems, such as those found in math and programming competitions, we suggest setting the max output length to 38,912 tokens. This provides the model with sufficient space to generate detailed and comprehensive responses, thereby enhancing its overall performance.

  3. Standardize Output Format: We recommend using prompts to standardize model outputs when benchmarking.

    • Math Problems: Include "Please reason step by step, and put your final answer within \boxed{}." in the prompt.
    • Multiple-Choice Questions: Add the following JSON structure to the prompt to standardize responses: "Please show your choice in the answer field with only the choice letter, e.g., "answer": "C"."
  4. No Thinking Content in History: In multi-turn conversations, the historical model output should only include the final output part and does not need to include the thinking content. It is implemented in the provided chat template in Jinja2. However, for frameworks that do not directly use the Jinja2 chat template, it is up to the developers to ensure that the best practice is followed.

Citation

If you find our work helpful, feel free to give us a cite.

@misc{qwen3technicalreport,
      title={Qwen3 Technical Report}, 
      author={Qwen Team},
      year={2025},
      eprint={2505.09388},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2505.09388}, 
}

License

apache-2.0
LICENSE
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Def…Show full text →
                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "[]"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

   Copyright 2025 Alibaba Cloud

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

Files

76 items
  • 4d6926875512

    74.1 MB

  • 7773b29c8afa

    72.5 MB

  • 03d53087d955

    71.8 MB

  • dd09797af699

    71.7 MB

  • 5e346654d368

    70.5 MB

  • 99b88132f0d4

    70.0 MB

  • fb12c0e04ef9

    69.8 MB

  • 5af3331fed69

    69.8 MB

  • 78280c10ef2b

    69.0 MB

  • 3dc84aa983d1

    68.9 MB

  • c7de201433f7

    68.6 MB

  • 57c51ca638eb

    68.3 MB

  • d03a4ec96dc4

    67.7 MB

  • 77efd452c12e

    67.6 MB

  • db36068781bb

    67.6 MB

  • ab0856cf0f5c

    67.5 MB

  • c8b9e37f21ef

    67.5 MB

  • 6f1c03629cb7

    67.5 MB

  • abfc20a8a163

    67.4 MB

  • 7317292037c8

    67.3 MB

  • cf3559b06077

    67.3 MB

  • aacff327d579

    67.2 MB

  • ee8c1099045d

    67.2 MB

  • 3798fc176c8b

    67.2 MB

  • 49b329f3074f

    67.0 MB

  • 58c3c0d587c5

    66.9 MB

  • 9ab804da0f0f

    66.7 MB

  • cd6233913765

    66.6 MB

  • 76d18c7b81cb

    66.6 MB

  • 2ad57601fa3b

    66.6 MB

  • d57f7ee89234

    66.5 MB

  • 19f4c092a86d

    66.4 MB

  • b18d8c2c6f32

    66.4 MB

  • dd41ce7d4733

    66.3 MB

  • 57232d313217

    66.2 MB

  • ec8ef0ba2d70

    66.1 MB

  • 665662d14661

    66.0 MB

  • 41e4060dd307

    66.0 MB

  • 334c57d1fc19

    65.9 MB

  • 1062c43ce21c

    65.8 MB

  • 53f84e115e6d

    65.8 MB

  • 8f75f16c1b56

    65.8 MB

  • ce61ef9c19a7

    65.8 MB

  • 68b9bd35845d

    65.6 MB

  • 8f99eb18c993

    65.5 MB

  • e13c3731ba44

    65.5 MB

  • c004f3f7b38b

    65.4 MB

  • 1b1c4d5bbf83

    65.4 MB

  • 4109fb664385

    65.4 MB

  • c57c492347d6

    65.4 MB

  • cf9b29dec0a4

    65.3 MB

  • ddaa83abe0ae

    65.2 MB

  • 3312958e95c1

    65.1 MB

  • 041266d60ec9

    65.0 MB

  • 25866785583e

    65.0 MB

  • 56f4d0e687f1

    65.0 MB

  • e3b12f6cd089

    64.9 MB

  • 35be6404f92c

    64.9 MB

  • f0ee597076ff

    64.8 MB

  • 645a8dcf768a

    64.8 MB

  • 140f76112f89

    64.8 MB

  • 32ff09380f81

    64.8 MB

  • 9d60a4636a42

    64.8 MB

  • a26b3536765c

    64.6 MB

  • 3755efc2f966

    64.5 MB

  • 9151c5bebe61

    64.4 MB

  • e65108dace38

    64.3 MB

  • 983e99d67cc5

    64.3 MB

  • fcc515d4bcd9

    64.3 MB

  • e9765bf3c24a

    64.2 MB

  • f019b9ad0a99

    64.2 MB

  • a76181486f17

    64.2 MB

  • Qwen3-8B-Q4_K_M.gguf

    bf39ddb076f4

    192.0 KB

    gguf

  • LICENSE

    5de36594c108

    11.3 KB

  • README.md

    3e7690978813

    7.9 KB

  • hippius-provenance.json

    2318733b429a

    1.1 KB