Text Generation
Transformers
PyTorch
Safetensors
English
qwen2
conversational
text-generation-inference
Instructions to use OpenHandsCommunity/CodeQwen1.5-7B-OpenDevin with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OpenHandsCommunity/CodeQwen1.5-7B-OpenDevin with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="OpenHandsCommunity/CodeQwen1.5-7B-OpenDevin") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("OpenHandsCommunity/CodeQwen1.5-7B-OpenDevin") model = AutoModelForCausalLM.from_pretrained("OpenHandsCommunity/CodeQwen1.5-7B-OpenDevin") 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use OpenHandsCommunity/CodeQwen1.5-7B-OpenDevin with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "OpenHandsCommunity/CodeQwen1.5-7B-OpenDevin" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OpenHandsCommunity/CodeQwen1.5-7B-OpenDevin", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/OpenHandsCommunity/CodeQwen1.5-7B-OpenDevin
- SGLang
How to use OpenHandsCommunity/CodeQwen1.5-7B-OpenDevin 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 "OpenHandsCommunity/CodeQwen1.5-7B-OpenDevin" \ --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": "OpenHandsCommunity/CodeQwen1.5-7B-OpenDevin", "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 "OpenHandsCommunity/CodeQwen1.5-7B-OpenDevin" \ --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": "OpenHandsCommunity/CodeQwen1.5-7B-OpenDevin", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use OpenHandsCommunity/CodeQwen1.5-7B-OpenDevin with Docker Model Runner:
docker model run hf.co/OpenHandsCommunity/CodeQwen1.5-7B-OpenDevin
Update README.md
Browse files
README.md
CHANGED
|
@@ -8,9 +8,11 @@ It is an open model designed for rapid development, debugging, and iteration.
|
|
| 8 |
## Citation
|
| 9 |
If you find our work helpful, feel free to give us a cite.
|
| 10 |
|
|
|
|
| 11 |
@article{qwen,
|
| 12 |
title={Qwen Technical Report},
|
| 13 |
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},
|
| 14 |
journal={arXiv preprint arXiv:2309.16609},
|
| 15 |
year={2023}
|
| 16 |
-
}
|
|
|
|
|
|
| 8 |
## Citation
|
| 9 |
If you find our work helpful, feel free to give us a cite.
|
| 10 |
|
| 11 |
+
```
|
| 12 |
@article{qwen,
|
| 13 |
title={Qwen Technical Report},
|
| 14 |
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},
|
| 15 |
journal={arXiv preprint arXiv:2309.16609},
|
| 16 |
year={2023}
|
| 17 |
+
}
|
| 18 |
+
```
|