openbmb / MiniCPM3-4B-GPTQ-Int4

huggingface.co
Total runs: 167
24-hour runs: 0
7-day runs: 10
30-day runs: 10
Model's Last Updated: Septiembre 23 2024
text-generation

Introduction of MiniCPM3-4B-GPTQ-Int4

Model Details of MiniCPM3-4B-GPTQ-Int4

MiniCPM Repo | MiniCPM Paper | MiniCPM-V Repo | Join us in Discord and WeChat

Introduction

MiniCPM3-4B is the 3rd generation of MiniCPM series. The overall performance of MiniCPM3-4B surpasses Phi-3.5-mini-Instruct and GPT-3.5-Turbo-0125, being comparable with many recent 7B~9B models.

Compared to MiniCPM1.0/MiniCPM2.0, MiniCPM3-4B has a more powerful and versatile skill set to enable more general usage. MiniCPM3-4B supports function call, along with code interpreter. Please refer to Advanced Features for usage guidelines.

MiniCPM3-4B has a 32k context window. Equipped with LLMxMapReduce, MiniCPM3-4B can handle infinite context theoretically, without requiring huge amount of memory.

Usage
Inference with Transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

path = "openbmb/MiniCPM3-4B-GPTQ-Int4"
device = "cuda"

tokenizer = AutoTokenizer.from_pretrained(path, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(path, torch_dtype=torch.bfloat16, device_map=device, trust_remote_code=True)

messages = [
    {"role": "user", "content": "推荐5个北京的景点。"},
]
model_inputs = tokenizer.apply_chat_template(messages, return_tensors="pt", add_generation_prompt=True).to(device)

model_outputs = model.generate(
    model_inputs,
    max_new_tokens=1024,
    top_p=0.7,
    temperature=0.7
)

output_token_ids = [
    model_outputs[i][len(model_inputs[i]):] for i in range(len(model_inputs))
]

responses = tokenizer.batch_decode(output_token_ids, skip_special_tokens=True)[0]
print(responses)
Inference with vLLM
from transformers import AutoTokenizer
from vllm import LLM, SamplingParams

model_name = "openbmb/MiniCPM3-4B-GPTQ-Int4"
prompt = [{"role": "user", "content": "推荐5个北京的景点。"}]

tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
input_text = tokenizer.apply_chat_template(prompt, tokenize=False, add_generation_prompt=True)

llm = LLM(
    model=model_name,
    trust_remote_code=True,
    tensor_parallel_size=1,
    quantization='gptq'
)
sampling_params = SamplingParams(top_p=0.7, temperature=0.7, max_tokens=1024, repetition_penalty=1.02)

outputs = llm.generate(prompts=input_text, sampling_params=sampling_params)

print(outputs[0].outputs[0].text)
Evaluation Results
Benchmark Qwen2-7B-Instruct GLM-4-9B-Chat Gemma2-9B-it Llama3.1-8B-Instruct GPT-3.5-Turbo-0125 Phi-3.5-mini-Instruct(3.8B) MiniCPM3-4B
English
MMLU 70.5 72.4 72.6 69.4 69.2 68.4 67.2
BBH 64.9 76.3 65.2 67.8 70.3 68.6 70.2
MT-Bench 8.41 8.35 7.88 8.28 8.17 8.60 8.41
IFEVAL (Prompt Strict-Acc.) 51.0 64.5 71.9 71.5 58.8 49.4 68.4
Chinese
CMMLU 80.9 71.5 59.5 55.8 54.5 46.9 73.3
CEVAL 77.2 75.6 56.7 55.2 52.8 46.1 73.6
AlignBench v1.1 7.10 6.61 7.10 5.68 5.82 5.73 6.74
FollowBench-zh (SSR) 63.0 56.4 57.0 50.6 64.6 58.1 66.8
Math
MATH 49.6 50.6 46.0 51.9 41.8 46.4 46.6
GSM8K 82.3 79.6 79.7 84.5 76.4 82.7 81.1
MathBench 63.4 59.4 45.8 54.3 48.9 54.9 65.6
Code
HumanEval+ 70.1 67.1 61.6 62.8 66.5 68.9 68.3
MBPP+ 57.1 62.2 64.3 55.3 71.4 55.8 63.2
LiveCodeBench v3 22.2 20.2 19.2 20.4 24.0 19.6 22.6
Function Call
BFCL v2 71.6 70.1 19.2 73.3 75.4 48.4 76.0
Overall
Average 65.3 65.0 57.9 60.8 61.0 57.2 66.3
Statement
  • As a language model, MiniCPM3-4B generates content by learning from a vast amount of text.
  • However, it does not possess the ability to comprehend or express personal opinions or value judgments.
  • Any content generated by MiniCPM3-4B does not represent the viewpoints or positions of the model developers.
  • Therefore, when using content generated by MiniCPM3-4B, users should take full responsibility for evaluating and verifying it on their own.
LICENSE
  • This repository is released under the Apache-2.0 License.
  • The usage of MiniCPM3-4B model weights must strictly follow MiniCPM Model License.md .
  • The models and weights of MiniCPM3-4B are completely free for academic research. after filling out a "questionnaire" for registration, are also available for free commercial use.
Citation
@article{hu2024minicpm,
  title={MiniCPM: Unveiling the Potential of Small Language Models with Scalable Training Strategies},
  author={Hu, Shengding and Tu, Yuge and Han, Xu and He, Chaoqun and Cui, Ganqu and Long, Xiang and Zheng, Zhi and Fang, Yewei and Huang, Yuxiang and Zhao, Weilin and others},
  journal={arXiv preprint arXiv:2404.06395},
  year={2024}
}

Runs of openbmb MiniCPM3-4B-GPTQ-Int4 on huggingface.co

167
Total runs
0
24-hour runs
4
3-day runs
10
7-day runs
10
30-day runs

More Information About MiniCPM3-4B-GPTQ-Int4 huggingface.co Model

More MiniCPM3-4B-GPTQ-Int4 license Visit here:

https://choosealicense.com/licenses/apache-2.0

MiniCPM3-4B-GPTQ-Int4 huggingface.co

MiniCPM3-4B-GPTQ-Int4 huggingface.co is an AI model on huggingface.co that provides MiniCPM3-4B-GPTQ-Int4's model effect (), which can be used instantly with this openbmb MiniCPM3-4B-GPTQ-Int4 model. huggingface.co supports a free trial of the MiniCPM3-4B-GPTQ-Int4 model, and also provides paid use of the MiniCPM3-4B-GPTQ-Int4. Support call MiniCPM3-4B-GPTQ-Int4 model through api, including Node.js, Python, http.

MiniCPM3-4B-GPTQ-Int4 huggingface.co Url

https://huggingface.co/openbmb/MiniCPM3-4B-GPTQ-Int4

openbmb MiniCPM3-4B-GPTQ-Int4 online free

MiniCPM3-4B-GPTQ-Int4 huggingface.co is an online trial and call api platform, which integrates MiniCPM3-4B-GPTQ-Int4's modeling effects, including api services, and provides a free online trial of MiniCPM3-4B-GPTQ-Int4, you can try MiniCPM3-4B-GPTQ-Int4 online for free by clicking the link below.

openbmb MiniCPM3-4B-GPTQ-Int4 online free url in huggingface.co:

https://huggingface.co/openbmb/MiniCPM3-4B-GPTQ-Int4

MiniCPM3-4B-GPTQ-Int4 install

MiniCPM3-4B-GPTQ-Int4 is an open source model from GitHub that offers a free installation service, and any user can find MiniCPM3-4B-GPTQ-Int4 on GitHub to install. At the same time, huggingface.co provides the effect of MiniCPM3-4B-GPTQ-Int4 install, users can directly use MiniCPM3-4B-GPTQ-Int4 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

MiniCPM3-4B-GPTQ-Int4 install url in huggingface.co:

https://huggingface.co/openbmb/MiniCPM3-4B-GPTQ-Int4

Url of MiniCPM3-4B-GPTQ-Int4

MiniCPM3-4B-GPTQ-Int4 huggingface.co Url

Provider of MiniCPM3-4B-GPTQ-Int4 huggingface.co

openbmb
ORGANIZATIONS

Other API from openbmb

huggingface.co

Total runs: 200.2K
Run Growth: 91.4K
Growth Rate: 45.63%
Updated:Octubre 05 2025
huggingface.co

Total runs: 134.8K
Run Growth: -3.0K
Growth Rate: -2.19%
Updated:Marzo 10 2026
huggingface.co

Total runs: 117.8K
Run Growth: 4.9K
Growth Rate: 4.17%
Updated:Septiembre 15 2025
huggingface.co

Total runs: 112.2K
Run Growth: 89.6K
Growth Rate: 79.87%
Updated:Mayo 10 2026
huggingface.co

Total runs: 106.9K
Run Growth: -45.2K
Growth Rate: -42.32%
Updated:Junio 13 2025
huggingface.co

Total runs: 25.5K
Run Growth: 411
Growth Rate: 1.61%
Updated:Octubre 24 2025
huggingface.co

Total runs: 20.0K
Run Growth: 1.8K
Growth Rate: 8.78%
Updated:Octubre 24 2025
huggingface.co

Total runs: 19.9K
Run Growth: 406
Growth Rate: 2.04%
Updated:Enero 15 2025
huggingface.co

Total runs: 11.5K
Run Growth: 10.4K
Growth Rate: 90.57%
Updated:Mayo 07 2026
huggingface.co

Total runs: 10.7K
Run Growth: -2.0K
Growth Rate: -18.47%
Updated:Junio 02 2023
huggingface.co

Total runs: 7.7K
Run Growth: -4.1K
Growth Rate: -52.99%
Updated:Febrero 27 2025
huggingface.co

Total runs: 6.5K
Run Growth: 523
Growth Rate: 8.06%
Updated:Enero 14 2026
huggingface.co

Total runs: 5.4K
Run Growth: 5.4K
Growth Rate: 99.14%
Updated:Junio 10 2025
huggingface.co

Total runs: 5.2K
Run Growth: 3.7K
Growth Rate: 70.38%
Updated:Octubre 20 2025
huggingface.co

Total runs: 4.8K
Run Growth: 2.7K
Growth Rate: 56.92%
Updated:Noviembre 04 2024
huggingface.co

Total runs: 3.9K
Run Growth: -2.8K
Growth Rate: -70.69%
Updated:Septiembre 09 2026
huggingface.co

Total runs: 1.4K
Run Growth: 79
Growth Rate: 5.80%
Updated:Enero 15 2025
huggingface.co

Total runs: 1.0K
Run Growth: 153
Growth Rate: 14.93%
Updated:Septiembre 19 2025
huggingface.co

Total runs: 891
Run Growth: 76
Growth Rate: 8.53%
Updated:Junio 27 2023
huggingface.co

Total runs: 886
Run Growth: 492
Growth Rate: 55.53%
Updated:Agosto 12 2023
huggingface.co

Total runs: 847
Run Growth: 48
Growth Rate: 5.67%
Updated:Agosto 24 2023
huggingface.co

Total runs: 733
Run Growth: 388
Growth Rate: 54.11%
Updated:Mayo 14 2024
huggingface.co

Total runs: 436
Run Growth: 372
Growth Rate: 85.32%
Updated:Febrero 12 2026
huggingface.co

Total runs: 416
Run Growth: -75
Growth Rate: -18.03%
Updated:Octubre 14 2023
huggingface.co

Total runs: 373
Run Growth: 147
Growth Rate: 39.41%
Updated:Junio 14 2025
huggingface.co

Total runs: 199
Run Growth: 46
Growth Rate: 23.12%
Updated:Febrero 21 2024
huggingface.co

Total runs: 170
Run Growth: 30
Growth Rate: 17.65%
Updated:Junio 11 2025
huggingface.co

Total runs: 166
Run Growth: 59
Growth Rate: 35.54%
Updated:Junio 11 2025