InternLM
StaleDescription
Open-source LLM family by Shanghai AI Lab, spanning 1.8B to 20B parameter models with long-context reasoning, deep thinking mode, and efficient fine-tuning for chat, reasoning, and code generation.
Key Features
- Multiple parameter sizes — 1.8B, 7B, 20B variants to match different hardware budgets
- Deep thinking mode — Long chain-of-thought reasoning for complex math and logic tasks
- Long context window — Up to 1M token input, ideal for long-document processing
- Multi-backend inference — Compatible with Transformers, vLLM, Ollama, LMDeploy, SGLang
- Strong benchmarks — SOTA performance on CMMLU, MATH, GPQA, and other benchmarks
- Open and commercial-friendly — Apache-2.0 license, fully open model weights and code
Use Cases
Categories
Quick Start
# Install Transformers
pip install torch transformers
# Load InternLM3-8B-Instruct
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("internlm/internlm3-8b-instruct", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained("internlm/internlm3-8b-instruct", trust_remote_code=True, torch_dtype=torch.float16)
model.eval()
# Inference
response, history = model.chat(tokenizer, "Hello, please introduce yourself", history=[])
print(response)