Add Q2_K GGUF quantization
Browse files- .gitattributes +2 -0
- LICENSE +61 -0
- README.md +89 -0
- shenwen-coderV2-Q2_K.gguf +3 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
shenwen-coderV2-Q2_K.gguf filter=lfs diff=lfs merge=lfs -text
|
LICENSE
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Apache License
|
| 2 |
+
Version 2.0, January 2004
|
| 3 |
+
http://www.apache.org/licenses/
|
| 4 |
+
|
| 5 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 6 |
+
|
| 7 |
+
1. Definitions.
|
| 8 |
+
|
| 9 |
+
"License" shall mean the terms and conditions for use, reproduction,
|
| 10 |
+
and distribution as defined by Sections 1 through 9 of this document.
|
| 11 |
+
|
| 12 |
+
"Licensor" shall mean the copyright owner or entity authorized by
|
| 13 |
+
the copyright owner that is granting the License.
|
| 14 |
+
|
| 15 |
+
"Legal Entity" shall mean the union of the acting entity and all
|
| 16 |
+
other entities that control, are controlled by, or are under common
|
| 17 |
+
control with that entity.
|
| 18 |
+
|
| 19 |
+
"You" (or "Your") shall mean an individual or Legal Entity
|
| 20 |
+
exercising permissions granted by this License.
|
| 21 |
+
|
| 22 |
+
"Source" form shall mean the preferred form for making modifications,
|
| 23 |
+
including but not limited to software source code, documentation
|
| 24 |
+
source, and configuration files.
|
| 25 |
+
|
| 26 |
+
"Object" form shall mean any form resulting from mechanical
|
| 27 |
+
transformation or translation of a Source form, including but
|
| 28 |
+
not limited to compiled object code, generated documentation,
|
| 29 |
+
and conversions to other media types.
|
| 30 |
+
|
| 31 |
+
2. Grant of Copyright License.
|
| 32 |
+
|
| 33 |
+
3. Grant of Patent License.
|
| 34 |
+
|
| 35 |
+
4. Redistribution.
|
| 36 |
+
|
| 37 |
+
5. Submission of Contributions.
|
| 38 |
+
|
| 39 |
+
6. Trademarks.
|
| 40 |
+
|
| 41 |
+
7. Disclaimer of Warranty.
|
| 42 |
+
|
| 43 |
+
8. Limitation of Liability.
|
| 44 |
+
|
| 45 |
+
9. Accepting Warranty or Additional Liability.
|
| 46 |
+
|
| 47 |
+
END OF TERMS AND CONDITIONS
|
| 48 |
+
|
| 49 |
+
Copyright 2025 shenwenAI
|
| 50 |
+
|
| 51 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
| 52 |
+
you may not use this file except in compliance with the License.
|
| 53 |
+
You may obtain a copy of the License at
|
| 54 |
+
|
| 55 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
| 56 |
+
|
| 57 |
+
Unless required by applicable law or agreed to in writing, software
|
| 58 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
| 59 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 60 |
+
See the License for the specific language governing permissions and
|
| 61 |
+
limitations under the License.
|
README.md
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
quantization: Q2_K
|
| 3 |
+
AIGC:
|
| 4 |
+
ContentProducer: Minimax Agent AI
|
| 5 |
+
ContentPropagator: shenwenAI
|
| 6 |
+
Label: AIGC
|
| 7 |
+
---
|
| 8 |
+
|
| 9 |
+
# shenwen-coderV2-Q2_K-GGUF
|
| 10 |
+
|
| 11 |
+
<p align="center">
|
| 12 |
+
<img src="https://huggingface.co/front/assets/huggingface_logo.svg" alt="Hugging Face" width="50" height="50">
|
| 13 |
+
</p>
|
| 14 |
+
|
| 15 |
+
<div align="center">
|
| 16 |
+
|
| 17 |
+
[](https://huggingface.co/shenwenAI/shenwen-coderV2-GGUF)
|
| 18 |
+
[]()
|
| 19 |
+
[]()
|
| 20 |
+
[]()
|
| 21 |
+
|
| 22 |
+
</div>
|
| 23 |
+
|
| 24 |
+
## Model Overview
|
| 25 |
+
|
| 26 |
+
**shenwen-coderV2-Q2_K-GGUF** is a quantized GGUF version of [shenwen-coderV2-Instruct](https://huggingface.co/shenwenAI/shenwen-coderV2-Instruct), optimized for efficient inference with llama.cpp and compatible tools.
|
| 27 |
+
|
| 28 |
+
## Quantization Details
|
| 29 |
+
|
| 30 |
+
| Attribute | Value |
|
| 31 |
+
|-----------|-------|
|
| 32 |
+
| **Format** | GGUF |
|
| 33 |
+
| **Quantization** | Q2_K |
|
| 34 |
+
| **File Size** | ~323MB |
|
| 35 |
+
| **Original Size** | ~949MB |
|
| 36 |
+
| **Compression** | ~34% of original |
|
| 37 |
+
|
| 38 |
+
## Usage with llama.cpp
|
| 39 |
+
|
| 40 |
+
### Prerequisites
|
| 41 |
+
|
| 42 |
+
```bash
|
| 43 |
+
# Download llama.cpp CLI tools
|
| 44 |
+
git clone https://github.com/ggerganov/llama.cpp
|
| 45 |
+
cd llama.cpp
|
| 46 |
+
mkdir build && cd build
|
| 47 |
+
cmake .. && make -j
|
| 48 |
+
```
|
| 49 |
+
|
| 50 |
+
### Running Inference
|
| 51 |
+
|
| 52 |
+
```bash
|
| 53 |
+
# Download model
|
| 54 |
+
wget https://huggingface.co/shenwenAI/shenwen-coderV2-GGUF/resolve/main/q2_k/shenwen-coderV2-Q2_K.gguf
|
| 55 |
+
|
| 56 |
+
# Run inference
|
| 57 |
+
./build/bin/llama-cli -m shenwen-coderV2-Q2_K.gguf -n 512 -p "Write a Python function to calculate factorial:"
|
| 58 |
+
```
|
| 59 |
+
|
| 60 |
+
### Running with quantize tools
|
| 61 |
+
|
| 62 |
+
```bash
|
| 63 |
+
# Quantize your own models
|
| 64 |
+
./build/bin/llama-quantize input.gguf output-Q2_K.gguf Q2_K
|
| 65 |
+
```
|
| 66 |
+
|
| 67 |
+
## Usage with Ollama
|
| 68 |
+
|
| 69 |
+
```bash
|
| 70 |
+
# Pull the model
|
| 71 |
+
ollama pull shenwenai/shenwen-coderV2:q2_k
|
| 72 |
+
|
| 73 |
+
# Run inference
|
| 74 |
+
ollama run shenwenai/shenwen-coderV2:q2_k "Write a hello world in Python"
|
| 75 |
+
```
|
| 76 |
+
|
| 77 |
+
## Model Source
|
| 78 |
+
|
| 79 |
+
This GGUF model is converted from [shenwenAI/shenwen-coderV2-Instruct](https://huggingface.co/shenwenAI/shenwen-coderV2-Instruct), which is based on Qwen2.5-Coder-0.5B-Instruct.
|
| 80 |
+
|
| 81 |
+
## License
|
| 82 |
+
|
| 83 |
+
Apache 2.0 - See [LICENSE](https://huggingface.co/shenwenAI/shenwen-coderV2-Instruct/blob/main/LICENSE)
|
| 84 |
+
|
| 85 |
+
## Acknowledgments
|
| 86 |
+
|
| 87 |
+
- [Qwen Team](https://github.com/QwenLM/Qwen) for Qwen2.5-Coder
|
| 88 |
+
- [llama.cpp](https://github.com/ggerganov/llama.cpp) for GGUF format
|
| 89 |
+
- [shenwenAI](https://huggingface.co/shenwenAI) for model training
|
shenwen-coderV2-Q2_K.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9505cf477aff4b7dbacf358efee190fdeeed3026e4e7fe308c01e788698897eb
|
| 3 |
+
size 338606944
|