arkazhuo/compactionrl-agent-rl/generate-profile
Claude Code and agent skill by arkazhuo/compactionrl-agent-rl
- community
Checking that the SKILL.md file is still in the repository.
Generate an e2e profiling trace of an SGLang server run. Launches a server, validates accuracy, captures a Chrome-compatible trace, and returns the profile path.
Install
npx vskill@latest install arkazhuo/compactionrl-agent-rl/generate-profileSKILL.md
The same SKILL.md was published earlier as rh-runninghub/minimax-h3-multigpu-lightning/generate-profile.
Generate an E2E Profile of an SGLang Server Run
This skill launches an SGLang server, validates it with a quick accuracy test, generates a profiling trace, and returns the profile file path.
Prerequisites
- A working SGLang installation (
pip install -e .or equivalent) - At least one available CUDA GPU
Step-by-step Workflow
Step 1: Launch the server
- Default model:
Qwen/Qwen3-8B(good balance of speed and quality) - Default port:
30000 - The server runs in the background. Save the PID for cleanup.
- Use the GPU specified by the user's preferences (check memory files for GPU preferences).
Step 2: Wait for server readiness
Poll the health endpoint until the server is ready:
The server prints "The server is fired up and ready to roll!" to stdout when ready. The health endpoint returns 200 once the server can accept requests.
Typical startup time: 30-90 seconds depending on model size and whether CUDA graphs are being compiled.
Step 3: Validate accuracy (sanity check)
- Expected accuracy: > 0.8 for capable models (Qwen3-8B, Llama-3.1-8B-Instruct, etc.)
- This is a quick sanity check, not a rigorous benchmark.
sglang.test.few_shot_gsm8kis deprecated; use the unifiedrun_evalentrypoint.- If you intentionally need the old completion-style GSM8K path, add
--api completion. - If accuracy is unexpectedly low, something is wrong — do not proceed to profiling.
Step 4: Generate the profile
This command:
- Sends a request to the server
- Triggers the profiler for 5 steps (default)
- Generates a trace file under
/tmp/<timestamp>/ - The trace directory contains:
<timestamp>-TP-0.trace.json.gz— Chrome trace format (open inchrome://tracingor Perfetto)server_args.json— the server configuration used
Output format:
The profile path is printed to stdout. Parse it from the output.
Optional flags:
--profile-steps N— number of profiling steps (default: 5)--profile-by-stage— profile by stage (prefill/decode separately)--profile-prefix <path>— custom output prefix
Step 5: Kill the server
Wait a moment and verify no sglang processes remain:
Step 6: Report the profile path
Return the profile directory path (e.g., /tmp/1773999986.4769795) and list its contents so the user knows what files were generated.
Example Full Run
Customization
- Different port: Pass
--port <port>and use--host 127.0.0.1 --port <port>for test commands - Multi-GPU: Use
--tp <N>for tensor parallelism; trace files will be generated per TP rank - Longer profile: Use
--profile-steps 10for more steps in the trace - Stage profiling: Use
--profile-by-stageto separate prefill and decode phases
Viewing the Profile
Open the .trace.json.gz file in:
- Perfetto UI: https://ui.perfetto.dev/ (drag and drop the file)
- Chrome tracing:
chrome://tracing(load the file)
Both support the gzipped Chrome trace format natively.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingcompactionrl/AvaTrain/sglang/.claude/skills/generate-profile/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/arkazhuo/compactionrl-agent-rl/generate-profile)