初始化项目,由ModelHub XC社区提供模型

Model: gabriellarson/NextCoder-7B-GGUF
Source: Original Platform
This commit is contained in:
ModelHub XC
2026-10-18 07:54:18 +08:00
commit 4eec6fdefb
28 changed files with 269 additions and 0 deletions

61
.gitattributes vendored Normal file
View File

@@ -0,0 +1,61 @@
*.7z filter=lfs diff=lfs merge=lfs -text
*.arrow filter=lfs diff=lfs merge=lfs -text
*.bin filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.ckpt filter=lfs diff=lfs merge=lfs -text
*.ftz filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.h5 filter=lfs diff=lfs merge=lfs -text
*.joblib filter=lfs diff=lfs merge=lfs -text
*.lfs.* filter=lfs diff=lfs merge=lfs -text
*.mlmodel filter=lfs diff=lfs merge=lfs -text
*.model filter=lfs diff=lfs merge=lfs -text
*.msgpack filter=lfs diff=lfs merge=lfs -text
*.npy filter=lfs diff=lfs merge=lfs -text
*.npz filter=lfs diff=lfs merge=lfs -text
*.onnx filter=lfs diff=lfs merge=lfs -text
*.ot filter=lfs diff=lfs merge=lfs -text
*.parquet filter=lfs diff=lfs merge=lfs -text
*.pb filter=lfs diff=lfs merge=lfs -text
*.pickle filter=lfs diff=lfs merge=lfs -text
*.pkl filter=lfs diff=lfs merge=lfs -text
*.pt filter=lfs diff=lfs merge=lfs -text
*.pth filter=lfs diff=lfs merge=lfs -text
*.rar filter=lfs diff=lfs merge=lfs -text
*.safetensors filter=lfs diff=lfs merge=lfs -text
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
*.tar.* filter=lfs diff=lfs merge=lfs -text
*.tar filter=lfs diff=lfs merge=lfs -text
*.tflite filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.wasm filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text
*tfevents* filter=lfs diff=lfs merge=lfs -text
NextCoder-7B-IQ2_M.gguf filter=lfs diff=lfs merge=lfs -text
NextCoder-7B-IQ2_S.gguf filter=lfs diff=lfs merge=lfs -text
NextCoder-7B-IQ2_XS.gguf filter=lfs diff=lfs merge=lfs -text
NextCoder-7B-IQ2_XXS.gguf filter=lfs diff=lfs merge=lfs -text
NextCoder-7B-Q4_0.gguf filter=lfs diff=lfs merge=lfs -text
NextCoder-7B-Q5_0.gguf filter=lfs diff=lfs merge=lfs -text
NextCoder-7B-IQ1_M.gguf filter=lfs diff=lfs merge=lfs -text
NextCoder-7B-IQ1_S.gguf filter=lfs diff=lfs merge=lfs -text
NextCoder-7B-IQ3_S.gguf filter=lfs diff=lfs merge=lfs -text
NextCoder-7B-IQ3_XXS.gguf filter=lfs diff=lfs merge=lfs -text
NextCoder-7B-Q2_K.gguf filter=lfs diff=lfs merge=lfs -text
NextCoder-7B-Q2_K_S.gguf filter=lfs diff=lfs merge=lfs -text
NextCoder-7B-IQ3_M.gguf filter=lfs diff=lfs merge=lfs -text
NextCoder-7B-IQ3_XS.gguf filter=lfs diff=lfs merge=lfs -text
NextCoder-7B-Q3_K_M.gguf filter=lfs diff=lfs merge=lfs -text
NextCoder-7B-Q3_K_S.gguf filter=lfs diff=lfs merge=lfs -text
NextCoder-7B-IQ4_NL.gguf filter=lfs diff=lfs merge=lfs -text
NextCoder-7B-IQ4_XS.gguf filter=lfs diff=lfs merge=lfs -text
NextCoder-7B-Q3_K_L.gguf filter=lfs diff=lfs merge=lfs -text
NextCoder-7B-Q4_K_S.gguf filter=lfs diff=lfs merge=lfs -text
NextCoder-7B-Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
NextCoder-7B-Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text
NextCoder-7B-Q5_K_S.gguf filter=lfs diff=lfs merge=lfs -text
NextCoder-7B-Q6_K.gguf filter=lfs diff=lfs merge=lfs -text
NextCoder-7B-Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
NextCoder-7B-F16.gguf filter=lfs diff=lfs merge=lfs -text

3
NextCoder-7B-F16.gguf Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d596047bac9cd7b1bd4e0e0978eb3b73c20820205dce44577abb55ac95882e22
size 15237854432

3
NextCoder-7B-IQ1_M.gguf Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:aae9f8aef4a10b4222334c5c4436d396b303ea8acacc087a69e3ef443b12327d
size 2042197440

3
NextCoder-7B-IQ1_S.gguf Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d3acc67026598da839dc8b7f9fa74a7f43ea82a5314593a05330b32409bafd40
size 1903668672

3
NextCoder-7B-IQ2_M.gguf Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:484775997496b552361b4eaff53a6cc3dd6e209badc5ff55a8d109c0bb580b88
size 2780343744

3
NextCoder-7B-IQ2_S.gguf Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7c33d0ab3f0e78f49809d697ee3736a349e96d24de61210964a5eb974289bc18
size 2595638720

3
NextCoder-7B-IQ2_XS.gguf Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9b3f7743392beb181bff9fa7466c5a05d516682da472e98c6fd8643580f582ad
size 2469023168

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:45c0b425c4474a23ca0f9cc773a66b3326300f6ffec3c8048b6b94268fae5851
size 2273078720

3
NextCoder-7B-IQ3_M.gguf Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9034ff7cb45e14b47847edc132422c74c172688273800793702337a5659f2022
size 3574013376

3
NextCoder-7B-IQ3_S.gguf Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9719065d9072f7060314330a082b4a3a97f100fd16142900fca6b2cc1ff6fae9
size 3499193792

3
NextCoder-7B-IQ3_XS.gguf Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:437fc4274f22ab64a5c6c1d61a05b1d1065a3b5e5ac73bebfed252dfcbec5a1f
size 3346257344

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1db2beecb2e36bc026e068a61e0bc752dcbcf94dac137e11c6f6526502d7909e
size 3114515904

3
NextCoder-7B-IQ4_NL.gguf Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e8365eb735a8d422ad5d436084ff0ed75051cce400782cc5ce6073982e74b90f
size 4437814720

3
NextCoder-7B-IQ4_XS.gguf Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a30ffeba61f26e7895e3117f076c7c15b7cffe5f19936a9b51059fe55a556632
size 4218473920

3
NextCoder-7B-Q2_K.gguf Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:084f2ceb4b9ef7458a8d8c68e8b3f0e809603de9b82823bce81d4329ed60c7db
size 3015941568

3
NextCoder-7B-Q2_K_S.gguf Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1c4f905bd570d33d06b3989c8e52c5597242202514320bbfeb4d65be77b84506
size 2834075072

3
NextCoder-7B-Q3_K_L.gguf Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:cbad5c598dfe414f336207257b57abf88eb344ce2c3c1ac5996e3317a4641f0c
size 4088460736

3
NextCoder-7B-Q3_K_M.gguf Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f75ad596858854f0b0da1002bb45a0c0374745f23ed9b7f25874fbebf30bc82d
size 3808392640

3
NextCoder-7B-Q3_K_S.gguf Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a7de6be13f55bfdca7d860a583a54e222ea563e54316c21da78f505dd6e4b533
size 3492369856

3
NextCoder-7B-Q4_0.gguf Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5390d0cc71560b04a058431ada1b8397e03cee5c9fb3f2a390e3d51378e36811
size 4444122560

3
NextCoder-7B-Q4_K_M.gguf Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:514dce4fe4bdf89761fdfb54f75296f0c3c85ebf37ffe341c740925de6755315
size 4683075008

3
NextCoder-7B-Q4_K_S.gguf Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c0f5cafd521014a1aab5a9cba9bee321ce166e76814b0351c37733d602803fdb
size 4457770432

3
NextCoder-7B-Q5_0.gguf Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5c86b59d449d1e0ac59f7bc8e897f09eee0b702fe57057920765d541b9699845
size 5327908288

3
NextCoder-7B-Q5_K_M.gguf Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b03787e340ea12be1b09a706440e8963778ddf01a02fee9cc75bdb8caaab9e15
size 5444832704

3
NextCoder-7B-Q5_K_S.gguf Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:03c273434fddfc9cbc70a0cbb1742e848d698b0d8a45917634143b420925acd4
size 5315177920

3
NextCoder-7B-Q6_K.gguf Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b84bf33313832858a1feae0609e60df208e016b0a86c963c9264aab9a03091e1
size 6254200256

3
NextCoder-7B-Q8_0.gguf Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8a8dec94930de7c7bafeb8762c5aeb3b3c7e70e70a3004bb0dcae18f72cd1056
size 8098526656

130
README.md Normal file
View File

@@ -0,0 +1,130 @@
---
license: mit
language:
- en
base_model:
- microsoft/NextCoder-7B
pipeline_tag: text-generation
library_name: transformers
tags:
- code
- chat
- microsoft
- nextcoder
- selekt
datasets:
- microsoft/NextCoderDataset
- microsoft/NextCoderDataset-Conversational
- bigcode/commitpackft
- bigcode/starcoderdata
---
# NextCoder-7B
<p align="center">
<a href="https://github.com/microsoft/NextCoder">GitHub</a>&nbsp&nbsp | &nbsp&nbsp <a href="https://www.microsoft.com/en-us/research/publication/nextcoder-robust-adaptation-of-code-lms-to-diverse-code-edits/">Paper</a>
</p>
> NextCoder: Robust Adaptation of Code LMs to Diverse Code Edits (ICML'2025)
## Introduction
NextCoder is the latest series of Code-Editing large language models developed using the Qwen2.5-Coder Instruct variants as base and trained with novel Selective Knowledge Transfer finetuning methodology as introduced in the paper. NextCoder family model comes in 3 different sizes 7, 14, 32 billion parameters, to meet the needs of different developers.
Following are the key improvements:
- Significantly improvements in **code editing**, NextCoder-32B has performing on par with GPT-4o on complex benchmarks like Aider-Polyglot with performance increment of 44% from their base model.
- No loss of generalizibility, due to our new finetuning method **SeleKT**
- **Long-context Support** up to 32K tokens.
**This repo contains the NextCoder-7B model**, which has the following features:
- Type: Causal Language Models
- Training Stage: Post-training with SeleKT
- Architecture: transformers with RoPE, SwiGLU, RMSNorm, and Attention QKV bias
- Number of Parameters: 7.61B
- Number of Paramaters (Non-Embedding): 6.53B
- Number of Layers: 28
- Number of Attention Heads (GQA): 28 for Q and 4 for KV
For more details, please refer to our [blog](), [GitHub](https://github.com/microsoft/NextCoder), [Paper](https://www.microsoft.com/en-us/research/publication/nextcoder-robust-adaptation-of-code-lms-to-diverse-code-edits/).
## Requirements
The code of NextCoder is based on Qwen2.5 base models which has been in the latest Hugging face `transformers` and we advise you to use the latest version of `transformers`.
With `transformers<4.37.0`, you will encounter the following error:
```
KeyError: 'qwen2'
```
## Quickstart
Here provides a code snippet with `apply_chat_template` to show you how to load the tokenizer and model and how to generate contents.
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "microsoft/NextCoder-7B"
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype="auto",
device_map="auto",
)
tokenizer = AutoTokenizer.from_pretrained(model_name)
prompt = """
Fix the following function that divides two numbers to handle all the edge cases:
def divide(a, b)
returm a/b
"""
messages = [
{"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
generated_ids = model.generate(
**model_inputs,
max_new_tokens=1024
)
generated_ids = [
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
]
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
```
## Evaluation and Performance
| Models | HUMANEVALFIX | CANITEDIT | AIDER | POLYGLOT |
|--------|---------------|-----------|-------|----------|
| QwenCoder-2.5-3B | 73.2 | 37.1 | 36.8 | - |
| QwenCoder-2.5-3B-LoRA | 64.6 | 36.2 | 35.8 | - |
| QwenCoder-2.5-3B-SFT | 76.2 | 32.4 | 30.1 | - |
| **NextCoder-3B** | 75.6 | 42.4 | 37.6 | - |
| QwenCoder-2.5-7B | 73.8 | 48.1 | 59.4 | - |
| QwenCoder-2.5-7B-LoRA | 70.7 | 44.3 | 40.6 | - |
| QwenCoder-2.5-7B-SFT | 70.1 | 36.7 | 48.9 | - |
| **NextCoder-7B** | 81.1 | 50.5 | 65.7 | - |
| QwenCoder-2.5-14B | 87.8 | 58.1 | 66.9 | 9.3 |
| QwenCoder-2.5-14B-LoRA | 78.0 | 50.9 | 66.2 | 5.3 |
| QwenCoder-2.5-14B-SFT | 79.9 | 42.4 | 36.8 | 3.1 |
| **NextCoder-14B** | 89.8 | 60.2 | 72.2 | 12.2 |
| QwenCoder-2.5-32B | **90.2** | 61.0 | 72.9 | 16.4 |
| QwenCoder-2.5-32B-LoRA | 82.3 | 52.4 | 60.2 | 6.7 |
| QwenCoder-2.5-32B-SFT | 81.7 | 49.5 | 66.9 | 8.4 |
| **NextCoder-32B** | 88.9 | **62.4** | **74.7** | **23.6** |
*Comparison of base QwenCoder-2.5 models of different sizes and their SELEKT-enhanced versions across three code editing benchmarks.*
**Detailed evaluation results are reported in this [📑 paper](https://www.microsoft.com/en-us/research/publication/nextcoder-robust-adaptation-of-code-lms-to-diverse-code-edits/).**
## Responsible AI Use
The base models (from the QwenCoder-2.5 family) are suspectible to malicious prompts and may generate or execute harmful code. Our finetuning does not enhance or impede such behaviors. The users should use the models and their outputs responsibly and with caution. Model outputs should be subjected to additional analysis, including manual inspection, and sandboxing before execution.
## Citation
```bibtex
@inproceedings{aggarwal2025nextcoder,
author = {Aggarwal, Tushar and Singh, Swayam and Awasthi, Abhijeet and Kanade, Aditya and Natarajan, Nagarajan},
title = {NextCoder: Robust Adaptation of Code LMs to Diverse Code Edits},
booktitle = {International Conference on Machine Learning},
year = {2025},
url = {https://www.microsoft.com/en-us/research/publication/nextcoder-robust-adaptation-of-code-lms-to-diverse-code-edits/},
}
```