reasoning example : input
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "jaeyong2/Midm-2.0-Reason-SFT"
# load the tokenizer and the model
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype="auto",
device_map="auto"
)
prompt = "2의 제곱근은 뭐야?"
# message for inference
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"),
eos_token_id=tokenizer.eos_token_id,
max_new_tokens=1024,
do_sample=False,
)
print(tokenizer.decode(output[0]))
reasoing example result
<think>
2의 제곱근에 대해 설명드리겠습니다.
2의 제곱근은 2를 곱한 수를 의미합니다. 즉, 어떤 수 x가 2의 제곱근이라는 것은 x × x = 2를 만족하는 수 x를 말합니다.
수학적으로 표현하면 다음과 같습니다:
x² = 2
x = √2
따라서 2의 제곱근은 √2입니다.
참고로 √2는 무리수이며, 약분하면 1.4142...가 됩니다.
</think>
2의 제곱근은 √2입니다.
License
- K-intelligence/Midm-2.0-Mini-Instruct : https://huggingface.co/datasets/choosealicense/licenses/blob/main/markdown/mit.md
Acknowledgement
This research is supported by TPU Research Cloud program.
- Downloads last month
- 9
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
🙋
Ask for provider support
Model tree for jaeyong2/Midm-2.0-Mini-Reason-SFT-Preview
Base model
K-intelligence/Midm-2.0-Mini-Instruct