FlagRelease Release Guide#
What is FlagRelease#
FlagRelease is an automated model evaluation and release pipeline that supports NVIDIA, Ascend, Metax, Hygon, and other GPU platforms for:
Model environment validation
Accuracy evaluation
Performance evaluation
Automatic release
Suitable for validation and release workflows after model adaptation is completed.
Environment Setup#
Operating System Requirements#
Operating System: Ubuntu 20.04+ or CentOS 7+ (Linux environment)
GPU Driver: GPU driver from the target vendor installed
Network: Access to Docker Hub, ModelScope, HuggingFace, GitHub
Docker Environment: Ensure Docker is installed and running
Model Recommendation: opus4.6
Install Node.js#
sudo apt remove libnode-dev nodejs
apt update
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
apt install -y nodejs
Install Claude Code#
npm install -g @anthropic-ai/claude-code
Configure Claude Code#
Edit:
~/.claude/settings.json
Fill in:
{
"env": {
"ANTHROPIC_BASE_URL": "<URL>",
"ANTHROPIC_AUTH_TOKEN": "<TOKEN>",
"ANTHROPIC_MODEL": "<MODEL>"
}
}
Get the Code#
git clone https://github.com/Lxiparer/FlagRelease.git
cd FlagRelease
Run the Pipeline#
Command Format#
bash prompts/run_pipeline.sh \
<IMAGE> \
<MODEL_NAME> \
<MODELSCOPE_TOKEN> \
<HF_TOKEN> \
<GITHUB_TOKEN> \
<HARBOR_USER> \
<HARBOR_PASSWORD> \
[--model-path PATH] \
[--flagrelease-token TOKEN]
Parameters to Modify#
Usually you only need to focus on these three items:
Image#
Select the corresponding image based on your hardware.
Platform |
Image |
|---|---|
NVIDIA (vLLM 0.20.2) |
|
Ascend (vLLM 0.13.0) |
|
Metax (vLLM 0.13.0) |
|
Hygon (vLLM 0.13.0) |
|
Iluvatar (vLLM 0.13.0) |
|
Moore Threads (vLLM 0.13.0) |
|
Model Name#
Must match the name on HuggingFace or ModelScope.
For example:
Qwen/Qwen2-7B-Instruct
HY/Hy-MT2-7B
meta-llama/Llama-3.1-8B
Model Path (Optional)#
If you already have the model locally:
--model-path /mnt/workspace/models/Qwen/Qwen2-7B-Instruct
If not specified, it will automatically search or download.
Running Examples#
bash prompts/run_pipeline.sh \
harbor.baai.ac.cn/flagrelease-public/nv_gems_tree:04081426 \
Qwen/Qwen2-7B-Instruct \
<MODELSCOPE_TOKEN> \
<HF_TOKEN> \
<GITHUB_TOKEN> \
<HARBOR_USER> \
<HARBOR_PASSWORD> \
<--model-path /mnt/workspace/models/Qwen/Qwen2-7B-Instruct>
Running in Background#
Recommended approach:
nohup bash prompts/run_pipeline.sh ... \
> pipeline.log 2>&1 &
View logs:
tail -f pipeline.log
View process:
ps -ef | grep run_pipeline
Evaluation Results#
After the pipeline completes, results are saved in:
/data/flagos-workspace/<MODEL_NAME>/
Directory structure:
results/ Evaluation results
traces/ Inference traces
logs/ Logs
config/ Configuration backup
FAQ#
Docker Cannot Connect#
Cannot connect to the Docker daemon
Start Docker:
sudo systemctl start docker
Model Download Failed#
Check:
Is the model name correct
Can the network access ModelScope/HuggingFace
Is
--model-pathspecified correctly
Claude Code Authentication Failed#
Check:
~/.claude/settings.json
Verify these settings:
ANTHROPIC_BASE_URL
ANTHROPIC_AUTH_TOKEN
ANTHROPIC_MODEL
Are configured correctly.
View Detailed Logs#
tail -f pipeline.log
Or:
tail -f /data/flagos-workspace/<MODEL_NAME>/logs/pipeline.log
Supported Platforms#
Platform |
Status |
|---|---|
NVIDIA |
✅ |
Ascend |
✅ |
Metax |
✅ |
Hygon |
✅ |
Iluvatar |
In Development |
Kunlunxin |
In Development |
Moore Threads |
In Development |