بنقرة واحدة
update-vram-model
Extend the LLM VRAM calculator — add quant families, update formulas, add test anchors
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Extend the LLM VRAM calculator — add quant families, update formulas, add test anchors
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Add or update an app in the dev.tools software installer catalog
Add a prompt or skill to the dev.tools prompts collection (TypeScript catalog workflow)
Add a new tool page to dev.tools — covers ToolView, Editor, and Custom patterns
Scaffold a new tool page in dev.tools following the established pattern
Internal dev.tools project conventions — state, styling, contexts, typing, and code style rules
Run the complete dev.tools pre-commit verification pipeline
| name | update-vram-model |
| description | Extend the LLM VRAM calculator — add quant families, update formulas, add test anchors |
Engine: src/common/llm-vram-calc.ts (~1412 lines)
Read .tmp/research/VRAM-RESEARCH.md first. It contains the authoritative quant bpw table, KV-cache formula, MoE factor, and sanity anchors. Do not use memory or external sources for bit-widths.
type QuantEntry = { bpw: number; family: string; sweetSpot: boolean; hint: string };
type Quantization = keyof typeof QUANT_CATALOG;
type GpuType = 'nvidia' | 'amd' | 'apple' | 'cpu';
type KVCacheQuant = 'fp16' | 'fp8' | 'q8' | 'q4';
1. Add quant families to QUANT_CATALOG near the top of llm-vram-calc.ts:
'Q4_K_M': { bpw: 4.85, family: 'GGUF', sweetSpot: true, hint: 'Best size/quality balance' },
Use empirical bpw values from .tmp/research/VRAM-RESEARCH.md — not rounded integers.
2. Update calculateVram() following the 7-step plan in the research doc:
bpw for weight memorykvCacheQuant)3. Run existing tests — all cases must remain green:
npx jest test/common/llm-vram-calc.test.ts
4. Add anchored test cases from the research doc's sanity anchors:
it('70B Q4_K_M fits in ~42 GB', () => {
const result = calculateVram({ params: 70, quant: 'Q4_K_M' /* ... */ });
expect(result.totalGb).toBeGreaterThan(40);
expect(result.totalGb).toBeLessThan(45);
});
5. Full verify:
npm run verify
npm run verify:ui # navigate to LLM VRAM Calculator, enter known anchor values, confirm output matches
6. Commit: git add -A && git commit -m "feat(vram): ..." then git status clean.