---
title: Lingma-SWE-GPT-v20240925
canonical_url: "https://www.modelscope.cn/models/yingwei/Lingma-SWE-GPT-v20240925"
md_url: "https://www.modelscope.cn/models/yingwei/Lingma-SWE-GPT-v20240925.md"
repository: yingwei/Lingma-SWE-GPT-v20240925
chinese_name: "通义灵码软件工程大模型"
last_updated: 2024-10-02
pipeline_tag: text-generation
tasks:
  - text-generation
model_type:
  - qwen2
architectures:
  - Qwen2ForCausalLM
parameters: 72.7B
tensor_type:
  - BF16
library_name:
  - safetensors
inference_backends:
  - "deploy_task text/emb"
  - "lmdeploy 0.9.1"
  - "lmdeploy_turbomind 0.9.1"
  - "sglang 0.5.2"
  - "vllm 0.9.2"
downloads: 96
stars: 1
---

# Lingma-SWE-GPT-v20240925

> Lingma-SWE-GPT-v20240925 - yingwei 在 ModelScope 开源的模型。Lingma SWE-GPT (通义灵码软件工程大模型)：面向自动软件工程的大语言模型。通义灵码软件工程大模型是一个专为软件工程任务设计的开源大型语言模型。在 Qwen 系列基础模型的基础上，Lingma SWE-GPT 使用软件工程开发过程数据进行了额外训练，以增强其解决复杂软件工程任务的能力。在权威的 SWE-bench Verified 软件工程智能代理排行榜上实现了 29.20%…

yingwei/Lingma-SWE-GPT-v20240925 是 ModelScope 魔搭社区上的 72.7B 参数text-generation模型，可用 deploy_task text/emb、lmdeploy 0.9.1、lmdeploy_turbomind 0.9.1 部署。

- **Repository**: yingwei/Lingma-SWE-GPT-v20240925
- **Tasks**: text-generation
- **Parameters**: 72.7B
- **Inference backends**: deploy_task text/emb, lmdeploy 0.9.1, lmdeploy_turbomind 0.9.1, sglang 0.5.2, vllm 0.9.2
- **Downloads**: 96
- **Stars**: 1
- **Last updated**: 2024-10-02

Source: https://www.modelscope.cn/models/yingwei/Lingma-SWE-GPT-v20240925

---

# Lingma SWE-GPT: Software Engineering Large Language Model

## Overview

Lingma SWE-GPT is an open-source large language model specifically designed for software engineering tasks. Built upon the foundation of the Qwen series base models, Lingma SWE-GPT has undergone additional training using software engineering development process data to enhance its capabilities in solving complex software engineering tasks.

## Model Introduction

Lingma SWE-GPT is a specialized model that focuses on addressing the unique challenges faced in software engineering. By leveraging the robust capabilities of the Qwen base models and incorporating domain-specific knowledge, this model aims to provide intelligent assistance across various aspects of software development.


## Model Performance

Lingma SWE-GPT v20240925 has demonstrated impressive performance in software engineering tasks:

- Achieved a **29.20% solution rate on the authoritative SWE-bench Verified** leaderboard for software engineering intelligent agents.
- Outperforms other open-source models of similar scale in software engineering-specific tasks.

## How to use

### Quick Start
```
from modelscope import AutoModelForCausalLM, AutoTokenizer

model_name = "yingwei/Lingma-SWE-GPT-v20240925"

model = AutoModelForCausalLM.from_pretrained(
    model_name,
    torch_dtype="auto",
    device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained(model_name)

prompt = "Give me a short introduction to large language model."
messages = [
    {"role": "system", "content": "You are Lingma, created by Tongyi Lingma team. You are a helpful assistant."},
    {"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=512
)
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]
print(response)
```

**We will open our supporting Agent framework on Github in the next few days.**

https://github.com/RepoUnderstander/RepoUnderstander


## TODO
Currently only Python is supported. In future updates, we will provide more support for Java, JS/TS and other languages.

## License

This project is licensed under the GNU General Public License v2.0 (GPL-2.0).

## Contact

For any questions or feedback regarding Lingma SWE-GPT, please contact:

mayingwei.myw@alibaba-inc.com

## Acknowledgments

We would like to thank the Qwen team for their foundational work, which has been instrumental in the development of Lingma SWE-GPT.

## Citation
```
@article{ma2024understand,
  title={How to Understand Whole Software Repository?},
  author={Ma, Yingwei and Yang, Qingping and Cao, Rongyu and Li, Binhua and Huang, Fei and Li, Yongbin},
  journal={arXiv preprint arXiv:2406.01422},
  year={2024}
}
```
