Instructions to use czlll/Qwen2.5-Coder-7B-CL with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use czlll/Qwen2.5-Coder-7B-CL with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="czlll/Qwen2.5-Coder-7B-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-7B-CL") model = AutoModelForCausalLM.from_pretrained("czlll/Qwen2.5-Coder-7B-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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use czlll/Qwen2.5-Coder-7B-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-7B-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-7B-CL", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/czlll/Qwen2.5-Coder-7B-CL
- SGLang
How to use czlll/Qwen2.5-Coder-7B-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-7B-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-7B-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-7B-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-7B-CL", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio new
How to use czlll/Qwen2.5-Coder-7B-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-7B-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-7B-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-7B-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-7B-CL", max_seq_length=2048, ) - Docker Model Runner
How to use czlll/Qwen2.5-Coder-7B-CL with Docker Model Runner:
docker model run hf.co/czlll/Qwen2.5-Coder-7B-CL
Model Card for LocAgent - Qwen2.5-Coder-Instruct-32B
This model is a fine-tuned version of Qwen-2.5-Coder-Instruct-32B designed for code localization, as described in the paper LocAgent: Graph-Guided LLM Agents for Code Localization. LocAgent leverages graph-based code representation to enhance the accuracy of identifying code sections relevant to natural language problem descriptions.
Model Details
Model Description
LocAgent uses a graph-based representation of codebases (files, classes, functions, and their dependencies) to enable efficient code localization. This allows LLMs to reason across hierarchical structures and dependencies to identify relevant code sections for changes.
- Developed by: The Gerstein Lab
- Model type: Code LLM
- Language(s) (NLP): English (primarily, depending on the codebase)
- License: MIT (Please verify in repository LICENSE file)
- Finetuned from model: Qwen-2.5-Coder-Instruct-32B
Model Sources
- Repository: https://huggingface.co/czlll/Qwen2.5-Coder-32B-CL
- Paper: https://huggingface.co/papers/2503.09089
- Code: https://github.com/gersteinlab/LocAgent
Uses
Direct Use
LocAgent can be used directly to identify relevant code sections within a codebase given a natural language description of the problem. The model requires a graph representation of the codebase as input.
Downstream Use
The fine-tuned LocAgent model can be integrated into IDEs or other software development tools to assist developers in code localization tasks.
Bias, Risks, and Limitations
LocAgent's performance is dependent on the quality of the codebase's graph representation. Inaccurate or incomplete graphs can lead to inaccurate localization. The model's performance may also vary depending on the complexity and size of the codebase and the clarity of the natural language description. Further, the model inherits biases present in the training data.
Recommendations
Carefully construct the codebase graph representation. Provide clear and concise natural language descriptions of the problem. Be aware of potential biases in the model's output.
How to Get Started with the Model
The following code snippet demonstrates how to use the LocAgent model (replace placeholders with actual paths and adapt for specific model size):
# Requires installation of necessary libraries (see Setup section in README)
from transformers import AutoTokenizer, AutoModelForCausalLM # Assuming Transformers compatibility
model_id = "czlll/Qwen2.5-Coder-7B-CL" # Replace with the actual model ID, e.g., "czlll/Qwen2.5-Coder-32B-CL"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id)
# ... (Code to load codebase graph and formulate prompt based on natural language description) ...
inputs = tokenizer(prompt, return_tensors="pt") # Replace 'prompt' with your formatted prompt
outputs = model.generate(**inputs)
# ... (Code to process model output and identify relevant code sections) ...
Training Details
This section would be populated with details from the training procedure described in the paper and the Github README. It would include information about the datasets, preprocessing steps, hyperparameters, and training infrastructure.
Evaluation
Testing Data, Factors & Metrics
This section would describe the evaluation datasets used (like Loc-Bench), factors considered (e.g., codebase size, problem complexity), and evaluation metrics (accuracy, Pass@10).
Results
This section would detail the results obtained on the Loc-Bench benchmark, comparing LocAgent's performance with other state-of-the-art models (as described in the paper).
Citation
BibTeX:
@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}
}
APA:
Chen, Z., Tang, X., Deng, G., Wu, F., Wu, J., Jiang, Z., Prasanna, V., Cohan, A., & Wang, X. (2025). LocAgent: Graph-Guided LLM Agents for Code Localization. arXiv preprint arXiv:2503.09089.
- Downloads last month
- 15