JustinLin610's picture
update intro and quickstart
9e3eb1b verified
|
raw
history blame
3.73 kB
metadata
language:
  - en
pipeline_tag: text-generation

CodeQwen1.5-7B-OpenDevin

Introduction

CodeQwen1.5-7B-OpenDevin is a code-specific model targeting on OpenDevin Agent tasks. The model is finetuned from CodeQwen1.5-7B, the code-specific large language model based on Qwen1.5 pretrained on large-scale code data. CodeQwen1.5-7B is strongly capable of understanding and generating codes, and it supports the context length of 65,536 tokens (for more information about CodeQwen1.5, please refer to the blog post and GitHub repo). The finetuned model, CodeQwen1.5-7B-OpenDevin, shares similar features, while it is designed for rapid development, debugging, and iteration.

Performance

We evaluate CodeQwen1.5-7B-OpenDevin on SWE-Bench-Lite by implementing the model on OpenDevin CodeAct 1.3 and follow the OpenDevin evaluation pipeline. CodeQwen1.5-7B-OpenDevin successfully solves 4 problems by commmiting pull requests targeting on the issues.

Requirements

The code of Qwen1.5 has been in the latest Hugging face transformers and we advise you to install transformers>=4.37.0, or you might encounter the following error:

KeyError: 'qwen2'.

Quickstart

To use local models to run OpenDevin, we advise you to deploy CodeQwen1.5-7B-OpenDevin on a GPU device and access it through OpenAI API

python -m vllm.entrypoints.openai.api_server --model OpenDevin/CodeQwen1.5-7B-OpenDevin --dtype auto --api-key token-abc123

For more details, please refer to the official documentation of vLLM for OpenAI Compatible server.

After the deployment, following the guidance of OpenDevin and run the following command to set up environment variables:

# The directory you want OpenDevin to work with. MUST be an absolute path!
export WORKSPACE_BASE=$(pwd)/workspace;
export LLM_API_KEY=token-abc123;
export LLM_MODEL=OpenDevin/CodeQwen1.5-7B-OpenDevin;
export LLM_BASE_URL=http://localhost:8000/v1;

and run the docker command:

docker run \
    -it \
    --pull=always \
    -e SANDBOX_USER_ID=$(id -u) \
    -e LLM_BASE_URL=$LLM_BASE_URL \
    -e LLM_API_KEY=$LLM_API_KEY \
    -e LLM_MODEL=$LLM_MODEL \
    -e WORKSPACE_MOUNT_PATH=$WORKSPACE_BASE \
    -v $WORKSPACE_BASE:/opt/workspace_base \
    -v /var/run/docker.sock:/var/run/docker.sock \
    -p 3000:3000 \
    --add-host host.docker.internal:host-gateway \
    ghcr.io/opendevin/opendevin:0.5

Now you should be able to connect http://localhost:3000/. Set up the configuration at the frontend by clicking the button at the bottom right, and input the right model name and api key. Then, you can enjoy playing with OpenDevin based on CodeQwen1.5-7B-OpenDevin!

Citation

@article{qwen,
  title={Qwen Technical Report},
  author={Jinze Bai and Shuai Bai and Yunfei Chu and Zeyu Cui and Kai Dang and Xiaodong Deng and Yang Fan and Wenbin Ge and Yu Han and Fei Huang and Binyuan Hui and Luo Ji and Mei Li and Junyang Lin and Runji Lin and Dayiheng Liu and Gao Liu and Chengqiang Lu and Keming Lu and Jianxin Ma and Rui Men and Xingzhang Ren and Xuancheng Ren and Chuanqi Tan and Sinan Tan and Jianhong Tu and Peng Wang and Shijie Wang and Wei Wang and Shengguang Wu and Benfeng Xu and Jin Xu and An Yang and Hao Yang and Jian Yang and Shusheng Yang and Yang Yao and Bowen Yu and Hongyi Yuan and Zheng Yuan and Jianwei Zhang and Xingxuan Zhang and Yichang Zhang and Zhenru Zhang and Chang Zhou and Jingren Zhou and Xiaohuan Zhou and Tianhang Zhu},
  journal={arXiv preprint arXiv:2309.16609},
  year={2023}
}