Logo Model Config Recommend

Model Config Recommend

Tổ chức
intel
model-config-recommend

Recommend how to configure vLLM-XPU for a Hugging Face decoder-only LLM on Intel Arc B-series GPUs: choose quantization, KV dtype, DP/TP layout, max concurrency, and max context using roofline math against published hardware specs. Use when the user asks "How should I configure vLLM?", requests the best vLLM configuration, or asks how to use one or multiple Arc cards. Must run recommend.py; predictions are physics-bounded ranges, not measured throughput. Use after xpu-discover and before vllm-xpu-run.

Tổng quan

Nhà phát hànhintel
Kho mãskills
Tên kỹ năngmodel-config-recommend
Sao
31
Bản fork
14
Tệp đi kèm
7
Giấy phépApache-2.0
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI là Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 7 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được intel công bố trên GitHub. Hãy đọc nội dung nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Model Config Recommend trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL thư mục kỹ năng bên dưới và xác nhận.
    https://github.com/intel/skills/tree/main/skills/model-config-recommend
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

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/model-config-recommend .claude/skills/model-config-recommend
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Model Config Recommend trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự tải Model Config Recommend ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên Model Config Recommend không bị giới hạn ở mô hình mà kỹ năng này được viết cho. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên kỹ năng chưa dùng không tốn chi phí.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

model-config-recommend

Status: experimental. Emits physics-bounded predictions, not measurements. Scoped to vLLM-XPU; for SGLang use model-can-it-fit + sglang-xpu-run + sglang-xpu-bench.

When to use

The user has chosen an HF decoder-only LLM and wants to know which vLLM-XPU config (quant, KV dtype, DP/TP, max concurrency, max context) to start with on Intel Arc B-series. Broad wording such as "How should I configure vLLM for this model on my Arc cards?" still activates this skill because it requires selecting layout and deployment parameters rather than merely launching a server. Skip when:

  • Exact throughput numbers required -> use vllm-xpu-bench.
  • VLM or diffusion model -> use model-can-it-fit.
  • Hardware not in data/hardware.json (other Intel families).
  • MoE expert parallelism or speculative-decoding speedup — both workload-specific; the skill flags them as bench-only.

Mandatory output contract (read first)

Every recommendation answer MUST do all three, even when the model fits on one GPU — there is no "it's small, skip this" exception:

  1. Run recommend.py this session against the user's actual model, device, context, and concurrency. Never answer from memory or from the "Worked example" numbers below.
  2. State the layout as the literal dp=N, tp=M token (e.g. dp=1, tp=1). Prose like "no TP needed" does not count.
  3. Reproduce the full docker run ... <model> ... launch block verbatim in a fenced code block. Never a flag table, a bare vllm serve line, or a "block above" pointer instead.

"Reporting the recommendation" below has the detail.

Three tiers

TierScriptWhat it does
1recommend.pyPulls config.json, applies roofline math against the spec table, emits candidates + launch line. Stdlib only, no GPU. ~2s.
2calibrate.pyRuns a short BF16 bench on a reference model (Qwen/Qwen2.5-1.5B-Instruct by default), measures actual MFU/BWE, caches per (image, device). Requires Docker.
3verify.pyLaunches the recommended config on the target model, prints predicted-vs-measured with IN BAND / OUT OF BAND flags.
sh
# Tier 1
python3 scripts/recommend.py \
    --model Qwen/Qwen2.5-7B-Instruct \
    --device arc-pro-b70 \
    --num-devices 2 --discover-host --runtime vllm-xpu \
    --ctx 4096 --concurrency 4 \
    --gpu-memory-utilization 0.85

# Tier 2 (one-time per image)
python3 scripts/calibrate.py --image vllm/vllm-openai-xpu:latest --device arc-pro-b70
# Then re-run Tier 1 with --use-calibration vllm/vllm-openai-xpu:latest

# Tier 3 (verify a candidate)
python3 scripts/verify.py --image vllm/vllm-openai-xpu:latest --device arc-pro-b70 \
    --model Qwen/Qwen2.5-1.5B-Instruct --quant fp8 --kv-dtype fp8 \
    --ctx 4096 --concurrency 4

All three tiers assume XPU graphs on, the vLLM v0.31.0+ default. For a pre-v0.31.0 image, pass --enforce-eager to every tier so calibration, prediction, and verification measure the same launch. Calibrations are cached per mode, and --use-calibration refuses one taken in the other mode.

For a plain roofline readout without a launch recommendation:

sh
python3 scripts/llm_roofline.py --model <id> --device <id> \
    --quant fp8 --kv-dtype fp8 --ctx 8192 --concurrency 8

Use --discover-host whenever the recommendation is for the current machine. It runs xpu-smi discovery first and fails if --num-devices exceeds the Intel XPUs visible on the host. Omit it only for what-if planning for a different host.

What recommend.py outputs per candidate

  • Layout dp=N, tp=M. TP shards one replica across GPUs (use when weights/KV don't fit on one GPU); DP runs independent replicas (use when the model fits per GPU). Recommender prefers DP when the model fits.
  • Fit breakdown weights / KV / activations / framework per GPU. Fit is checked against device_vram × --gpu-memory-utilization, matching the vLLM launch flag emitted for the top candidate.
  • Capacity ceilings max concurrency at target context, max context at target concurrency (memory-only).
  • Predicted TTFT band (compute roofline, prefill).
  • Predicted decode band step latency at target concurrency, aggregate decode tok/s.
  • Caveats for the (quant, runtime) pair.
  • Available checkpoints in each quant from a Hub search.
  • Launch line for the top candidate.

Reporting the recommendation

The launch block recommend.py prints begins with docker run --rm -d --name vllm-xpu ... and ends with the model id plus serve flags. Copy that whole block into a fenced ```bash block; the recommender's stdout is not shown to the user, so a pointer like "the block above" leaves them with nothing to run. A flag table is fine in addition, never instead.

This skill only plans — it never launches anything itself. Present the block as a command for the user to review and run, and have them confirm the image tag and device mask before running it on their host.

Pinning the model revision

--revision REF takes a commit SHA, tag, or branch. It sets the revision the config is read from and the revision the emitted launch line pins, so the plan and the deployment describe the same artifact.

Left unset, vLLM resolves the repo's default branch when the server starts: a later push by the publisher silently changes what is served, and the run stops being reproducible. recommend.py prints a # NOTE saying so. A commit SHA is the only value that cannot be moved.

For models whose config.json declares auto_map, the pin stops being hygiene and becomes the mitigation. recommend.py therefore requires --revision alongside --trust-remote-code for any Hub model and exits 2 without it: granting arbitrary Python execution against a moving branch means the engine runs the publisher's latest push, not the code anyone reviewed. When both are given, the launch line carries --revision and --code-revision — vLLM resolves repo-local modeling code separately from the weights, so pinning one does not pin the other. A local --model /path/config.json has no branch to move and needs no pin.

Quants and compute tiers on Battlemage

--quantization drives both kernel selection and which compute tier the matmuls land on. The Xe2 XMX engines run INT8 at 367 TOPS vs FP16/BF16 at 45.88 TFLOPS (Arc Pro B70 spec). The roofline models W4A8 as INT8-tier when the W4A8 kernel is active; FP8/BF16 stay on the FP16 tier.

--quantizationBytes/paramXMX tierCLI pairing
(omit; BF16/FP16)2.0FP16/BF16 (45.88 TF on B70)--dtype bfloat16, --kv-cache-dtype auto
fp81.0FP16/BF16 (no native FP8 DPAS — kernel dequantizes FP8->BF16)--kv-cache-dtype fp8, --attention-backend TRITON_ATTN
awq / gptq0.55INT8-modeled when W4A8 kernel is active--kv-cache-dtype fp8, --attention-backend TRITON_ATTN
inc0.55INT8-modeled when W4A8 kernel is activeINC-quantized pipelines only; most AutoRound checkpoints auto-detect via gptq/awq instead.
mxfp40.55INT8-modeled W4A8-style pathMicroscaling FP4 (GPT-OSS family).
AutoRound checkpoint0.55INT8-modeled when W4A8 kernel is activeOmit --quantization — vLLM auto-detects from quantization_config.quant_method=auto-round and routes through gptq/awq loader.

W4A8 decode win is workload-dependent on Battlemage

The roofline predicts INT4 quants win decode by ~4× over BF16 from the weight-streaming reduction. On current vLLM-XPU images, how close the measurement comes depends on:

  • W4A8 kernel coverage on Battlemage's INT8 XMX tier is still maturing; some matmul shapes route through the BF16 path.
  • Online dequant overhead the static formula treats as free.
  • For MoE with low active-parameter ratios, routing cost can dominate weight-streaming savings.

Treat any INT4 candidate as "verify with bench" rather than "preferred." The fit/headroom argument (smaller weights -> larger context, larger concurrency) holds independently of throughput.

Roofline model

weights     = params × bytes_per_param / tp      # everything in memory
roofline params = active_params / tp             # what one token reads: the
              # active experts only, no embedding table, no vision tower
kv_per_tok_per_layer = 2 × num_kv_heads × head_dim × kv_dtype_bytes
kv_cache    = kv_per_tok_per_layer × concurrency / tp
            × (num_full_attention_layers × ctx
               + num_windowed_layers × window_tokens)
state       = reserved_state_per_request × concurrency    # SSM layers only
activations = vLLM's profiling-pass peak: max of the dense MLP
              (batched_tokens × 4 × intermediate × 2 B), the routed experts,
              and a VLM's vision encoder at its profiled maximum input --
              fixed at startup and independent of concurrency; independent
              of ctx too, except an InternVL-style tower, whose profiled
              video grows with the maximum context
framework   = vLLM runtime floor (1.0 GiB, +0.15 quantized) + encoder buffers
usable      = gpu_memory_utilization × 0.946 × device_vram  # driver total

prefill_tok_s = peak_compute × MFU / (2 × params)         # compute-bound
TTFT          = prompt_tokens / prefill_tok_s

single_stream_decode_tok_s = (mem_bw / weights_bytes) × BWE   # memory-bound
TPOT_at_concurrency        = step time including KV traffic at (ctx, concurrency)

The cache is charged per layer because the layer kinds cost different amounts. A windowed layer holds window - 1 plus two scheduler batches under vLLM, so its cache stops growing once the context passes the window. A recurrent (state-space) layer holds no KV cache at all, only a fixed state per running request that does not shrink with context -- so for those models concurrency is the lever, not context. vLLM reserves more than one bare copy of that state: it pads each state page to an attention block (growing the block to fit the page) and, with its default prefix caching, holds two pages per recurrent layer, about twice the bare state. Because neither curve is a straight line, the reported maximum context and maximum concurrency are found by search rather than by division.

MFU (compute efficiency) and BWE (bandwidth efficiency) live in data/hardware.json as ranges per runtime — see "Worked example" below for why bands are wide. Roofline reference: Williams, Waterman, Patterson, Communications of the ACM 52(4), 2008.

Hardware coverage (data/hardware.json)

CardPCI device IDDieVRAMBandwidthFP16/BF16INT8
Arc B5800xe20bBMG-G2112 GB456 GB/s26.9 TF233 TOPS
Arc Pro B500xe220 ¹BMG-G21 (LP)16 GB224 GB/s21.30 TF170 TOPS
Arc Pro B600xe211 ¹BMG-G2124 GB456 GB/s24.56 TF197 TOPS
Arc Pro B650xe221 ¹BMG-G31 (cut)32 GB608 GB/s24.56 TF197 TOPS
Arc Pro B700xe223BMG-G31 (full)32 GB608 GB/s45.88 TF367 TOPS

¹ Provisional — derived from the xe kernel driver's INTEL_BMG_IDS list; not yet verified by lspci on physical hardware.

Each row in the JSON cites Intel's SKU spec page directly. The PCI device ID is what xpu-smi discovery and lspci -d 8086: show in brackets (e.g. Intel(R) Graphics [0xe223]).

Worked example

This shows the shape of a recommend.py run, not real numbers — the values are deliberately <placeholders> so they can't be pasted into an answer. It is not a substitute for running the script: checkpoints, spec rows, and fit math all change with the inputs. If your answer has a number you didn't get from a recommend.py run this session, it is wrong.

Qwen/Qwen2.5-7B-Instruct, 8K context, concurrency 8, Arc Pro B70 produces a block shaped like this:

--- Candidate 1: --quant <q>, --kv-cache-dtype <kv>, dp=<N>, tp=<M> ---
  Fit:       <W> GB weights + <K> GB KV + <A> GB act + <F> GB framework
             = <T> GB / <U> GB usable per GPU (headroom <H> GB)
  Capacity:  up to <C> concurrent at <ctx> tok per replica; ...
  Predicted: TTFT <lo>–<hi> ms; decode step <lo>–<hi> ms at concurrency <c>;
             aggregate decode <lo>–<hi> tok/s across DP=<N>
  ... (more candidates) ...

=== Launch line for top candidate ===
docker run --rm -d --name vllm-xpu \
    ...
    vllm/vllm-openai-xpu:latest \
    <checkpoint> \
        ...

Bands are wide because community-typical MFU/BWE ranges cover both maturing and well-tuned kernels. Run calibrate.py to tighten to your image, then verify.py to collapse to a measurement.

What this skill does NOT predict

  • Expert Parallelism (EP) for MoE — workload-specific. Bench --enable-expert-parallel against --tensor-parallel-size N.
  • Speculative decoding speedup (n-gram, EAGLE, EAGLE3, MTP) — depends on draft accuracy on the target distribution.
  • Tuning knobs --block-size, --max-num-batched-tokens, --max-num-seqs — emitted as starting points, sweep with vllm-xpu-bench.
  • Tokens-per-second point estimates. Bands only.

Common errors

  • HTTP 401 fetching config.json -> typo, gated repo, or rate limit. Set HF_TOKEN or pass --config-path <local file>.
  • "config.json missing required keys" -> not a decoder-only LLM. Use model-can-it-fit for VLMs.
  • Empty candidates list -> (model, device, ctx, concurrency) doesn't fit. Reduce concurrency / context, or use a more compressed quant.
  • GGUF repo with no config.json -> use a safetensors checkpoint for vLLM-XPU, or a llama.cpp SYCL workflow for GGUF.

What this skill does NOT cover

  • Running the model — use vllm-xpu-run with the emitted line.
  • Benchmarking — use vllm-xpu-bench.
  • Fitting non-LLMs — use model-can-it-fit.

References

Tệp đi kèm

Mô hình đọc các tệp này khi cần trong lúc kỹ năng được tải. Các tệp được cung cấp ở dạng có thể đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Model Config Recommend làm được gì?

Recommend how to configure vLLM-XPU for a Hugging Face decoder-only LLM on Intel Arc B-series GPUs: choose quantization, KV dtype, DP/TP layout, max concurrency, and max context using roofline math against published hardware specs. Use when the user asks "How should I configure vLLM?", requests the best vLLM configuration, or asks how to use one or multiple Arc cards. Must run recommend.py; predictions are physics-bounded ranges, not measured throughput. Use after xpu-discover and before vllm-xpu-run.

Vì sao nên dùng Model Config Recommend trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Model Config Recommend là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Model Config Recommend trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/intel/skills/tree/main/skills/model-config-recommend. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm và cài đặt thành một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Model Config Recommend?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Bạn có thể dùng Model Config Recommend với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Model Config Recommend với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Model Config Recommend có miễn phí không?

Có. Kỹ năng này được intel phát hành trên GitHub theo giấy phép Apache-2.0. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp cho mô hình các công cụ mới để gọi — mã được chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và tiêu chí của đầu ra tốt. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇