Text Generation
Transformers
Safetensors
English
Korean
llama
KT
K-intelligence
Mi:dm
conversational
text-generation-inference
Instructions to use K-intelligence/Midm-2.0-Mini-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use K-intelligence/Midm-2.0-Mini-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="K-intelligence/Midm-2.0-Mini-Instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("K-intelligence/Midm-2.0-Mini-Instruct") model = AutoModelForCausalLM.from_pretrained("K-intelligence/Midm-2.0-Mini-Instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use K-intelligence/Midm-2.0-Mini-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "K-intelligence/Midm-2.0-Mini-Instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "K-intelligence/Midm-2.0-Mini-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/K-intelligence/Midm-2.0-Mini-Instruct
- SGLang
How to use K-intelligence/Midm-2.0-Mini-Instruct with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "K-intelligence/Midm-2.0-Mini-Instruct" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "K-intelligence/Midm-2.0-Mini-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "K-intelligence/Midm-2.0-Mini-Instruct" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "K-intelligence/Midm-2.0-Mini-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use K-intelligence/Midm-2.0-Mini-Instruct with Docker Model Runner:
docker model run hf.co/K-intelligence/Midm-2.0-Mini-Instruct
Update README.md
Browse files
README.md
CHANGED
|
@@ -26,7 +26,7 @@ library_name: transformers
|
|
| 26 |
|
| 27 |
<br>
|
| 28 |
|
| 29 |
-
#
|
| 30 |
|
| 31 |
- 🔜 _(Coming Soon!) GGUF format model files will be available soon for easier local deployment._
|
| 32 |
- ⚡️`2025/07/04`: Released Mi:dm 2.0 Model collection on Hugging Face🤗.
|
|
@@ -53,7 +53,7 @@ library_name: transformers
|
|
| 53 |
|
| 54 |
# Overview
|
| 55 |
|
| 56 |
-
##
|
| 57 |
|
| 58 |
**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.
|
| 59 |
|
|
@@ -74,7 +74,7 @@ Mi:dm 2.0 is released in two versions:
|
|
| 74 |
|
| 75 |
<br>
|
| 76 |
|
| 77 |
-
##
|
| 78 |
|
| 79 |
Here is the code snippet to run conversational inference with the model:
|
| 80 |
|
|
@@ -125,10 +125,10 @@ print(tokenizer.decode(output[0]))
|
|
| 125 |
<br>
|
| 126 |
<br>
|
| 127 |
|
| 128 |
-
# Evaluation
|
| 129 |
|
| 130 |
|
| 131 |
-
###
|
| 132 |
|
| 133 |
<!-- first half table-->
|
| 134 |
<table>
|
|
@@ -382,7 +382,7 @@ print(tokenizer.decode(output[0]))
|
|
| 382 |
<br>
|
| 383 |
|
| 384 |
|
| 385 |
-
###
|
| 386 |
|
| 387 |
|
| 388 |
<table>
|
|
@@ -509,7 +509,7 @@ print(tokenizer.decode(output[0]))
|
|
| 509 |
|
| 510 |
# Usage
|
| 511 |
|
| 512 |
-
##
|
| 513 |
You can try our model immediately via `Friendli.AI`. Simply click `Deploy` and then `Friendli Endpoints`.
|
| 514 |
|
| 515 |
> [!Note]
|
|
@@ -520,11 +520,11 @@ You can try our model immediately via `Friendli.AI`. Simply click `Deploy` and t
|
|
| 520 |
<img src="./assets/image_2.png" alt="Right Image" width="36%" style="display:inline-block">
|
| 521 |
</p>
|
| 522 |
|
| 523 |
-
##
|
| 524 |
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](https://github.com/K-intelligence-Midm/Midm-2.0) for more information
|
| 525 |
|
| 526 |
|
| 527 |
-
##
|
| 528 |
|
| 529 |
To serve Mi:dm 2.0 using [vLLM](https://github.com/vllm-project/vllm)(`>=0.8.0`) with an OpenAI-compatible API:
|
| 530 |
```bash
|
|
@@ -532,7 +532,7 @@ vllm serve K-intelligence/Midm-2.0-Mini-Instruct
|
|
| 532 |
```
|
| 533 |
|
| 534 |
|
| 535 |
-
##
|
| 536 |
To help our end-users easily use Mi:dm 2.0, we have provided comprehensive tutorials on [github](https://github.com/K-intelligence-Midm/Midm-2.0).
|
| 537 |
<br>
|
| 538 |
|
|
@@ -541,7 +541,7 @@ To help our end-users easily use Mi:dm 2.0, we have provided comprehensive tutor
|
|
| 541 |
|
| 542 |
# More Information
|
| 543 |
|
| 544 |
-
##
|
| 545 |
* 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.
|
| 546 |
|
| 547 |
* The model is not guaranteed to provide reliable advice in fields that require professional expertise, such as law, medicine, or finance.
|
|
@@ -549,7 +549,7 @@ To help our end-users easily use Mi:dm 2.0, we have provided comprehensive tutor
|
|
| 549 |
* 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.
|
| 550 |
|
| 551 |
|
| 552 |
-
##
|
| 553 |
|
| 554 |
Mi:dm 2.0 is licensed under the [MIT License](./LICENSE).
|
| 555 |
|
|
@@ -566,7 +566,7 @@ Mi:dm 2.0 is licensed under the [MIT License](./LICENSE).
|
|
| 566 |
url={},
|
| 567 |
}
|
| 568 |
``` -->
|
| 569 |
-
##
|
| 570 |
Mi:dm 2.0 Technical Inquiries: midm-llm@kt.com
|
| 571 |
|
| 572 |
<br>
|
|
|
|
| 26 |
|
| 27 |
<br>
|
| 28 |
|
| 29 |
+
# News 📢
|
| 30 |
|
| 31 |
- 🔜 _(Coming Soon!) GGUF format model files will be available soon for easier local deployment._
|
| 32 |
- ⚡️`2025/07/04`: Released Mi:dm 2.0 Model collection on Hugging Face🤗.
|
|
|
|
| 53 |
|
| 54 |
# Overview
|
| 55 |
|
| 56 |
+
## Mi:dm 2.0
|
| 57 |
|
| 58 |
**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.
|
| 59 |
|
|
|
|
| 74 |
|
| 75 |
<br>
|
| 76 |
|
| 77 |
+
## Quickstart
|
| 78 |
|
| 79 |
Here is the code snippet to run conversational inference with the model:
|
| 80 |
|
|
|
|
| 125 |
<br>
|
| 126 |
<br>
|
| 127 |
|
| 128 |
+
## Evaluation
|
| 129 |
|
| 130 |
|
| 131 |
+
### Korean
|
| 132 |
|
| 133 |
<!-- first half table-->
|
| 134 |
<table>
|
|
|
|
| 382 |
<br>
|
| 383 |
|
| 384 |
|
| 385 |
+
### English
|
| 386 |
|
| 387 |
|
| 388 |
<table>
|
|
|
|
| 509 |
|
| 510 |
# Usage
|
| 511 |
|
| 512 |
+
## Run on Friendli.AI
|
| 513 |
You can try our model immediately via `Friendli.AI`. Simply click `Deploy` and then `Friendli Endpoints`.
|
| 514 |
|
| 515 |
> [!Note]
|
|
|
|
| 520 |
<img src="./assets/image_2.png" alt="Right Image" width="36%" style="display:inline-block">
|
| 521 |
</p>
|
| 522 |
|
| 523 |
+
## Run on Your Local Machine
|
| 524 |
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](https://github.com/K-intelligence-Midm/Midm-2.0) for more information
|
| 525 |
|
| 526 |
|
| 527 |
+
## Deployment
|
| 528 |
|
| 529 |
To serve Mi:dm 2.0 using [vLLM](https://github.com/vllm-project/vllm)(`>=0.8.0`) with an OpenAI-compatible API:
|
| 530 |
```bash
|
|
|
|
| 532 |
```
|
| 533 |
|
| 534 |
|
| 535 |
+
## Tutorials
|
| 536 |
To help our end-users easily use Mi:dm 2.0, we have provided comprehensive tutorials on [github](https://github.com/K-intelligence-Midm/Midm-2.0).
|
| 537 |
<br>
|
| 538 |
|
|
|
|
| 541 |
|
| 542 |
# More Information
|
| 543 |
|
| 544 |
+
## Limitation
|
| 545 |
* 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.
|
| 546 |
|
| 547 |
* The model is not guaranteed to provide reliable advice in fields that require professional expertise, such as law, medicine, or finance.
|
|
|
|
| 549 |
* 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.
|
| 550 |
|
| 551 |
|
| 552 |
+
## License
|
| 553 |
|
| 554 |
Mi:dm 2.0 is licensed under the [MIT License](./LICENSE).
|
| 555 |
|
|
|
|
| 566 |
url={},
|
| 567 |
}
|
| 568 |
``` -->
|
| 569 |
+
## Contact
|
| 570 |
Mi:dm 2.0 Technical Inquiries: midm-llm@kt.com
|
| 571 |
|
| 572 |
<br>
|