This repository contains the implementation of CoLT in our papers, a novel fine-tuning approach for enhancing large language models' ability to utilize information within long contexts for code completion tasks.
Resources
Dataset
CoLT-132K dataset
: A large-scale repo-level code completion dataset comprising 132,000 samples across four programming languages.
SFT (Supervised Fine-Tuning)
: See scripts in
aiXcoder-colt/commands/sft/
DPO (Direct Preference Optimization)
: See scripts in
aiXcoder-colt/commands/po/
3. Reject Sampling for DPO
The
aiXcoder-colt/Reject_Sample/
directory contains implementation and evaluation scripts for our reject sampling approach used in Direct Preference Optimization:
Model-specific implementations
:
aixcoder/
: Reject sampling for aiXcoder model
codellama/
: Reject sampling for Code Llama model
deepseek/
: Reject sampling for DeepSeek-Coder model
Evaluation scripts
:
eval_api.py
: API-based evaluation script
eval_line.py
: Line-level evaluation script
eval_span.py
: Span-level evaluation script
inference.py
: Model inference script for generating completions
Dependencies
In our experiments, we utilized two Docker environments for TRL training and vLLM (reject sampling). Below are the key dependencies for each environment, excluding redundant packages:
TRL Training Environment:
transformers==4.46.0.dev0
torch==2.4.0a0+07cecf4168.nv24.5
accelerate==1.0.0
deepspeed==0.15.2
peft==0.13.1
flash-attn==2.4.2
datasets==3.0.1
wandb==0.15.0
vLLM Inference Environment:
vllm==0.6.0+cu124
torch==2.4.0
transformers==4.44.2
vllm-flash-attn==2.6.1
xformers==0.0.27.post2
flashinfer==0.1.6+cu121torch2.4
fastapi==0.114.1
uvicorn==0.30.6
Complete dependency lists can be found in the
dependency
directory.
Runs of aiXcoder aixcoder-7b-v2-sft on huggingface.co
15
Total runs
-1
24-hour runs
-1
3-day runs
2
7-day runs
6
30-day runs
More Information About aixcoder-7b-v2-sft huggingface.co Model
aixcoder-7b-v2-sft huggingface.co
aixcoder-7b-v2-sft huggingface.co is an AI model on huggingface.co that provides aixcoder-7b-v2-sft's model effect (), which can be used instantly with this aiXcoder aixcoder-7b-v2-sft model. huggingface.co supports a free trial of the aixcoder-7b-v2-sft model, and also provides paid use of the aixcoder-7b-v2-sft. Support call aixcoder-7b-v2-sft model through api, including Node.js, Python, http.
aixcoder-7b-v2-sft huggingface.co is an online trial and call api platform, which integrates aixcoder-7b-v2-sft's modeling effects, including api services, and provides a free online trial of aixcoder-7b-v2-sft, you can try aixcoder-7b-v2-sft online for free by clicking the link below.
aiXcoder aixcoder-7b-v2-sft online free url in huggingface.co:
aixcoder-7b-v2-sft is an open source model from GitHub that offers a free installation service, and any user can find aixcoder-7b-v2-sft on GitHub to install. At the same time, huggingface.co provides the effect of aixcoder-7b-v2-sft install, users can directly use aixcoder-7b-v2-sft installed effect in huggingface.co for debugging and trial. It also supports api for free installation.