BestLLMfor EN Your hardware. Your LLM. Your call.
FRQuelLLM.fr
Guide · 2026-05-16

Best Local LLM for TypeScript & React Development

We benchmarked seven open-weight models on real Next.js, Vite and tRPC tasks. One clear winner, two strong runners-up, and the VRAM you actually need.

By Mohamed Meguedmi · 11 min read

Key Takeaways

  • Overall winner: Qwen3-Coder 32B at Q5_K_M is the best local model for TypeScript & React in May 2026 — 71.4% on SWE-bench Verified, fluent with React 19 Server Components, and runs at 38 tok/s on a single RTX 5090.
  • Best on 24 GB cards: DeepSeek-Coder V3 Lite 16B (Q6_K) hits 64.8% SWE-bench and handles tRPC + Zod inference correctly — the sweet spot for an RTX 4090 or 3090.
  • Best for refactoring large repos: GLM-4.6 Coder 35B with 256K context window beats every alternative on cross-file edits in a monorepo.
  • Agentic / tool-use: Devstral 24B v2 is still the top choice when you plug a model into Cline, Aider or Continue.dev.
  • Do not bother: CodeLlama 70B, StarCoder2 and any model below 14B parameters — they hallucinate React hooks and ship invalid JSX.

TypeScript and React are arguably the hardest stack for a local LLM in 2026. The type system is structural, generics are pervasive, hooks have strict call-order rules, and the React 19 / Next.js 15 surface area (Server Components, Server Actions, the new use() hook) shifts faster than most training cutoffs can track. A model that scores 80% on HumanEval can still produce a useEffect that ships an infinite render loop.

This guide ranks the seven open-weight models the BestLLMfor editorial team currently considers viable for serious React/TS work, with measured throughput, VRAM footprint, and pass rates on a fixed test suite. All numbers are reproducible — see our methodology page for the exact prompts, judges and hardware matrix.

How we tested

We ran each candidate through a 40-task private suite covering five categories that mirror real frontend work:

  • Component generation — build a typed React 19 component from a Figma description + props interface.
  • Hook authoring — custom hooks with correct dependency arrays, cleanup, and SSR-safe guards.
  • tRPC / Zod end-to-end — add a procedure with input validation, infer the output type on the client.
  • Bug fixing — 12 real bugs sampled from open Next.js and Remix GitHub issues.
  • Refactoring — convert a class component + Redux slice to function component + Zustand, preserving public API.

Each generation is judged by tsc --noEmit, ESLint with eslint-plugin-react-hooks, and a behavioral test in Vitest. A task only counts as passed when all three gates are green. We also report the public SWE-bench Verified score from swebench.com for cross-reference, but our internal pass rate is what should guide your choice.

The 2026 ranking

RankModelParamsQuantSWE-bench VBestLLMfor TS/React passMin VRAM
1Qwen3-Coder 32B32BQ5_K_M71.4%82.5%24 GB
2GLM-4.6 Coder35BQ4_K_M69.1%79.0%24 GB
3DeepSeek-Coder V3 Lite16BQ6_K64.8%74.5%16 GB
4Devstral 24B v224BQ5_K_M67.2%72.5%20 GB
5Qwen3-Coder 14B14BQ6_K58.3%65.0%12 GB
6Codestral 22B v222BQ5_K_M55.0%60.0%16 GB
7StarCoder2 15B15BQ5_K_M41.2%42.5%12 GB

SWE-bench Verified scores reported by the model authors; pass rates measured on our private TS/React suite, May 2026. Full per-task scores are available through the BestLLMfor public API (CC BY 4.0).

1. Qwen3-Coder 32B — the editor’s pick

Alibaba’s Qwen3-Coder 32B is the first open-weight model that consistently produces React 19 code we would actually ship. It correctly distinguishes Server Components from Client Components, picks use() over useEffect for promise unwrapping, and — crucially — emits TypeScript generics that compile on the first try in roughly four out of five tasks.

At Q5_K_M (about 22.4 GB on disk) it fits comfortably in a 24 GB card with a 32K context. On an RTX 5090 we measured 38 tok/s with llama.cpp b4500+, dropping to 28 tok/s on a 4090 and 19 tok/s on a 3090. On an Apple M4 Max (128 GB unified), throughput sits at 21 tok/s — respectable, though Metal still trails CUDA on prompt processing.

Where it struggles : extremely fresh APIs (the cacheTag() primitive shipped in Next.js 15.3 in March 2026) and obscure Tailwind 4 directives. For everything else, this is the default.

Modelfile snippet

FROM qwen3-coder:32b-instruct-q5_K_M
PARAMETER num_ctx 32768
PARAMETER temperature 0.2
PARAMETER top_p 0.9
SYSTEM """You are a senior React 19 and TypeScript 5.6 engineer.
Prefer Server Components. Never emit `any`. Always derive types from Zod schemas."""

2. GLM-4.6 Coder 35B — the monorepo specialist

If your daily work is editing a Turborepo or Nx workspace with dozens of packages, the 256K context window of GLM-4.6 Coder changes the game. You can paste the full tsconfig.json chain, three feature packages and the shared UI library, and it will still produce a coherent cross-package refactor.

Pure single-file generation is marginally weaker than Qwen3-Coder (79.0% vs 82.5% on our suite) and prompt processing on 100K-token inputs is slow — budget 45-60 seconds before the first token on a 4090. But for codebase-wide tasks, no other local model is close.

3. DeepSeek-Coder V3 Lite 16B — best on 24 GB or less

Most developers reading this run a 16 GB or 24 GB GPU. DeepSeek-Coder V3 Lite at Q6_K is the obvious pick for that hardware. It is the only sub-20B model that consistently writes correct useReducer + discriminated-union state machines, and its tRPC v11 output is essentially indistinguishable from a senior engineer’s.

Throughput is its second selling point : 62 tok/s on a 4090, 41 tok/s on a 3090, 28 tok/s on an RTX 4070 Ti Super. That makes it the fastest model in the ranking by a wide margin and the only one suitable for interactive autocomplete (sub-100 ms first-token latency at 8K context).

4. Devstral 24B v2 — for agentic workflows

Mistral’s Devstral 24B v2 was purpose-built for agent harnesses, and it shows. When wrapped in Cline, Aider or Continue.dev, it issues fewer redundant tool calls, recovers more gracefully from failed edits, and respects diff-style patch formats more reliably than any other model in our suite.

As a raw generator it lags Qwen3-Coder by ten points, so we do not recommend it for pure chat-style use. But if you live inside an agent, the lower tool-error rate compounds into a real productivity gain.

Hardware & cost matrix

SetupVRAMRecommended modelQuantExpected tok/sApprox. cost (USD)
RTX 509032 GBQwen3-Coder 32BQ5_K_M38$1,999
RTX 409024 GBQwen3-Coder 32BQ4_K_M30$1,650 used
RTX 309024 GBDeepSeek-Coder V3 LiteQ6_K41$700-900 used
RTX 4070 Ti Super16 GBDeepSeek-Coder V3 LiteQ5_K_M28$800
Apple M4 Max 64 GBUnifiedQwen3-Coder 32BQ5_K_M21$3,499 (MBP 16″)
Apple M4 Pro 48 GBUnifiedDeepSeek-Coder V3 LiteQ6_K34$2,499
Dual RTX 309048 GBGLM-4.6 Coder 35BQ5_K_M22$1,600-1,800 used

Use our total-cost-of-ownership calculator to compare 3 years of local inference against equivalent Claude or GPT API spend at your real token volume — for most TS/React developers above 2M tokens/month, the 4090 amortizes in under 8 months.

Editor integration : Continue.dev + Ollama

The most stable local setup right now is Ollama serving the model, with Continue.dev in VS Code or Cursor. Below is the minimal config we recommend.

// .continue/config.json
{
  "models": [
    {
      "title": "Qwen3-Coder 32B (local)",
      "provider": "ollama",
      "model": "qwen3-coder:32b-instruct-q5_K_M",
      "contextLength": 32768,
      "completionOptions": { "temperature": 0.2 }
    }
  ],
  "tabAutocompleteModel": {
    "title": "DeepSeek V3 Lite (autocomplete)",
    "provider": "ollama",
    "model": "deepseek-coder-v3-lite:16b-q6_K"
  }
}

The split is intentional : Qwen3-Coder for chat, refactors and multi-file edits ; DeepSeek-Coder V3 Lite for inline autocomplete where latency dominates. If you want to drive these models from an MCP-compatible client, our open-source quelllm-mcp server exposes both with structured tool definitions for filesystem, git and TypeScript LSP access.

What about smaller models?

We tested Qwen3-Coder 7B, DeepSeek-Coder V3 6.7B and Codestral 8B for completeness. None cleared 50% on our suite, and all three made the same class of error : confidently confusing useMemo with useCallback, or shipping a useEffect with a missing dependency that ESLint flags but the model never self-corrects. Below 14B parameters, local TS/React generation is not yet production-grade. Spend the extra VRAM.

Verdict

Use casePickWhy
General TypeScript + React on a single 24 GB GPUQwen3-Coder 32B Q4_K_MHighest pass rate, fluent with React 19, fits 24 GB.
16 GB GPU or fast inline autocompleteDeepSeek-Coder V3 Lite Q6_K62 tok/s on 4090, strong tRPC/Zod output.
Large monorepo refactorsGLM-4.6 Coder 35B256K context, cross-file coherence.
Agentic workflows (Cline, Aider)Devstral 24B v2Lowest tool-call error rate.
Apple Silicon (M3/M4 Max, 64 GB+)Qwen3-Coder 32B Q5_K_M21 tok/s, full quality, no GPU needed.

Methodology, raw per-task scores and the full prompt set are documented on the about page and queryable through the public API. French readers can find an equivalent guide on our sister site quelllm.fr.

FAQ

Can I run Qwen3-Coder 32B on 16 GB of VRAM?

Only at Q3_K_M or lower, and quality degrades sharply — the model starts mixing Vue and React idioms. On 16 GB, DeepSeek-Coder V3 Lite at Q6_K is a strictly better choice and runs twice as fast.

Is a local LLM actually competitive with Claude 4.6 or GPT-5 for React?

For pure single-file generation, Qwen3-Coder 32B closes the gap to roughly 90% of Claude 4.6’s quality at zero marginal cost. For multi-step agentic tasks across a large codebase, frontier closed models still lead by a meaningful margin. Most developers will find the local setup good enough for 80% of daily work.

Do these models know about React 19 Server Components?

Qwen3-Coder 32B, GLM-4.6 Coder and DeepSeek-Coder V3 (all released after October 2025) handle Server Components, Server Actions and the use() hook correctly. Devstral v2 is partially aware. Anything older than mid-2025 will reliably produce React 18 patterns.

Which quant should I download?

For coding, never go below Q5_K_M if you can fit it — quantization damage shows up first as type errors and broken generics. Q4_K_M is acceptable on 24 GB cards for the 32B class. Q6_K is the sweet spot for 14-16B models.

How fast does Ollama update to new model releases?

Official quants typically appear on ollama.com within 3-10 days of a HuggingFace release. For day-one access, pull GGUFs directly from the model author and use ollama create with a Modelfile.

Does fine-tuning on my own React codebase help?

For style consistency, yes — a LoRA on 5-10k of your own commits noticeably improves naming and import conventions. For correctness on framework APIs, no — you need a base model that already knows the API. Fix the base model choice first.