Model reference · open weights

internlm2

LLMs internlm Text gen 3 builds Its own licence terms 72k dl/mo

internlm2 is an open-weight language model from internlm. internlm2-7b (BF16) weighs 15.5 GB; the smallest configuration that runs it is 2× RTX 3060 12 GB.

  • InternLM2 is a 7.7B parameter text-generation model developed by internlm, published as internlm/internlm2-chat-7b.
  • It supports a context length of 32,768 tokens and is designed for practical scenarios including chat, reasoning, and code generation.
  • The model weights are available under a custom license that permits free commercial usage upon application.

Summary of the internlm/internlm2-chat-7b model card, 2026-10-01. The estimate below is for another build of the family.

What it is

Released byinternlm
Released2024-01-10
Parameters7.7B
VRAM15.5 GB for the weights

What it runs on

Memory and cards for internlm2-7b (BF16)

15.5 GBweights, file size
131 MBcache per 1K tokens
709 MBruntime overhead, at least
32,768 tokenscontext max
CardRequests at onceContext maxMemory
8K each32K each
RTX 3060 12 GB … RTX 4060 Ti 16 GB
2 smaller cards
———
RTX 3090 24 GB61all 32K23.4 GB
RTX 4090 24 GB61all 32K23.4 GB
RTX 5090 32 GB133all 32K31.0 GB
L40S 48 GB256all 32K44.0 GB
A100 80 GB5714all 32K78.2 GB
H100 80 GB5413all 32K78.1 GB
RTX PRO 6000 Blackwell 96 GB6817all 32K93.8 GB
DGX Spark (GB10) 128 GB unified8120all 32K107 GB
H200 141 GB10927all 32K138 GB
B200 180 GB14436all 32K176 GB
2× RTX 3060 12 GB
tensor parallel
51all 32K11.6 GB a card
2× RTX 4060 Ti 16 GB
tensor parallel
123all 32K15.4 GB a card
2× RTX 4090 24 GB
tensor parallel
276all 32K23.4 GB a card
2× RTX 3090 24 GB
tensor parallel
276all 32K23.4 GB a card
Memory needed at each load
Requests at once8K tokens each32K tokens each
117.3 GB20.5 GB
521.6 GB37.7 GB
824.8 GB50.5 GB
1633.4 GB84.9 GB
3250.5 GB154 GB
6484.9 GB291 GB

One card, with vLLM's small-card settings.

Builds

Sizes, precisions & builds

BuildParamsPrecisionWeightsSmallest setup
internlm2-chat-7b ↗ 7.7BBF16 15.5 GB2× RTX 3060 12 GB
internlm2-7b (above) ↗ —BF16 15.5 GB2× RTX 3060 12 GB
internlm2-chat-20b ↗ 19.9BBF16 39.7 GBL40S 48 GB

From the model card

What internlm says about internlm2

Read the model card

💻Github Repo • 🤔Reporting Issues • 📜Technical Report

Introduction

InternLM2 has open-sourced a 7 billion parameter base model and a chat model tailored for practical scenarios. The model has the following characteristics:

  • 200K Context window: Nearly perfect at finding needles in the haystack with 200K-long context, with leading performance on long-context tasks like LongBench and L-Eval. Try it with LMDeploy for 200K-context inference.

  • Outstanding comprehensive performance: Significantly better than the last generation in all dimensions, especially in reasoning, math, code, chat experience, instruction following, and creative writing, with leading performance among open-source models in similar sizes. In some evaluations, InternLM2-Chat-20B may match or even surpass ChatGPT (GPT-3.5).

  • Code interpreter & Data analysis: With code interpreter, InternLM2-Chat-20B obtains compatible performance with GPT-4 on GSM8K and MATH. InternLM2-Chat also provides data analysis capability.

  • Stronger tool use: Based on better tool utilization-related capabilities in instruction following, tool selection and reflection, InternLM2 can support more kinds of agents and multi-step tool calling for complex tasks. See examples.

InternLM2-Chat-7B

Performance Evaluation

We conducted a comprehensive evaluation of InternLM using the open-source evaluation tool OpenCompass. The evaluation covered five dimensions of capabilities: disciplinary competence, language competence, knowledge competence, inference competence, and comprehension competence. Here are some of the evaluation results, and you can visit the OpenCompass leaderboard for more evaluation results.

Dataset\ModelsInternLM2-7BInternLM2-Chat-7BInternLM2-20BInternLM2-Chat-20BChatGPTGPT-4
MMLU65.863.767.766.569.183.0
AGIEval49.947.253.050.339.955.1
BBH65.061.272.168.370.186.7
GSM8K70.870.776.179.678.291.4
MATH20.223.025.531.928.045.8
HumanEval43.359.848.867.173.274.4
MBPP(Sanitized)51.851.463.065.878.979.0
  • The evaluation results were obtained from OpenCompass (some data marked with *, which means come from the original papers), and evaluation configuration can be found in the configuration files provided by OpenCompass.
  • The evaluation data may have numerical differences due to the version iteration of OpenCompass, so please refer to the latest evaluation results of OpenCompass.

Limitations: Although we have made efforts to ensure the safety of the model during the training process and to encourage the model to generate text that complies with ethical and legal requirements, the model may still produce unexpected outputs due to its size and probabilistic generation paradigm. For example, the generated responses may contain biases, discrimination, or other harmful content. Please do not propagate such content. We are not responsible for any consequences resulting from the dissemination of harmful information.

Import from Transformers

To load the InternLM2 7B Chat model using Transformers, use the following code:

import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("internlm/internlm2-chat-7b", trust_remote_code=True)
# Set `torch_dtype=torch.float16` to load model in float16, otherwise it will be loaded as float32 and cause OOM Error.
model = AutoModelForCausalLM.from_pretrained("internlm/internlm2-chat-7b", torch_dtype=torch.float16, trust_remote_code=True).cuda()
model = model.eval()
response, history = model.chat(tokenizer, "hello", history=[])
print(response)
# Hello! How can I help you today?
response, history = model.chat(tokenizer, "please provide three suggestions about time management", history=history)
print(response)

The responses can be streamed using stream_chat:

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model_path = "internlm/internlm2-chat-7b"
model = AutoModelForCausalLM.from_pretrained(model_path, torch_dtype=torch.float16, trust_remote_code=True).cuda()
tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)

model = model.eval()
length = 0
for response, history in model.stream_chat(tokenizer, "Hello", history=[]):
    print(response[length:], flush=True, end="")
    length = len(response)

Deployment

LMDeploy

LMDeploy is a toolkit for compressing, deploying, and serving LLM, developed by the MMRazor and MMDeploy teams.

pip install lmdeploy

You can run batch inference locally with the following python code:

import lmdeploy
pipe = lmdeploy.pipeline("internlm/internlm2-chat-7b")
response = pipe(["Hi, pls intro yourself", "Shanghai is"])
print(response)

Or you can launch an OpenAI compatible server with the following command:

lmdeploy serve api_server internlm/internlm2-chat-7b --model-name internlm2-chat-7b --server-port 23333

Then you can send a chat request to the server:

curl http://localhost:23333/v1/chat/completions \
    -H "Content-Type: application/json" \
    -d '{
    "model": "internlm2-chat-7b",
    "messages": [
    {"role": "system", "content": "You are a helpful assistant."},
    {"role": "user", "content": "Introduc

Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms