Instructions to use czlll/Qwen2.5-Coder-32B-CL with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use czlll/Qwen2.5-Coder-32B-CL with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="czlll/Qwen2.5-Coder-32B-CL") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("czlll/Qwen2.5-Coder-32B-CL") model = AutoModelForCausalLM.from_pretrained("czlll/Qwen2.5-Coder-32B-CL") 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 Settings
- vLLM
How to use czlll/Qwen2.5-Coder-32B-CL with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "czlll/Qwen2.5-Coder-32B-CL" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "czlll/Qwen2.5-Coder-32B-CL", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/czlll/Qwen2.5-Coder-32B-CL
- SGLang
How to use czlll/Qwen2.5-Coder-32B-CL 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 "czlll/Qwen2.5-Coder-32B-CL" \ --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": "czlll/Qwen2.5-Coder-32B-CL", "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 "czlll/Qwen2.5-Coder-32B-CL" \ --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": "czlll/Qwen2.5-Coder-32B-CL", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio
How to use czlll/Qwen2.5-Coder-32B-CL with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for czlll/Qwen2.5-Coder-32B-CL to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for czlll/Qwen2.5-Coder-32B-CL to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for czlll/Qwen2.5-Coder-32B-CL to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="czlll/Qwen2.5-Coder-32B-CL", max_seq_length=2048, ) - Docker Model Runner
How to use czlll/Qwen2.5-Coder-32B-CL with Docker Model Runner:
docker model run hf.co/czlll/Qwen2.5-Coder-32B-CL
Model Card for LocAgent
This model is described in the paper LocAgent: Graph-Guided LLM Agents for Code Localization. LocAgent uses a graph-based code representation to enable LLMs to perform accurate code localization, significantly improving accuracy compared to existing methods. Notably, the fine-tuned Qwen-2.5-Coder-Instruct-32B model achieves near state-of-the-art performance with a substantial cost reduction.
Code: https://github.com/gersteinlab/LocAgent
How to Use
LocAgent involves two main steps: graph indexing and code localization.
1. Graph Indexing (Optional but Recommended): For efficient batch processing, pre-generate graph indexes for your codebase using dependency_graph/batch_build_graph.py. This script parses the codebase into a graph representation. See the Github README for detailed command-line arguments and setup instructions. Example:
python dependency_graph/batch_build_graph.py \
--dataset 'czlll/Loc-Bench' \
--split 'test' \
--num_processes 50 \
--download_repo
2. Code Localization: Use auto_search_main.py to perform code localization. This script leverages LLMs to search and locate relevant code entities within the pre-generated graph indexes. See the Github README for detailed command-line arguments and environment variable setup. Example:
python auto_search_main.py \
--dataset 'czlll/SWE-bench_Lite' \
--split 'test' \
--model 'azure/gpt-4o' \
--localize \
--merge \
--output_folder $result_path/location \
--eval_n_limit 300 \
--num_processes 50 \
--use_function_calling \
--simple_desc
3. Evaluation: After localization, evaluate the results using evaluation.eval_metric.evaluate_results. An example Jupyter Notebook is provided in evaluation/run_evaluation.ipynb.
Citation
@article{chen2025locagent,
title={LocAgent: Graph-Guided LLM Agents for Code Localization},
author={Chen, Zhaoling and Tang, Xiangru and Deng, Gangda and Wu, Fang and Wu, Jialong and Jiang, Zhiwei and Prasanna, Viktor and Cohan, Arman and Wang, Xingyao},
journal={arXiv preprint arXiv:2503.09089},
year={2025}
}
- Downloads last month
- 6