InternLM

Stale
GitHub Python Apache-2.0

Description

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

💡 Intelligent chat assistant: Build multi-turn dialogue systems with deep reasoning in Chinese and English
💡 Long-document analysis: Process ultra-long context documents for summarization, Q&A, and extraction
💡 Math and coding tasks: Use deep thinking mode for complex math proofs and code generation
💡 Domain fine-tuning: Efficiently fine-tune InternLM on domain-specific data

Strengths & Limitations

Strengths

  • High community interest (7.3k stars)
  • Permissive open-source license (Apache-2.0)
  • Established track record (3 years in production)
  • Responsive to issues, low backlog

⚠️ Limitations

  • No updates in over 10 months

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)

Related Projects

Llama 2

59.6k · Python
Stale C

Meta's open-source Llama 2 foundational LLM with pretrained and fine-tuned models from 7B to 70B parameters, supporting chat and text completion as a cornerstone of the open LLM ecosystem.

llmllamameta +3
  • · Multiple parameter sizes — 7B, 13B, 34B, and 70B parameter variants
  • · Base and chat models — Both pretrained base and instruction-fine-tuned Chat versions available
  • · Commercial-friendly license — Free for both research and commercial use

Megatron-LM

17.7k · Python
Active A

NVIDIA's open-source GPU-optimized library for training transformer models at scale, providing tensor parallelism, pipeline parallelism, sequence parallelism, and mixed-precision (FP8/FP4) support — the core foundation for trillion-parameter LLM training.

transformerdistributed-traininggpu +3
  • · Tensor parallelism (TP) — Shard individual transformer layers across GPUs to reduce per-card memory
  • · Pipeline parallelism (PP) — Distribute model layers across GPUs for ultra-large models
  • · Context parallelism (CP) — Handle ultra-long sequences efficiently with million-token training

Agently

1.6k · Python
Active A

A GenAI application development framework that simplifies agent interaction with structured data and chained-calls syntax, using event-driven flow for complex logic.

agentpythonframework +1
  • · Structured output control with framework-guaranteed schemas, required field extraction, and retry validation
  • · Runtime Skills system for discovering, installing, and executing MCP/script capabilities on demand
  • · TriggerFlow event-driven workflows with fan-out, pause/resume, save/load, and sub-flow support

Atomic Agents

6.2k · Python
Active A+

Atomic Agents is a modular AI agent building framework with an atomic design philosophy, providing composable components including tools, pipelines, and memory management for constructing agent systems.

frameworkpythonagent +2
  • · Atomic design philosophy with single-purpose, reusable, composable components
  • · Built on Instructor and Pydantic for type-safe, predictable agent behavior
  • · Multi-provider support including OpenAI, Anthropic, Groq, Gemini, and more