Text Generation
Transformers
Safetensors
English
qwen2
code
chat
microsoft
nextcoder
selekt
conversational
text-generation-inference
Instructions to use microsoft/NextCoder-14B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use microsoft/NextCoder-14B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="microsoft/NextCoder-14B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("microsoft/NextCoder-14B") model = AutoModelForCausalLM.from_pretrained("microsoft/NextCoder-14B") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use microsoft/NextCoder-14B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "microsoft/NextCoder-14B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "microsoft/NextCoder-14B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/microsoft/NextCoder-14B
- SGLang
How to use microsoft/NextCoder-14B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "microsoft/NextCoder-14B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "microsoft/NextCoder-14B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "microsoft/NextCoder-14B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "microsoft/NextCoder-14B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use microsoft/NextCoder-14B with Docker Model Runner:
docker model run hf.co/microsoft/NextCoder-14B
Update README.md
Browse files
README.md
CHANGED
|
@@ -97,12 +97,16 @@ response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
|
|
| 97 |
```
|
| 98 |
## Evaluation and Performance
|
| 99 |
|
| 100 |
-
| Models |
|
| 101 |
|--------|---------------|-----------|-------|----------|
|
| 102 |
| QwenCoder-2.5-3B | 73.2 | 37.1 | 36.8 | - |
|
| 103 |
| QwenCoder-2.5-3B-LoRA | 64.6 | 36.2 | 35.8 | - |
|
| 104 |
| QwenCoder-2.5-3B-SFT | 76.2 | 32.4 | 30.1 | - |
|
| 105 |
| **NextCoder-3B** | 75.6 | 42.4 | 37.6 | - |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 106 |
| QwenCoder-2.5-14B | 87.8 | 58.1 | 66.9 | 9.3 |
|
| 107 |
| QwenCoder-2.5-14B-LoRA | 78.0 | 50.9 | 66.2 | 5.3 |
|
| 108 |
| QwenCoder-2.5-14B-SFT | 79.9 | 42.4 | 36.8 | 3.1 |
|
|
@@ -119,13 +123,11 @@ response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
|
|
| 119 |
## Citation
|
| 120 |
|
| 121 |
```bibtex
|
| 122 |
-
@
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
primaryClass={cs.SE},
|
| 129 |
-
url={https://arxiv.org/abs/2503.03656},
|
| 130 |
}
|
| 131 |
```
|
|
|
|
| 97 |
```
|
| 98 |
## Evaluation and Performance
|
| 99 |
|
| 100 |
+
| Models | HUMANEVALFIX | CANITEDIT | AIDER | POLYGLOT |
|
| 101 |
|--------|---------------|-----------|-------|----------|
|
| 102 |
| QwenCoder-2.5-3B | 73.2 | 37.1 | 36.8 | - |
|
| 103 |
| QwenCoder-2.5-3B-LoRA | 64.6 | 36.2 | 35.8 | - |
|
| 104 |
| QwenCoder-2.5-3B-SFT | 76.2 | 32.4 | 30.1 | - |
|
| 105 |
| **NextCoder-3B** | 75.6 | 42.4 | 37.6 | - |
|
| 106 |
+
| QwenCoder-2.5-7B | 73.8 | 48.1 | 59.4 | - |
|
| 107 |
+
| QwenCoder-2.5-7B-LoRA | 70.7 | 44.3 | 40.6 | - |
|
| 108 |
+
| QwenCoder-2.5-7B-SFT | 70.1 | 36.7 | 48.9 | - |
|
| 109 |
+
| **NextCoder-7B** | 81.1 | 50.5 | 65.7 | - |
|
| 110 |
| QwenCoder-2.5-14B | 87.8 | 58.1 | 66.9 | 9.3 |
|
| 111 |
| QwenCoder-2.5-14B-LoRA | 78.0 | 50.9 | 66.2 | 5.3 |
|
| 112 |
| QwenCoder-2.5-14B-SFT | 79.9 | 42.4 | 36.8 | 3.1 |
|
|
|
|
| 123 |
## Citation
|
| 124 |
|
| 125 |
```bibtex
|
| 126 |
+
@inproceedings{aggarwal2025nextcoder,
|
| 127 |
+
author = {Aggarwal, Tushar and Singh, Swayam and Awasthi, Abhijeet and Kanade, Aditya and Natarajan, Nagarajan},
|
| 128 |
+
title = {NextCoder: Robust Adaptation of Code LMs to Diverse Code Edits},
|
| 129 |
+
booktitle = {International Conference on Machine Learning},
|
| 130 |
+
year = {2025},
|
| 131 |
+
url = {https://www.microsoft.com/en-us/research/publication/nextcoder-robust-adaptation-of-code-lms-to-diverse-code-edits/},
|
|
|
|
|
|
|
| 132 |
}
|
| 133 |
```
|