Unlocking the Power of KONI: A Guide to Using the KISTI Open Natural Intelligence Model

Aug 2, 2024 | Educational

In today’s fast-paced world of technology and science, having powerful tools at our disposal is crucial. One such tool is KONI (KISTI Open Natural Intelligence), a dedicated Language Model from the Korea Institute of Science and Technology Information (KISTI). This blog post will guide you through the features of KONI, how to use it, and troubleshoot common issues.

1. What is KONI?

KONI is a specialized large language model explicitly designed for science and technology. By harnessing the vast knowledge available in these fields, KONI arms researchers and developers with advanced capabilities for various tasks.

2. Key Features of KONI

  • Specialized in Science and Technology: Thoroughly trained on a specialized corpus.
  • Enhanced Performance: Significant improvements over its initial December 2023 release.
  • Base Model: Built upon KONI-Llama3-8B-Merged, integrating the strengths of Meta-Llama-3-8B and KISTI’s KONI.
  • Alignment: Employs Supervised Fine-Tuning (SFT) and Direct Preference Optimization (DPO).

3. Understanding the Data

KONI achieves its expertise by utilizing a substantial amount of data:

  • Approximately 11k SFT data and 7k DPO data have been used.
  • The SFT data comes from both internal generation and public sources like Hugging Face, translated into Korean.
  • The DPO data comprises curated translations to ensure relevance and accuracy.

4. Benchmark Performance

According to the latest tests conducted using LogicKor, KONI shows exceptional performance metrics:


Metric           Score 
----------------- ----- 
Reasoning        6.57   
Math             8.00   
Writing          8.92   
Coding           8.85   
Comprehension    9.85   
Grammar          7.07   
Single-turn      8.42   
Multi-turn       8.00   

Overall Score: 8.21

It stands out as a leader amongst publicly available 8B models as of July 30, 2024.

5. How to Use KONI

Using KONI is simple for developers familiar with Python. Here’s a straightforward example:


python
import transformers
import torch

model_id = 'KISTI-KONIKONI-Llama3-8B-Instruct-20240729'
pipeline = transformers.pipeline(
    'text-generation',
    model=model_id,
    model_kwargs={'torch_dtype': torch.bfloat16, 'device_map': 'auto'},
)

pipeline.model.eval()
instruction = "KISTI에 대해 설명해줘"
messages = [
    {'role': 'user', 'content': instruction}
]
prompt = pipeline.tokenizer.apply_chat_template(
    messages, tokenize=False, add_generation_prompt=True
)
terminators = (pipeline.tokenizer.eos_token_id, pipeline.tokenizer.convert_tokens_to_ids('eot_id'))
outputs = pipeline(
    prompt,
    max_new_tokens=2048,
    eos_token_id=terminators,
    do_sample=True,
    temperature=0.7,
    top_p=0.9
)
print(outputs[0]['generated_text'])

Analogy for Understanding the Code

Think of KONI as a highly specialized librarian in a massive library (the database). The librarian is not just knowledgeable; they are trained to find information quickly and accurately. Every time you ask a question (sending an instruction), the librarian (KONI) swiftly recalls relevant books (data) and presents you with concise summaries (outputs). By configuring the librarian’s settings (the parameters you set), you can specify how detailed or focused the answers should be.

6. Troubleshooting Common Issues

While using KONI, you might encounter some issues. Here are a few troubleshooting tips:

  • Model Not Loading: Ensure that the model ID is correct and that your environment supports the required libraries.
  • No Output Generated: Check your prompts and ensure they are well-structured and clear.
  • High Latency: Ensure your computational resources are sufficient and consider lowering the ‘max_new_tokens’ parameter for faster responses.

For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.

Conclusion

KONI is a powerful tool in the science and technology landscape that is designed to enhance your capabilities. By understanding its features and following the instructions outlined here, you can utilize this model effectively.

At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

Stay Informed with the Newest F(x) Insights and Blogs

Tech News and Blog Highlights, Straight to Your Inbox