Mi:dm 2.0
Mi:dm 2.0 is a "Korea-centric AI" model developed using KT's proprietary technology. The term "Korea-centric AI" refers to a model that deeply internalizes the unique values, cognitive frameworks, and commonsense reasoning inherent to Korean society. It goes beyond simply processing or generating Korean text—it reflects a deeper understanding of the socio-cultural norms and values that define Korean society.
Mi:dm 2.0 is released in two versions:
-
Mi:dm 2.0 Base
An 11.5B parameter dense model designed to balance model size and performance.
It extends an 8B-scale model by applying the Depth-up Scaling (DuS) method, making it suitable for real-world applications that require both performance and versatility.
-
Mi:dm 2.0 Mini
A lightweight 2.3B parameter dense model optimized for on-device environments and systems with limited GPU resources.
It was derived from the Base model through pruning and distillation to enable compact deployment.
[!Note]
Neither the pre-training nor the post-training data includes KT users' data.
Quickstart
Here is the code snippet to run conversational inference with the model:
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, GenerationConfig
model_name = "K-intelligence/Midm-2.0-Base-Instruct"
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype=torch.bfloat16,
trust_remote_code=True,
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained(model_name)
generation_config = GenerationConfig.from_pretrained(model_name)
prompt = "KT에 대해 소개해줘"
messages = [
{"role": "system",
"content": "Mi:dm(믿:음)은 KT에서 개발한 AI 기반 어시스턴트이다."},
{"role": "user", "content": prompt}
]
input_ids = tokenizer.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_tensors="pt"
)
output = model.generate(
input_ids.to("cuda"),
generation_config=generation_config,
eos_token_id=tokenizer.eos_token_id,
max_new_tokens=128,
do_sample=False,
)
print(tokenizer.decode(output[0]))
[!NOTE]
The transformers library should be version 4.45.0 or higher.
Evaluation
Korean
* indicates KT proprietary evaluation resources.
English
Usage
Run on Friendli.AI
You can try our model immediately via Friendli.AI. Simply click Deploy and then Friendli Endpoints.
[!Note]
Please note that a login to Friendli.AI is required after your fifth chat interaction.
Run on Your Local Machine
We provide a detailed description about running Mi:dm 2.0 on your local machine using llama.cpp, LM Studio, and Ollama. Please check our github for more information
Deployment
Basic Serving
To serve Mi:dm 2.0 using vLLM(>=0.8.0) with an OpenAI-compatible API:
vllm serve K-intelligence/Midm-2.0-Base-Instruct
With Function Calling
For advanced function calling tasks, you can serve Mi:dm 2.0 with our own tool parser:
- Download and place Mi:dm 2.0 parser file in your working directory.
- Run the following Docker command to launch the vLLM server with our custom parser file:
docker run --rm -it --gpus all -p 8000:8000 \
-e HUGGING_FACE_HUB_TOKEN="<YOUR_HUGGINGFACE_TOKEN>" \
-v "$(pwd)/midm_parser.py:/custom/midm_parser.py" \
vllm/vllm-openai:v0.11.0 \
--model K-intelligence/Midm-2.0-Base-Instruct \
--enable-auto-tool-choice \
--tool-parser-plugin /custom/midm_parser.py \
--tool-call-parser midm-parser \
--host 0.0.0.0
[!Note]
This setup is compatible with vllm/vllm-openai:v0.8.0 and later, but we strongly recommend using v0.11.0 for optimal stability and compatibility with our parser.
Tutorials
To help our end-users easily use Mi:dm 2.0, we have provided comprehensive tutorials on github.
Limitation
-
The training data for both Mi:dm 2.0 models consists primarily of English and Korean. Understanding and generation in other languages are not guaranteed.
-
The model is not guaranteed to provide reliable advice in fields that require professional expertise, such as law, medicine, or finance.
-
Researchers have made efforts to exclude unethical content from the training data — such as profanity, slurs, bias, and discriminatory language. However, despite these efforts, the model may still produce inappropriate expressions or factual inaccuracies.
License
Mi:dm 2.0 is licensed under the MIT License.
Mi:dm 2.0 Technical Inquiries: midm-llm@kt.com