1. Description
SPARK-Summarization is a large language model developed by the Korea Institute of S&T Evaluation and Planning (KISTEP). This model specializes in summarization tasks and utilizes Chain of Density (CoD) reasoning to provide high-quality, condensed summaries in both Korean and English.
2. Key Features
- Enhanced Summarization through CoD: Delivers high-quality summaries using the Chain of Density approach, ensuring comprehensive yet concise output.
- Multilingual Support: Capable of processing and generating summaries in both Korean and English.
- Structured Output: Provides summaries in a bullet-point format for improved readability and quick comprehension.
- Base Model: Built on Mistral-nemo as the foundation model
- Training Method: Trained with Supervised Fine-Tuning (SFT)
- Context Length: The maximum context length for training data is 16,384.
3. Data
source | KISTEP Documents |
---|---|
count | 24,417 |
4. Usage
- When using ollama, you can utilize the Modelfile.
- Python code
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
model_id = "kistepAI/SPARK-Summarization"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto",
)
model.eval()
messages = [
{"role": "user", "content": "์๋
ํ์ธ์."}
]
input_ids = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
return_tensors="pt"
).to(model.device)
terminators = [
tokenizer.eos_token_id,
tokenizer.convert_tokens_to_ids("</s>")
]
outputs = model.generate(
input_ids,
max_new_tokens=512,
eos_token_id=terminators,
do_sample=True,
temperature=0.3,
top_p=0.95,
)
print(tokenizer.decode(outputs[0][input_ids.shape[-1]:], skip_special_tokens=True))
- Recommended Prompt Template
(input: {TITLE}, {DOCUMENT})
propmt_template: |
๋น์ ์ ์์ฝ ์ ๋ฌธ๊ฐ์
๋๋ค. ์ฃผ์ด์ง ํ
์คํธ๋ฅผ ์ฐธ๊ณ ํ์ฌ ์์ฝ์ ์์ฑํ์ธ์.
## ์์ฝ ๋จ๊ณ:
1. ํ
์คํธ ๋ถ์:
- ๋ฌธ์ ์ ๋ชฉ๊ณผ ํ
์คํธ๋ฅผ ์ฃผ์ ๊น๊ฒ ์ฝ๊ณ , ๋ฌธ์์ ์ฃผ์ ์ฃผ์ ๋ฅผ ํ์
ํ์ธ์.
2. ์ฃผ์ ์ฃผ์ฅ(key_argument) ์๋ณ:
- ๋ค์ ์ง๋ฌธ์ ๋ต๋ณํ๊ธฐ: "์ด ํ
์คํธ์ ์ฃผ์ ์ฃผ์ฅ ๋๋ ํต์ฌ ๋
ผ์ ์ ๋ฌด์์ธ๊ฐ?"
3. ์ฃผ์ ๊ฐ์ฒด(entities) ์ถ์ถ:
- 5๋จ์ด ์ดํ์ ์ฃผ์ ๊ฐ์ฒด 3๊ฐ๋ฅผ ๋ฝ์์ฃผ์ธ์.
4. ์์ฝ๋ฌธ์ ์ฃผ์ (title) ์์ฑ:
- ์ ๊ณต๋ ํ
์คํธ์ ๋ํ ๊ฐ๊ฒฐํ ํ๋ฌธ์ฅ์ ์ฃผ์ ๋ฅผ ์์ฑํ์ธ์.
5. ์์ฝ(summary) ์์ฑ:
- ์ฃผ์ ์ฃผ์ฅ๊ณผ ์ฃผ์ ๊ฐ์ฒด, ์ฃผ์ ๋ฅผ ์ฐธ๊ณ ํ์ฌ ํ
์คํธ์ ์ฃผ์ ๋ด์ฉ์ ์์ฝํ์ธ์.
## ํฅ์ ๋จ๊ณ
6. ๋ฐ๋ ํฅ์:
- ์ด๊ธฐ ์์ฝ์ ํฌํจ๋์ง ์์ 1~3๊ฐ์ ์ถ๊ฐ ์ค๋ช
๊ฐ์ฒด๋ฅผ ์๋ณํ์ธ์.
- ์ด์ ๋ฐ ์ ๊ฐ์ฒด๋ฅผ ๋ชจ๋ ํตํฉํ์ฌ ์์ฝ์ ๋ฐ๋๊ฐ ๋์ ๋ฒ์ ์ ์์ฑํ์ธ์.
7. ์ค์๋ ํ๊ฐ:
- ์ด์ ์์ฝ์์ ํ์์ ์ธ ๋ถ๋ถ์ ๊ฐ์กฐํ๊ณ ๋ ์ค์ํ ๋ถ๋ถ์ ์ค์ฌ์ ์์ ํ์ธ์.
- ์ ์์ฝ์ด ์ฃผ์ ์ฃผ์ฅ๊ณผ ๋ฐ์ ํ๊ฒ ์ผ์นํ๋์ง ํ์ธํ์ธ์.
8. ์ ์ฐฝ์ฑ ํฅ์:
- ๋ฌธ๋ฒ, ๋จ์ด ์ ํ, ํํ์ ๋ค๋ฌ์ด ๊ฐ๋
์ฑ๊ณผ ์์ฐ์ค๋ฌ์ด ํ๋ฆ์ ํฅ์์ํค์ธ์.
- ์์ฝ ์ธ๋ถ๋ด์ฉ์ ์ ํ์ฑ๊ณผ ์์ ์ฑ์ ์ ์งํ๋ฉด์ ๋ฌธ์ฅ ๊ตฌ์กฐ๋ฅผ ๊ฐ์ ํ์ธ์.
## ์์ฑ ๋ฐฉ์:
- ๋ฌธ์๋ฅผ ์๊ฐํ๋ ๋์ ์์ฝ ๋ด์ฉ๋ง ์์ฑํ์ธ์.
- ๊ตฌ์ฒด์ ์ธ ๋ฐ์ดํฐ๋ ์์น๋ณด๋ค๋ ์ ์ฒด ํ๋ฆ๊ณผ ๋ฐฉํฅ์ ์ค๋ช
ํ์ธ์.
- ์ฃผ์ด์ง ๋ด์ฉ์๋ง ๊ธฐ๋ฐํด ๊ฐ๊ด์ ์ผ๋ก ์์ฑํ์ธ์.
- ํ๊ตญ์ด๋ก ์์ฑํ๋, ์์ด ๊ธฐ์ ์ฉ์ด์ ๊ณ ์ ๋ช
์ฌ๋ ๊ทธ๋๋ก ์ฌ์ฉํ์ธ์.
## ์
๋ ฅ:
### ๋ฌธ์ ์ ๋ชฉ:
{TITLE}
### ํ
์คํธ:
{DOCUMENT}
## ์ถ๋ ฅ ํ์:
<reason>
์ด๊ธฐ ์ฃผ์ ์ฃผ์ฅ: [์ด๊ธฐ ์ฃผ์ ์ฃผ์ฅ]
์ด๊ธฐ ์ฃผ์ ๊ฐ์ฒด: [์ด๊ธฐ ์ฃผ์ ๊ฐ์ฒด ๋ชฉ๋ก]
์ด๊ธฐ ์ ๋ชฉ: [์ด๊ธฐ ์ ๋ชฉ]
์ด๊ธฐ ์์ฝ: [์ด๊ธฐ ์์ฝ ๋ด์ฉ]
๋ฐ๋ ํฅ์ ๋จ๊ณ:
์๋ก ์ถ๊ฐ๋ ์ฃผ์ ๊ฐ์ฒด: [์๋ก ์ถ๊ฐ๋ ์ฃผ์ ๊ฐ์ฒด ๋ชฉ๋ก(with bullet points)]
์ฌ๊ณ ๊ณผ์ : [์ฃผ์ ๊ฐ์ฒด ์ ํ ๋ฐ ์์ฝ ์์ฑ์ ๋ํ ์ค๋ช
]
์
๋ฐ์ดํธ ์ ๋ชฉ: [์
๋ฐ์ดํธ ์ ๋ชฉ]
์
๋ฐ์ดํธ ์์ฝ: [์
๋ฐ์ดํธ ์์ฝ ๋ด์ฉ]
์ค์๋ ํ๊ฐ ๋จ๊ณ:
์ฌ๊ณ ๊ณผ์ : [์์ฝ ๊ด๋ จ์ฑ ํฅ์์ ์ํ ์ค์๋ ํ๊ฐ ๋ฐ ๋ณ๊ฒฝ๋ ์ฌํญ์ ๋ํ ์ค๋ช
]
์
๋ฐ์ดํธ ์ ๋ชฉ: [์
๋ฐ์ดํธ ์ ๋ชฉ]
์
๋ฐ์ดํธ ์์ฝ: [์
๋ฐ์ดํธ ์์ฝ ๋ด์ฉ]
์ธ์ด ์ ์ฒญ์ฑ ๋จ๊ณ:
์ฌ๊ณ ๊ณผ์ : [์ธ์ด ๋ช
ํ์ฑ๊ณผ ์ ์ฐฝ์ฑ์ ๊ฐ์ ํ๊ธฐ ์ํด ๋ณ๊ฒฝ๋ ์ฌํญ์ ๋ํ ์ค๋ช
]
์
๋ฐ์ดํธ ์ ๋ชฉ: [์
๋ฐ์ดํธ ์ ๋ชฉ]
Updated Summary: [์์ฝ์ ๊ฐ ๋ฌธ์ฅ ๋ชฉ๋ก(with bullet points)]
</reason>
<output>
<key_argument>[์ฃผ์ ์ฃผ์ฅ(ํ๊ตญ์ด)]</key_argument>
<entities>[์ฃผ์ ๊ฐ์ฒด ๋ชฉ๋ก, ์ผํ๋ก ๊ตฌ๋ถ]</entities>
<title>[์ฃผ์ (ํ๊ตญ์ด)]</title>
<summary>
<point>[์ฒซ๋ฒ์งธ ์์ฝ ๋ฌธ์ฅ(ํ๊ตญ์ด)]</point>
<point>[๋๋ฒ์งธ ์์ฝ ๋ฌธ์ฅ(ํ๊ตญ์ด)]</point>
...
</summary>
</output>
5. Benchmark
TBD
- Downloads last month
- 0
Inference Providers
NEW
This model is not currently available via any of the supported Inference Providers.
The model cannot be deployed to the HF Inference API:
The model has no library tag.
Model tree for kistepAI/SPARK-Summarization
Base model
mistralai/Mistral-Nemo-Base-2407
Finetuned
mistralai/Mistral-Nemo-Instruct-2407