GUIDE · OPEN-SOURCE

A practical guide to open-source models: selection, deployment & pitfalls

Open-source and open-weight models, local inference, and the OSS toolchain.

Open-source and open-weight models have become a mainstream choice for AI engineering. They allow you to run, fine-tune, and even modify model weights locally—no vendor API lock-in—offering advantages in data privacy, cost control, and latency. Since 2025, several high-quality open-source models have matched or surpassed closed-source benchmarks, turning 'self-hosting' from a niche into a core strategy.

The current landscape features three major camps: Meta's Llama series, Mistral's open models, and Thinking Machines Lab's Inkling. Meanwhile, open-source toolchains like Ollama, vLLM, and Hugging Face Transformers have dramatically lowered deployment barriers. However, model licenses, hardware requirements, community ecosystem, and actual inference performance vary widely, necessitating systematic evaluation.

Getting started & choosing well

Start by clarifying your use case. For chat/Q&A, try Llama 3.1 8B/70B or Mistral 7B. For code generation, DeepSeek Coder or CodeGemma are solid choices. For multimodal (image understanding), InternVL 2 or LLaVA work well. Use Ollama or llama.cpp for quick testing on consumer hardware.

Key selection dimensions: (1) License—Apache 2.0 (Inkling, Mistral 7B) is most permissive; Llama Community License restricts scenarios exceeding 700M MAU. (2) Hardware—70B models require at least 2×A100 or a 128GB Mac Studio; 7B runs fine on RTX 3090. (3) Community—check Hugging Face downloads, GitHub Stars, and paper citations.

Common pitfalls: (1) Relying only on benchmark scores—real end-to-end latency differs; Mamba architecture is 2–3× faster for long sequences than Transformer. (2) Ignoring tokenizer impact on multilingual performance (e.g., avoid Llama's original tokenizer for Japanese/Chinese). (3) Underestimating memory bandwidth—70B quantized still needs >30 GB/s for smooth interaction.

Productionization: Download from Hugging Face, serve with vLLM or TGI (supports PagedAttention and continuous batching). For fine-tuning, use LoRA with unsloth for speed. Evaluate using lm-evaluation-harness or custom datasets. Monitor first-token latency, throughput, and peak VRAM.

Frequently asked questions

Can open-source models be used commercially? What restrictions?

It depends on the license. Apache 2.0 and MIT allow commercial use with attribution only. Llama Community License requires special permission above 700M MAU. Grok models use Apache 2.0. Always read the full license file.

Should I choose a 7B or 70B model?

7B is great for single-GPU inference with low latency (<10ms/token) but weaker on complex reasoning. 70B excels in math/code but needs multi-GPU or heavy quantization. Prototype with 7B first, then scale up if needed.

What hardware do I need for local deployment?

7B quantized to INT4 uses ~4GB VRAM runs on RTX 3060. 13B needs 8GB, 70B quantized needs 40GB (e.g., dual A6000). CPU inference via llama.cpp is possible but slow. Mac unified memory can run 70B with ≥64GB RAM.

Can open-source models truly replace GPT-4 or Claude?

In specific domains (code generation, simple QA, classification) they are close or superior. But gaps remain in complex reasoning, long-context understanding, and safety alignment. Combining multiple models (e.g., 8B for classification + 70B for generation) can close the gap.

Should I use fine-tuning or RAG?

RAG is best for leveraging fresh or domain-specific knowledge with low deployment cost. Fine-tuning is for learning new behaviors or styles. Start with RAG; if insufficient, fine-tune. Combining both often yields best results.

How do I quantize models to reduce VRAM?

Use llama.cpp or AutoGPTQ for INT4/INT8 quantization, retaining 95–98% quality. GPTQ requires calibration data; GGUF format is more universal. vLLM supports FP8/INT4 dynamic quantization without pre-quantization.

Latest intel on this topic

See the full topic feed →