Logo vun Model Can It Fit

Model Can It Fit

Organisatioun
intel
model-can-it-fit

Estimate whether a Hugging Face decoder-only LLM, MoE, or VLM fits in Intel GPU VRAM for a quantization, context length, concurrency, runtime, and tensor-parallel setting. Use for memory-fit or max-model-len planning before launch. Reports weights, KV cache, activations, framework overhead, and first mitigation. Not for diffusion. Memory-only — does NOT predict throughput, tokens/sec, latency, or runtime config; route those to bench/deploy/recommend skills.

Iwwersiicht

Editeurintel
Repositoryskills
Skill-Nummmodel-can-it-fit
Stären
31
Forks
14
Matgeliwwert Fichieren
3
LizenzApache-2.0
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 3 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    Vum intel op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Model Can It Fit an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/intel/skills/tree/main/skills/model-can-it-fit
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

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-can-it-fit .claude/skills/model-can-it-fit
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Model Can It Fit an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Model Can It Fit automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Model Can It Fit net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

model-can-it-fit

Use this for a pre-launch VRAM calculator: whether a Hugging Face model can fit on an Intel GPU at a requested quantization, context length, concurrency, runtime, and tensor-parallel degree. Input: HF model id, quantization, context length, concurrency, target VRAM. Output: a per-component breakdown and a verdict.

The skill runs a CPU-only calculator. It does not need to deploy the model on an Intel GPU, but it MUST check the Intel GPU VRAM memory space and may need Hub access unless the user provides a local config.json or params.json.

Use And Route

Use this skill when the user asks:

  • whether a model fits on an Intel GPU or XPU
  • what max context or concurrency is memory-feasible
  • how VRAM splits across weights, KV cache, activations, and runtime
  • whether a vLLM/SGLang launch is likely to OOM before trying it

Use another skill instead when the user asks for:

  • measured speed, TTFT, TPOT, or tokens/sec: use a benchmark skill
  • an exact launch configuration or performance recommendation: use model-config-recommend
  • diffusion fit: use torch-xpu-bench empirically
  • live GPU readiness: use xpu-runtime-preflight or xpu-discover

Inputs To Collect

Ask for or infer:

  • model id or local config path
  • target GPU VRAM per device -- if the target is this host, measure it (see "Measure VRAM first" below) instead of asking the user
  • runtime: vllm, sglang, or torch
  • quantization: bf16, fp16, fp8, int8, int4, int3, int2, or mxfp4
  • context length and concurrency
  • tensor parallel degree if multiple XPUs are planned
  • vLLM --gpu-memory-utilization value if this is launch planning

For gated Hugging Face repos, use HF_TOKEN or HUGGING_FACE_HUB_TOKEN. For repeatable tests, prefer local config snapshots.

Measure VRAM First

--device-vram-gb is required and has no default. Confirm which card the host actually has before choosing a value -- never assert VRAM from a remembered spec sheet:

sh
xpu-smi discovery -d 0 | grep -i 'Device Name\|Memory Physical Size'

Then pass that SKU's whole-GB figure from the table below (24480.00 MiB confirms a 24 GB B60). Bare xpu-smi discovery (no -d) prints no memory field at all -- it lists device names and PCI ids only. Do not summarise it as though it reported VRAM.

Also read the free memory, because another workload may already own the card:

sh
xpu-smi discovery -d 0 -j | grep -E 'memory_(physical_size|free_size)_byte'

If the target hardware is not attached to this host, use the same table and say in the answer that the card is a stated spec, not one you confirmed.

SKUPCI id--device-vram-gb
Arc Pro B700xe22332
Arc Pro B650xe22132
Arc Pro B600xe21124
Arc Pro B500xe22016
Arc B5800xe20b12

For --tp greater than 1, check every device in the intended set and pass the smallest one -- a TP group is limited by its smallest card. The same applies to --tp-sweep: measure enough devices to cover its largest degree.

Run

From the skillpack repo root:

sh
python3 scripts/fit.py \
    --model Qwen/Qwen2.5-7B-Instruct \
    --quant bf16 --ctx 8192 --concurrency 4 \
    --runtime vllm --device-vram-gb 24 \
    --gpu-memory-utilization 0.9 \
    --tp-sweep 1,2,4

When running from inside this skill directory, the shorter equivalent is:

sh
python3 scripts/fit.py \
    --model Qwen/Qwen2.5-7B-Instruct \
    --quant bf16 --ctx 8192 --concurrency 4 \
    --runtime vllm --device-vram-gb 24

For a local config:

sh
python3 scripts/fit.py \
    --model /path/to/model/config.json \
    --quant bf16 --ctx 8192 --concurrency 4 \
    --runtime vllm --device-vram-gb 24

For a quick common-model table:

sh
python3 scripts/fit.py \
    --table --runtime vllm --device-vram-gb 32

The 24 in the examples is an Arc Pro B60; substitute the SKU you confirmed. If the script errors with --device-vram-gb is required, that is the guard working -- go check the device, do not pick a plausible number.

Interpret Results

Report the verdict and the binding constraint first.

State where the VRAM figure came from: measured on device N, or a spec value for hardware you could not query. Never present a recalled number as if it were measured.

Free memory can be far below physical VRAM on a shared host. The verdict is computed against the figure you passed, so if memory_free_size_byte showed the card already occupied, a FITS verdict is not a promise that a launch right now will succeed -- say so, and point at an idle device with ZE_AFFINITY_MASK.

For a pass, include:

  • total VRAM estimate
  • usable VRAM if --gpu-memory-utilization was supplied
  • headroom in GB and percent
  • max concurrency or max context memory ceiling if relevant

For a fail, include:

  • deficit in GB
  • largest component: weights, KV cache, activations, or framework
  • the script's first mitigation: lower context, lower concurrency, lower KV dtype, quantize weights, or increase TP

Do not present the result as measured GPU memory. It is a config-derived estimate intended to prevent obvious OOMs before launch.

Runtime Planning Rules

Use the same --gpu-memory-utilization that the runtime launch will use. For vLLM launch planning, 0.9 is a common starting point; the script's default 1.0 answers only whether bytes fit in physical VRAM.

If quantization is omitted, the script auto-detects known quantization_config.quant_method values from the model config. For quantized weights, the script auto-pairs KV dtype with fp8 unless the user overrides --kv-dtype.

Tensor parallelism divides weights and KV cache per device in this estimator, and --device-vram-gb is per device. The script does not know which cards the launch will land on, so confirm N XPUs exist with xpu-smi discovery, pass the smallest card's VRAM, and name the intended devices in the answer via ZE_AFFINITY_MASK.

Gotchas

  • Do not calculate VRAM by hand in the final answer. Run scripts/fit.py; if a new repeated calculation is needed, add script support or a fixture.
  • Never state a card's VRAM from memory, and never summarise xpu-smi discovery as though it reported memory -- the bare form does not print any memory field. xpu-smi discovery -d <id> does. Assert VRAM only from tool output you actually ran.
  • Pass the SKU's whole-GB figure (B60 = 24), but treat it as nameplate. fit.py computes with GB = 1024 ** 3, so 24 is read as 24 GiB while the card holds 24480 MiB -- ~96 MiB optimistic -- and the driver's allocatable ceiling is ~5% below physical (22.71 GiB on a B60). Both gaps run the same direction. Omitting --gpu-memory-utilization makes the script print Usable VRAM: all of it (physical-fit only) plus a Note: spelling this out; relay it rather than reporting the verdict alone, and re-run with the launch's real value before trusting a tight FITS.
  • An overstated VRAM figure is worse than an understated one: it yields a FITS verdict for a launch that OOMs at engine init. When unsure between two values, pass the lower.
  • ZE_AFFINITY_MASK is not CUDA_VISIBLE_DEVICES -- an out-of-range index crashes the Level Zero loader rather than being ignored. Confirm device ids with xpu-smi discovery before recommending a mask.
  • This is a config-derived estimate, not measured XPU memory or throughput. Use benchmark/profile skills for measured behavior.
  • Match --gpu-memory-utilization to the planned runtime launch; the default 1.0 is only a physical-fit answer.
  • Report auto-detected quantization and KV dtype so the user knows which assumptions drove the verdict.
  • Route diffusion fit and tight VLM image-memory questions to empirical checks instead of treating this estimate as complete.

References

  • Read references/coverage-and-formulas.md when checking model class support, formula details, MoE/head-dim behavior, mixed precision, quick-reference verdicts on Arc Pro B70, or why an estimate differs from another calculator.
  • Read references/runtime-caveats.md when planning dtype/KV choices, handling VLM or diffusion edge cases, or explaining what this skill intentionally does not predict.

Matgeliwwert Fichieren

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Model Can It Fit?

Estimate whether a Hugging Face decoder-only LLM, MoE, or VLM fits in Intel GPU VRAM for a quantization, context length, concurrency, runtime, and tensor-parallel setting. Use for memory-fit or max-model-len planning before launch. Reports weights, KV cache, activations, framework overhead, and first mitigation. Not for diffusion. Memory-only — does NOT predict throughput, tokens/sec, latency, or runtime config; route those to bench/deploy/recommend skills.

Firwat Model Can It Fit op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Model Can It Fit besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Model Can It Fit an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/intel/skills/tree/main/skills/model-can-it-fit an. TypingMind liest d'Datei SKILL.md, bündelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Model Can It Fit benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Model Can It Fit benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Model Can It Fit domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Model Can It Fit gratis?

Jo. De Skill gëtt vum intel ënner der Lizenz Apache-2.0 op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇