شعار Vllm Xpu Profile

Vllm Xpu Profile

مؤسسة
intel
vllm-xpu-profile

Profile a running vLLM-XPU server with torch.profiler around a window of real requests, either via /start_profile and /stop_profile HTTP endpoints or via vllm bench --profile for offline runs. Use to find the dominant op under real concurrent traffic. Not for pure PyTorch (use torch-xpu-profile), SYCL kernel-level signal (use xpu-profile-unitrace), throughput numbers (use vllm-xpu-bench), or non-vLLM servers.

نظرة عامة

الناشرintel
المستودعskills
اسم المهارةvllm-xpu-profile
النجوم
31
التفريعات
14
الملفات المرفقة
تعليمات فقط
الترخيصApache-2.0
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • مكتفية بذاتها

    كل ما يحتاجه النموذج موجود في التعليمات — لا ملفات إضافية لمزامنتها.

  • مفتوحة المصدر

    نشرها intel على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Vllm Xpu Profile في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/intel/skills/tree/main/skills/vllm-xpu-profile
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/intel/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/vllm-xpu-profile .claude/skills/vllm-xpu-profile
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Vllm Xpu Profile في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة Vllm Xpu Profile تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Vllm Xpu Profile بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

vllm-xpu-profile

Profile a vLLM-XPU server with torch.profiler to see scheduler, KV manager, attention backend, and batching alongside XPU op timeline. For pure-PyTorch traces use torch-xpu-profile; for SYCL kernel level use xpu-profile-unitrace.

Modes

ModeWhen
A — running server + HTTP /start_profile ... /stop_profileReal-traffic capture; see scheduler / KV manager / batching behaviour.
B — vllm bench latency / throughput --profileOffline; no network endpoint needed.

Mode A — server + HTTP bracket

Launch the server with profiler flags. Always launch from the official upstream vllm/vllm-openai-xpu:latest image — even if a running container or host process is using a different image (e.g. intel/llm-scaler-vllm), do not reuse that image for the profiling server; those stacks are out of scope (see What this skill does NOT cover).

sh
docker run -d --name vllm-xpu-prof \
    --device /dev/dri \
    -v /dev/dri/by-path:/dev/dri/by-path:ro \
    --group-add "$(getent group render | cut -d: -f3)" \
    --ipc=host \
    -e ZE_AFFINITY_MASK=0 \
    -e VLLM_WORKER_MULTIPROC_METHOD=spawn \
   -e HTTP_PROXY -e HTTPS_PROXY -e NO_PROXY \
   -e http_proxy -e https_proxy -e no_proxy \
   -e HF_TOKEN \
    -v "$HOME/.cache/huggingface:/root/.cache/huggingface" \
    -v "$PWD/traces:/work/traces" \
    -p 8000:8000 \
   vllm/vllm-openai-xpu:latest \
   Qwen/Qwen2.5-1.5B-Instruct \
        --dtype bfloat16 --max-model-len 4096 \
        --profiler-config.profiler=torch \
        --profiler-config.torch_profiler_dir=/work/traces

Wait for Application startup complete, then bracket your window:

sh
# Warmup (don't profile this) — kernel cache hot
for i in 1 2 3; do
    curl -s http://localhost:8000/v1/chat/completions \
        -H 'Content-Type: application/json' \
        -d '{"model":"Qwen/Qwen2.5-1.5B-Instruct",
             "messages":[{"role":"user","content":"hi"}],"max_tokens":32}' >/dev/null
done

curl -X POST http://localhost:8000/start_profile

# Workload to characterise
for i in $(seq 1 8); do
    curl -s http://localhost:8000/v1/chat/completions \
        -H 'Content-Type: application/json' \
        -d '{"model":"Qwen/Qwen2.5-1.5B-Instruct",
             "messages":[{"role":"user","content":"Write a short paragraph."}],
             "max_tokens":128}' &
done; wait

curl -X POST http://localhost:8000/stop_profile
ls traces/

Qwen/Qwen2.5-1.5B-Instruct is public, so HF_TOKEN is optional; it is forwarded for gated/private replacements and anonymous Hub rate limits. -e HF_TOKEN (no =value) passes through the host's already-exported variable without putting the token in the docker process argv, where ps//proc on a shared host could expose it. The proxy lines are required on hosts whose containers cannot reach the Hub directly. Docker ignores unset proxy variable names.

Cleanup after the trace has flushed:

sh
docker stop vllm-xpu-prof && docker rm vllm-xpu-prof

Three artifacts written per profile (allow a few seconds for flush):

  • <timestamp>-rank-<N>.<timestamp>.pt.trace.json.gz — per-worker Chrome trace. Drag-and-drop into https://ui.perfetto.dev; Perfetto handles .json.gz directly.

  • <container>_<N>.async_llm.<timestamp>.pt.trace.json.gz — async engine trace (smaller).

  • profiler_out_<N>.txt — read this first, sort-by-XPU-time table of top kernels. Most "what's slow" questions are answered by its top 5 rows:

    Name                     Self XPU %  XPU total   # of Calls
    gemm_kernel              28.50%      26.232ms    4753
    aten::mm                 21.79%      20.061ms    3577
    _C::fused_add_rms_norm   14.11%      12.988ms    2352
    _vllm_fa2_C::varlen_fwd   6.70%      17.979ms    1176
    _C::rotary_embedding      6.70%       6.172ms    1176
    Memcpy H2D                2.11%       1.945ms     412

Mode B — offline bench with --profile

sh
docker run --rm \
   --entrypoint vllm \
    --device /dev/dri \
    -v /dev/dri/by-path:/dev/dri/by-path:ro \
    --group-add "$(getent group render | cut -d: -f3)" \
    --ipc=host \
    -e ZE_AFFINITY_MASK=0 \
   -e HTTP_PROXY -e HTTPS_PROXY -e NO_PROXY \
   -e http_proxy -e https_proxy -e no_proxy \
   -e HF_TOKEN \
    -v "$HOME/.cache/huggingface:/root/.cache/huggingface" \
    -v "$PWD/traces:/work/traces" \
   vllm/vllm-openai-xpu:latest \
   bench latency \
        --model Qwen/Qwen2.5-1.5B-Instruct \
        --dtype bfloat16 \
        --num-iters-warmup 2 --num-iters 5 \
        --profile \
        --profiler-config.profiler=torch \
        --profiler-config.torch_profiler_dir=/work/traces

What to look for

  1. Step boundary markers — EngineCore.step spans. Time per step / batch size = TPOT contribution per request.
  2. Attention path — confirm kernel name matches your --attention-backend. If you passed TRITON_ATTN but trace shows flash_attention_xpu, confirm the flag reached the engine:
    sh
    docker logs <name> 2>&1 | grep -E "attention_backend|Using.*backend"
  3. Gaps between steps — wide white bands at boundaries mean scheduler / KV manager is on the critical path. Expected to be tight on v0.31.0+, where XPU graphs capture by default; wide bands there are a real finding. They are normal under --enforce-eager, so check whether the server was launched with it before chasing them. Profile the configuration you actually serve — adding eager just to get a cleaner trace changes the thing you are measuring, though it is a legitimate second run when you need per-kernel granularity that graph capture collapses.
  4. Quant kernel names — for --quantization fp8 expect fp8_gemm_w8a16; for awq expect int4_gemm_w4a8. Seeing int4_gemm_w4a16 with AWQ -> silent fall-through (vLLM #38064).
  5. Per-rank spans — multi-GPU -tp N shows N timelines. Skew between ranks means a slow rank is gating throughput.

Common errors

  • torch_profiler_dir is only applicable when profiler is set to 'torch' -> add --profiler-config.profiler=torch.
  • /start_profile 404 -> server launched without profiler-config flags; restart.
  • Empty trace -> too few requests inside the bracket; send 5–10+.
  • Trace doesn't appear after /stop_profile -> flush is async; wait a few seconds, or check server logs.

Env vars

VariablePurpose
ZE_AFFINITY_MASKPin to one XPU.
PYTORCH_ENABLE_XPU_FALLBACK=0Error on CPU-fallback so it can't hide.
KINETO_LOG_LEVEL=INFODiagnose incomplete trace export.

(vLLM profiler config is via CLI flags --profiler-config.*, not env vars.)

What this skill does NOT cover

  • Pure-PyTorch profiling (no server) -> torch-xpu-profile.
  • SYCL-kernel events / hardware metrics -> xpu-profile-unitrace.
  • Fixing a hot kernel — out of scope.
  • intel/llm-scaler-vllm images — out of scope; launch the profiling server from upstream vllm/vllm-openai-xpu:latest instead.

References

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي Vllm Xpu Profile؟

Profile a running vLLM-XPU server with torch.profiler around a window of real requests, either via /start_profile and /stop_profile HTTP endpoints or via vllm bench --profile for offline runs. Use to find the dominant op under real concurrent traffic. Not for pure PyTorch (use torch-xpu-profile), SYCL kernel-level signal (use xpu-profile-unitrace), throughput numbers (use vllm-xpu-bench), or non-vLLM servers.

لماذا تستخدم Vllm Xpu Profile على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Vllm Xpu Profile عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Vllm Xpu Profile في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/intel/skills/tree/main/skills/vllm-xpu-profile. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Vllm Xpu Profile؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Vllm Xpu Profile؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Vllm Xpu Profile معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Vllm Xpu Profile مجانية؟

نعم. نشرها intel على GitHub بموجب ترخيص Apache-2.0. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇